diff --git a/java-artifact-registry/README.md b/java-artifact-registry/README.md index 0ae46620e117..51015a0b4bd0 100644 --- a/java-artifact-registry/README.md +++ b/java-artifact-registry/README.md @@ -20,7 +20,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.23.0 + 26.25.0 pom import @@ -195,7 +195,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html [stability-image]: https://img.shields.io/badge/stability-stable-green [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-artifact-registry.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-artifact-registry/1.23.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-artifact-registry/1.28.0 [authentication]: https://github.com/googleapis/google-cloud-java#authentication [auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes [predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles 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 df28dfb5954c..80c524c11d2b 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 @@ -1805,8 +1805,8 @@ public final UnaryCallable getRepositoryCallab * } * * @param parent Required. The name of the parent resource where the repository will be created. - * @param repository The repository to be created. - * @param repositoryId The repository id to use for this repository. + * @param repository Required. The repository to be created. + * @param repositoryId Required. The repository id to use for this repository. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture createRepositoryAsync( @@ -1843,8 +1843,8 @@ public final OperationFuture createRepositoryAsyn * } * * @param parent Required. The name of the parent resource where the repository will be created. - * @param repository The repository to be created. - * @param repositoryId The repository id to use for this repository. + * @param repository Required. The repository to be created. + * @param repositoryId Required. The repository id to use for this repository. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture createRepositoryAsync( @@ -2945,6 +2945,172 @@ public final UnaryCallable deleteVersionCallabl return stub.deleteVersionCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes multiple versions across a repository. The returned operation will complete once the + * versions have 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()) {
+   *   PackageName parent = PackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PACKAGE]");
+   *   List names = new ArrayList<>();
+   *   artifactRegistryClient.batchDeleteVersionsAsync(parent, names).get();
+   * }
+   * }
+ * + * @param parent The name of the repository holding all requested versions. + * @param names Required. The names of the versions to delete. A maximum of 10000 versions can be + * deleted in a batch. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture batchDeleteVersionsAsync( + PackageName parent, List names) { + BatchDeleteVersionsRequest request = + BatchDeleteVersionsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .addAllNames(names) + .build(); + return batchDeleteVersionsAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes multiple versions across a repository. The returned operation will complete once the + * versions have 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 parent =
+   *       PackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PACKAGE]").toString();
+   *   List names = new ArrayList<>();
+   *   artifactRegistryClient.batchDeleteVersionsAsync(parent, names).get();
+   * }
+   * }
+ * + * @param parent The name of the repository holding all requested versions. + * @param names Required. The names of the versions to delete. A maximum of 10000 versions can be + * deleted in a batch. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture batchDeleteVersionsAsync( + String parent, List names) { + BatchDeleteVersionsRequest request = + BatchDeleteVersionsRequest.newBuilder().setParent(parent).addAllNames(names).build(); + return batchDeleteVersionsAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes multiple versions across a repository. The returned operation will complete once the + * versions have 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()) {
+   *   BatchDeleteVersionsRequest request =
+   *       BatchDeleteVersionsRequest.newBuilder()
+   *           .setParent(
+   *               PackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PACKAGE]").toString())
+   *           .addAllNames(new ArrayList())
+   *           .setValidateOnly(true)
+   *           .build();
+   *   artifactRegistryClient.batchDeleteVersionsAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture batchDeleteVersionsAsync( + BatchDeleteVersionsRequest request) { + return batchDeleteVersionsOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes multiple versions across a repository. The returned operation will complete once the + * versions have 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()) {
+   *   BatchDeleteVersionsRequest request =
+   *       BatchDeleteVersionsRequest.newBuilder()
+   *           .setParent(
+   *               PackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PACKAGE]").toString())
+   *           .addAllNames(new ArrayList())
+   *           .setValidateOnly(true)
+   *           .build();
+   *   OperationFuture future =
+   *       artifactRegistryClient.batchDeleteVersionsOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + batchDeleteVersionsOperationCallable() { + return stub.batchDeleteVersionsOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes multiple versions across a repository. The returned operation will complete once the + * versions have 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()) {
+   *   BatchDeleteVersionsRequest request =
+   *       BatchDeleteVersionsRequest.newBuilder()
+   *           .setParent(
+   *               PackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PACKAGE]").toString())
+   *           .addAllNames(new ArrayList())
+   *           .setValidateOnly(true)
+   *           .build();
+   *   ApiFuture future =
+   *       artifactRegistryClient.batchDeleteVersionsCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable batchDeleteVersionsCallable() { + return stub.batchDeleteVersionsCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists files. @@ -3239,7 +3405,8 @@ public final UnaryCallable getFileCallable() { * } * } * - * @param parent The name of the parent resource whose tags will be listed. + * @param parent The name of the parent package whose tags will be listed. For example: + * `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListTagsPagedResponse listTags(String parent) { 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 2e714fcb0910..373deeb88478 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 @@ -252,6 +252,18 @@ public UnaryCallSettings deleteVersionSettings( return ((ArtifactRegistryStubSettings) getStubSettings()).deleteVersionOperationSettings(); } + /** Returns the object with the settings used for calls to batchDeleteVersions. */ + public UnaryCallSettings batchDeleteVersionsSettings() { + return ((ArtifactRegistryStubSettings) getStubSettings()).batchDeleteVersionsSettings(); + } + + /** Returns the object with the settings used for calls to batchDeleteVersions. */ + public OperationCallSettings + batchDeleteVersionsOperationSettings() { + return ((ArtifactRegistryStubSettings) getStubSettings()) + .batchDeleteVersionsOperationSettings(); + } + /** Returns the object with the settings used for calls to listFiles. */ public PagedCallSettings listFilesSettings() { @@ -617,6 +629,19 @@ public UnaryCallSettings.Builder deleteVersionS return getStubSettingsBuilder().deleteVersionOperationSettings(); } + /** Returns the builder for the settings used for calls to batchDeleteVersions. */ + public UnaryCallSettings.Builder + batchDeleteVersionsSettings() { + return getStubSettingsBuilder().batchDeleteVersionsSettings(); + } + + /** Returns the builder for the settings used for calls to batchDeleteVersions. */ + public OperationCallSettings.Builder< + BatchDeleteVersionsRequest, Empty, BatchDeleteVersionsMetadata> + batchDeleteVersionsOperationSettings() { + return getStubSettingsBuilder().batchDeleteVersionsOperationSettings(); + } + /** Returns the builder for the settings used for calls to listFiles. */ public PagedCallSettings.Builder listFilesSettings() { 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 e0f1d9dda8da..ba9e13ebca02 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 @@ -10,6 +10,9 @@ "grpc": { "libraryClient": "ArtifactRegistryClient", "rpcs": { + "BatchDeleteVersions": { + "methods": ["batchDeleteVersionsAsync", "batchDeleteVersionsAsync", "batchDeleteVersionsAsync", "batchDeleteVersionsOperationCallable", "batchDeleteVersionsCallable"] + }, "CreateRepository": { "methods": ["createRepositoryAsync", "createRepositoryAsync", "createRepositoryAsync", "createRepositoryOperationCallable", "createRepositoryCallable"] }, 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 688069985dcf..a1ad791c715e 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 @@ -34,6 +34,8 @@ import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; +import com.google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata; +import com.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest; import com.google.devtools.artifactregistry.v1.CreateRepositoryRequest; import com.google.devtools.artifactregistry.v1.CreateTagRequest; import com.google.devtools.artifactregistry.v1.DeletePackageRequest; @@ -273,6 +275,16 @@ public UnaryCallable deleteVersionCallable() { throw new UnsupportedOperationException("Not implemented: deleteVersionCallable()"); } + public OperationCallable + batchDeleteVersionsOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: batchDeleteVersionsOperationCallable()"); + } + + public UnaryCallable batchDeleteVersionsCallable() { + throw new UnsupportedOperationException("Not implemented: batchDeleteVersionsCallable()"); + } + public UnaryCallable listFilesPagedCallable() { throw new UnsupportedOperationException("Not implemented: listFilesPagedCallable()"); } 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 6004e07d34ca..1937d7e66f18 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 @@ -64,6 +64,8 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Lists; +import com.google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata; +import com.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest; import com.google.devtools.artifactregistry.v1.CreateRepositoryRequest; import com.google.devtools.artifactregistry.v1.CreateTagRequest; import com.google.devtools.artifactregistry.v1.DeletePackageRequest; @@ -229,6 +231,11 @@ public class ArtifactRegistryStubSettings extends StubSettings deleteVersionSettings; private final OperationCallSettings deleteVersionOperationSettings; + private final UnaryCallSettings + batchDeleteVersionsSettings; + private final OperationCallSettings< + BatchDeleteVersionsRequest, Empty, BatchDeleteVersionsMetadata> + batchDeleteVersionsOperationSettings; private final PagedCallSettings listFilesSettings; private final UnaryCallSettings getFileSettings; @@ -967,6 +974,17 @@ public UnaryCallSettings deleteVersionSettings( return deleteVersionOperationSettings; } + /** Returns the object with the settings used for calls to batchDeleteVersions. */ + public UnaryCallSettings batchDeleteVersionsSettings() { + return batchDeleteVersionsSettings; + } + + /** Returns the object with the settings used for calls to batchDeleteVersions. */ + public OperationCallSettings + batchDeleteVersionsOperationSettings() { + return batchDeleteVersionsOperationSettings; + } + /** Returns the object with the settings used for calls to listFiles. */ public PagedCallSettings listFilesSettings() { @@ -1188,6 +1206,9 @@ protected ArtifactRegistryStubSettings(Builder settingsBuilder) throws IOExcepti getVersionSettings = settingsBuilder.getVersionSettings().build(); deleteVersionSettings = settingsBuilder.deleteVersionSettings().build(); deleteVersionOperationSettings = settingsBuilder.deleteVersionOperationSettings().build(); + batchDeleteVersionsSettings = settingsBuilder.batchDeleteVersionsSettings().build(); + batchDeleteVersionsOperationSettings = + settingsBuilder.batchDeleteVersionsOperationSettings().build(); listFilesSettings = settingsBuilder.listFilesSettings().build(); getFileSettings = settingsBuilder.getFileSettings().build(); listTagsSettings = settingsBuilder.listTagsSettings().build(); @@ -1267,6 +1288,11 @@ public static class Builder extends StubSettings.Builder deleteVersionSettings; private final OperationCallSettings.Builder deleteVersionOperationSettings; + private final UnaryCallSettings.Builder + batchDeleteVersionsSettings; + private final OperationCallSettings.Builder< + BatchDeleteVersionsRequest, Empty, BatchDeleteVersionsMetadata> + batchDeleteVersionsOperationSettings; private final PagedCallSettings.Builder< ListFilesRequest, ListFilesResponse, ListFilesPagedResponse> listFilesSettings; @@ -1355,6 +1381,8 @@ protected Builder(ClientContext clientContext) { getVersionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); deleteVersionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); deleteVersionOperationSettings = OperationCallSettings.newBuilder(); + batchDeleteVersionsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + batchDeleteVersionsOperationSettings = OperationCallSettings.newBuilder(); listFilesSettings = PagedCallSettings.newBuilder(LIST_FILES_PAGE_STR_FACT); getFileSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); listTagsSettings = PagedCallSettings.newBuilder(LIST_TAGS_PAGE_STR_FACT); @@ -1395,6 +1423,7 @@ protected Builder(ClientContext clientContext) { listVersionsSettings, getVersionSettings, deleteVersionSettings, + batchDeleteVersionsSettings, listFilesSettings, getFileSettings, listTagsSettings, @@ -1446,6 +1475,9 @@ protected Builder(ArtifactRegistryStubSettings settings) { getVersionSettings = settings.getVersionSettings.toBuilder(); deleteVersionSettings = settings.deleteVersionSettings.toBuilder(); deleteVersionOperationSettings = settings.deleteVersionOperationSettings.toBuilder(); + batchDeleteVersionsSettings = settings.batchDeleteVersionsSettings.toBuilder(); + batchDeleteVersionsOperationSettings = + settings.batchDeleteVersionsOperationSettings.toBuilder(); listFilesSettings = settings.listFilesSettings.toBuilder(); getFileSettings = settings.getFileSettings.toBuilder(); listTagsSettings = settings.listTagsSettings.toBuilder(); @@ -1486,6 +1518,7 @@ protected Builder(ArtifactRegistryStubSettings settings) { listVersionsSettings, getVersionSettings, deleteVersionSettings, + batchDeleteVersionsSettings, listFilesSettings, getFileSettings, listTagsSettings, @@ -1636,6 +1669,11 @@ 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 + .batchDeleteVersionsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + builder .listFilesSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) @@ -1864,6 +1902,31 @@ private static Builder initDefaults(Builder builder) { .setTotalTimeout(Duration.ofMillis(300000L)) .build())); + builder + .batchDeleteVersionsOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + BatchDeleteVersionsMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + return builder; } @@ -2058,6 +2121,21 @@ public UnaryCallSettings.Builder deleteVersionS return deleteVersionOperationSettings; } + /** Returns the builder for the settings used for calls to batchDeleteVersions. */ + public UnaryCallSettings.Builder + batchDeleteVersionsSettings() { + return batchDeleteVersionsSettings; + } + + /** Returns the builder for the settings used for calls to batchDeleteVersions. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + BatchDeleteVersionsRequest, Empty, BatchDeleteVersionsMetadata> + batchDeleteVersionsOperationSettings() { + return batchDeleteVersionsOperationSettings; + } + /** Returns the builder for the settings used for calls to listFiles. */ public PagedCallSettings.Builder listFilesSettings() { 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 9aebd3997585..3dc1b5e140dd 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 @@ -39,6 +39,8 @@ import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; +import com.google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata; +import com.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest; import com.google.devtools.artifactregistry.v1.CreateRepositoryRequest; import com.google.devtools.artifactregistry.v1.CreateTagRequest; import com.google.devtools.artifactregistry.v1.DeletePackageRequest; @@ -348,6 +350,17 @@ public class GrpcArtifactRegistryStub extends ArtifactRegistryStub { .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); + private static final MethodDescriptor + batchDeleteVersionsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.devtools.artifactregistry.v1.ArtifactRegistry/BatchDeleteVersions") + .setRequestMarshaller( + ProtoUtils.marshaller(BatchDeleteVersionsRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + private static final MethodDescriptor listFilesMethodDescriptor = MethodDescriptor.newBuilder() @@ -551,6 +564,9 @@ public class GrpcArtifactRegistryStub extends ArtifactRegistryStub { private final UnaryCallable deleteVersionCallable; private final OperationCallable deleteVersionOperationCallable; + private final UnaryCallable batchDeleteVersionsCallable; + private final OperationCallable + batchDeleteVersionsOperationCallable; private final UnaryCallable listFilesCallable; private final UnaryCallable listFilesPagedCallable; private final UnaryCallable getFileCallable; @@ -834,6 +850,16 @@ protected GrpcArtifactRegistryStub( return builder.build(); }) .build(); + GrpcCallSettings batchDeleteVersionsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(batchDeleteVersionsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); GrpcCallSettings listFilesTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(listFilesMethodDescriptor) @@ -1133,6 +1159,17 @@ protected GrpcArtifactRegistryStub( settings.deleteVersionOperationSettings(), clientContext, operationsStub); + this.batchDeleteVersionsCallable = + callableFactory.createUnaryCallable( + batchDeleteVersionsTransportSettings, + settings.batchDeleteVersionsSettings(), + clientContext); + this.batchDeleteVersionsOperationCallable = + callableFactory.createOperationCallable( + batchDeleteVersionsTransportSettings, + settings.batchDeleteVersionsOperationSettings(), + clientContext, + operationsStub); this.listFilesCallable = callableFactory.createUnaryCallable( listFilesTransportSettings, settings.listFilesSettings(), clientContext); @@ -1394,6 +1431,17 @@ public UnaryCallable deleteVersionCallable() { return deleteVersionOperationCallable; } + @Override + public UnaryCallable batchDeleteVersionsCallable() { + return batchDeleteVersionsCallable; + } + + @Override + public OperationCallable + batchDeleteVersionsOperationCallable() { + return batchDeleteVersionsOperationCallable; + } + @Override public UnaryCallable listFilesCallable() { return listFilesCallable; 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 427b4c8ba9e4..eb03640321ad 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 @@ -49,6 +49,8 @@ import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; import com.google.common.collect.ImmutableMap; +import com.google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata; +import com.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest; import com.google.devtools.artifactregistry.v1.CreateRepositoryRequest; import com.google.devtools.artifactregistry.v1.CreateTagRequest; import com.google.devtools.artifactregistry.v1.DeletePackageRequest; @@ -133,6 +135,7 @@ public class HttpJsonArtifactRegistryStub extends ArtifactRegistryStub { private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder() + .add(BatchDeleteVersionsMetadata.getDescriptor()) .add(Empty.getDescriptor()) .add(ImportYumArtifactsResponse.getDescriptor()) .add(ImportAptArtifactsResponse.getDescriptor()) @@ -926,6 +929,47 @@ public class HttpJsonArtifactRegistryStub extends ArtifactRegistryStub { HttpJsonOperationSnapshot.create(response)) .build(); + private static final ApiMethodDescriptor + batchDeleteVersionsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.devtools.artifactregistry.v1.ArtifactRegistry/BatchDeleteVersions") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/repositories/*/packages/*}/versions:batchDelete", + 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, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearParent().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (BatchDeleteVersionsRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + private static final ApiMethodDescriptor listFilesMethodDescriptor = ApiMethodDescriptor.newBuilder() @@ -1556,6 +1600,9 @@ public class HttpJsonArtifactRegistryStub extends ArtifactRegistryStub { private final UnaryCallable deleteVersionCallable; private final OperationCallable deleteVersionOperationCallable; + private final UnaryCallable batchDeleteVersionsCallable; + private final OperationCallable + batchDeleteVersionsOperationCallable; private final UnaryCallable listFilesCallable; private final UnaryCallable listFilesPagedCallable; private final UnaryCallable getFileCallable; @@ -1871,6 +1918,18 @@ protected HttpJsonArtifactRegistryStub( return builder.build(); }) .build(); + HttpJsonCallSettings + batchDeleteVersionsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(batchDeleteVersionsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); HttpJsonCallSettings listFilesTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(listFilesMethodDescriptor) @@ -2187,6 +2246,17 @@ protected HttpJsonArtifactRegistryStub( settings.deleteVersionOperationSettings(), clientContext, httpJsonOperationsStub); + this.batchDeleteVersionsCallable = + callableFactory.createUnaryCallable( + batchDeleteVersionsTransportSettings, + settings.batchDeleteVersionsSettings(), + clientContext); + this.batchDeleteVersionsOperationCallable = + callableFactory.createOperationCallable( + batchDeleteVersionsTransportSettings, + settings.batchDeleteVersionsOperationSettings(), + clientContext, + httpJsonOperationsStub); this.listFilesCallable = callableFactory.createUnaryCallable( listFilesTransportSettings, settings.listFilesSettings(), clientContext); @@ -2281,6 +2351,7 @@ public static List getMethodDescriptors() { methodDescriptors.add(listVersionsMethodDescriptor); methodDescriptors.add(getVersionMethodDescriptor); methodDescriptors.add(deleteVersionMethodDescriptor); + methodDescriptors.add(batchDeleteVersionsMethodDescriptor); methodDescriptors.add(listFilesMethodDescriptor); methodDescriptors.add(getFileMethodDescriptor); methodDescriptors.add(listTagsMethodDescriptor); @@ -2491,6 +2562,17 @@ public UnaryCallable deleteVersionCallable() { return deleteVersionOperationCallable; } + @Override + public UnaryCallable batchDeleteVersionsCallable() { + return batchDeleteVersionsCallable; + } + + @Override + public OperationCallable + batchDeleteVersionsOperationCallable() { + return batchDeleteVersionsOperationCallable; + } + @Override public UnaryCallable listFilesCallable() { return listFilesCallable; diff --git a/java-artifact-registry/google-cloud-artifact-registry/src/main/resources/META-INF/native-image/com.google.devtools.artifactregistry.v1/reflect-config.json b/java-artifact-registry/google-cloud-artifact-registry/src/main/resources/META-INF/native-image/com.google.devtools.artifactregistry.v1/reflect-config.json index c860c54bcdc9..5577b948db0d 100644 --- a/java-artifact-registry/google-cloud-artifact-registry/src/main/resources/META-INF/native-image/com.google.devtools.artifactregistry.v1/reflect-config.json +++ b/java-artifact-registry/google-cloud-artifact-registry/src/main/resources/META-INF/native-image/com.google.devtools.artifactregistry.v1/reflect-config.json @@ -494,6 +494,96 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devtools.artifactregistry.v1.CleanupPolicy", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devtools.artifactregistry.v1.CleanupPolicy$Action", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devtools.artifactregistry.v1.CleanupPolicy$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devtools.artifactregistry.v1.CleanupPolicyCondition", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devtools.artifactregistry.v1.CleanupPolicyCondition$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devtools.artifactregistry.v1.CleanupPolicyCondition$TagState", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.devtools.artifactregistry.v1.CreateRepositoryRequest", "queryAllDeclaredConstructors": true, @@ -1484,6 +1574,258 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig$AptRepository", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig$AptRepository$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig$AptRepository$PublicRepository", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig$AptRepository$PublicRepository$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig$AptRepository$PublicRepository$RepositoryBase", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig$DockerRepository", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig$DockerRepository$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig$DockerRepository$PublicRepository", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig$MavenRepository", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig$MavenRepository$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig$MavenRepository$PublicRepository", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig$NpmRepository", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig$NpmRepository$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig$NpmRepository$PublicRepository", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig$PythonRepository", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig$PythonRepository$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig$PythonRepository$PublicRepository", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig$UpstreamCredentials", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig$UpstreamCredentials$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig$UpstreamCredentials$UsernamePasswordCredentials", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig$UpstreamCredentials$UsernamePasswordCredentials$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig$YumRepository", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig$YumRepository$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig$YumRepository$PublicRepository", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig$YumRepository$PublicRepository$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig$YumRepository$PublicRepository$RepositoryBase", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.devtools.artifactregistry.v1.Repository", "queryAllDeclaredConstructors": true, @@ -1502,6 +1844,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.devtools.artifactregistry.v1.Repository$DockerRepositoryConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devtools.artifactregistry.v1.Repository$DockerRepositoryConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.devtools.artifactregistry.v1.Repository$Format", "queryAllDeclaredConstructors": true, @@ -1538,6 +1898,15 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.devtools.artifactregistry.v1.Repository$Mode", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.devtools.artifactregistry.v1.Tag", "queryAllDeclaredConstructors": true, @@ -1628,6 +1997,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.devtools.artifactregistry.v1.UpstreamPolicy", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devtools.artifactregistry.v1.UpstreamPolicy$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.devtools.artifactregistry.v1.VPCSCConfig", "queryAllDeclaredConstructors": true, @@ -1682,6 +2069,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.devtools.artifactregistry.v1.VirtualRepositoryConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devtools.artifactregistry.v1.VirtualRepositoryConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.devtools.artifactregistry.v1.YumArtifact", "queryAllDeclaredConstructors": true, 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 2268c4a08aad..2da426211937 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 @@ -1112,6 +1112,10 @@ public void getRepositoryTest() throws Exception { .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) .setKmsKeyName("kmsKeyName412586233") + .putAllCleanupPolicies(new HashMap()) + .setSizeBytes(-1796325715) + .setSatisfiesPzs(true) + .setCleanupPolicyDryRun(true) .build(); mockService.addResponse(expectedResponse); @@ -1161,6 +1165,10 @@ public void getRepositoryTest2() throws Exception { .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) .setKmsKeyName("kmsKeyName412586233") + .putAllCleanupPolicies(new HashMap()) + .setSizeBytes(-1796325715) + .setSatisfiesPzs(true) + .setCleanupPolicyDryRun(true) .build(); mockService.addResponse(expectedResponse); @@ -1210,6 +1218,10 @@ public void createRepositoryTest() throws Exception { .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) .setKmsKeyName("kmsKeyName412586233") + .putAllCleanupPolicies(new HashMap()) + .setSizeBytes(-1796325715) + .setSatisfiesPzs(true) + .setCleanupPolicyDryRun(true) .build(); Operation resultOperation = Operation.newBuilder() @@ -1269,6 +1281,10 @@ public void createRepositoryTest2() throws Exception { .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) .setKmsKeyName("kmsKeyName412586233") + .putAllCleanupPolicies(new HashMap()) + .setSizeBytes(-1796325715) + .setSatisfiesPzs(true) + .setCleanupPolicyDryRun(true) .build(); Operation resultOperation = Operation.newBuilder() @@ -1328,6 +1344,10 @@ public void updateRepositoryTest() throws Exception { .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) .setKmsKeyName("kmsKeyName412586233") + .putAllCleanupPolicies(new HashMap()) + .setSizeBytes(-1796325715) + .setSatisfiesPzs(true) + .setCleanupPolicyDryRun(true) .build(); mockService.addResponse(expectedResponse); @@ -1339,6 +1359,10 @@ public void updateRepositoryTest() throws Exception { .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) .setKmsKeyName("kmsKeyName412586233") + .putAllCleanupPolicies(new HashMap()) + .setSizeBytes(-1796325715) + .setSatisfiesPzs(true) + .setCleanupPolicyDryRun(true) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); @@ -1376,6 +1400,10 @@ public void updateRepositoryExceptionTest() throws Exception { .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) .setKmsKeyName("kmsKeyName412586233") + .putAllCleanupPolicies(new HashMap()) + .setSizeBytes(-1796325715) + .setSatisfiesPzs(true) + .setCleanupPolicyDryRun(true) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); client.updateRepository(repository, updateMask); @@ -1821,7 +1849,9 @@ public void listVersionsExceptionTest() throws Exception { public void getVersionTest() throws Exception { Version expectedResponse = Version.newBuilder() - .setName("name3373707") + .setName( + VersionName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PACKAGE]", "[VERSION]") + .toString()) .setDescription("description-1724546052") .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) @@ -1915,6 +1945,102 @@ public void deleteVersionExceptionTest() throws Exception { } } + @Test + public void batchDeleteVersionsTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("batchDeleteVersionsTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + PackageName parent = PackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PACKAGE]"); + List names = new ArrayList<>(); + + client.batchDeleteVersionsAsync(parent, names).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 batchDeleteVersionsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + PackageName parent = PackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PACKAGE]"); + List names = new ArrayList<>(); + client.batchDeleteVersionsAsync(parent, names).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void batchDeleteVersionsTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("batchDeleteVersionsTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = + "projects/project-5394/locations/location-5394/repositories/repositorie-5394/packages/package-5394"; + List names = new ArrayList<>(); + + client.batchDeleteVersionsAsync(parent, names).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 batchDeleteVersionsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = + "projects/project-5394/locations/location-5394/repositories/repositorie-5394/packages/package-5394"; + List names = new ArrayList<>(); + client.batchDeleteVersionsAsync(parent, names).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + @Test public void listFilesTest() throws Exception { File responsesElement = File.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 afbe2843e050..ad73ac736d8f 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 @@ -993,6 +993,10 @@ public void getRepositoryTest() throws Exception { .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) .setKmsKeyName("kmsKeyName412586233") + .putAllCleanupPolicies(new HashMap()) + .setSizeBytes(-1796325715) + .setSatisfiesPzs(true) + .setCleanupPolicyDryRun(true) .build(); mockArtifactRegistry.addResponse(expectedResponse); @@ -1036,6 +1040,10 @@ public void getRepositoryTest2() throws Exception { .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) .setKmsKeyName("kmsKeyName412586233") + .putAllCleanupPolicies(new HashMap()) + .setSizeBytes(-1796325715) + .setSatisfiesPzs(true) + .setCleanupPolicyDryRun(true) .build(); mockArtifactRegistry.addResponse(expectedResponse); @@ -1079,6 +1087,10 @@ public void createRepositoryTest() throws Exception { .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) .setKmsKeyName("kmsKeyName412586233") + .putAllCleanupPolicies(new HashMap()) + .setSizeBytes(-1796325715) + .setSatisfiesPzs(true) + .setCleanupPolicyDryRun(true) .build(); Operation resultOperation = Operation.newBuilder() @@ -1137,6 +1149,10 @@ public void createRepositoryTest2() throws Exception { .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) .setKmsKeyName("kmsKeyName412586233") + .putAllCleanupPolicies(new HashMap()) + .setSizeBytes(-1796325715) + .setSatisfiesPzs(true) + .setCleanupPolicyDryRun(true) .build(); Operation resultOperation = Operation.newBuilder() @@ -1195,6 +1211,10 @@ public void updateRepositoryTest() throws Exception { .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) .setKmsKeyName("kmsKeyName412586233") + .putAllCleanupPolicies(new HashMap()) + .setSizeBytes(-1796325715) + .setSatisfiesPzs(true) + .setCleanupPolicyDryRun(true) .build(); mockArtifactRegistry.addResponse(expectedResponse); @@ -1619,7 +1639,9 @@ public void listVersionsExceptionTest() throws Exception { public void getVersionTest() throws Exception { Version expectedResponse = Version.newBuilder() - .setName("name3373707") + .setName( + VersionName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PACKAGE]", "[VERSION]") + .toString()) .setDescription("description-1724546052") .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) @@ -1700,6 +1722,96 @@ public void deleteVersionExceptionTest() throws Exception { } } + @Test + public void batchDeleteVersionsTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("batchDeleteVersionsTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockArtifactRegistry.addResponse(resultOperation); + + PackageName parent = PackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PACKAGE]"); + List names = new ArrayList<>(); + + client.batchDeleteVersionsAsync(parent, names).get(); + + List actualRequests = mockArtifactRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + BatchDeleteVersionsRequest actualRequest = ((BatchDeleteVersionsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(names, actualRequest.getNamesList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void batchDeleteVersionsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockArtifactRegistry.addException(exception); + + try { + PackageName parent = PackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PACKAGE]"); + List names = new ArrayList<>(); + client.batchDeleteVersionsAsync(parent, names).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 batchDeleteVersionsTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("batchDeleteVersionsTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockArtifactRegistry.addResponse(resultOperation); + + String parent = "parent-995424086"; + List names = new ArrayList<>(); + + client.batchDeleteVersionsAsync(parent, names).get(); + + List actualRequests = mockArtifactRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + BatchDeleteVersionsRequest actualRequest = ((BatchDeleteVersionsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(names, actualRequest.getNamesList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void batchDeleteVersionsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockArtifactRegistry.addException(exception); + + try { + String parent = "parent-995424086"; + List names = new ArrayList<>(); + client.batchDeleteVersionsAsync(parent, names).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 listFilesTest() throws Exception { File responsesElement = File.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 cac23fac9224..b689d7a65bb9 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 @@ -506,6 +506,27 @@ public void deleteVersion( } } + @Override + public void batchDeleteVersions( + BatchDeleteVersionsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method BatchDeleteVersions, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + @Override public void listFiles( ListFilesRequest request, StreamObserver responseObserver) { 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 06e9d704c076..d1b9d55e7247 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 @@ -1028,6 +1028,55 @@ private ArtifactRegistryGrpc() {} return getDeleteVersionMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest, + com.google.longrunning.Operation> + getBatchDeleteVersionsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "BatchDeleteVersions", + requestType = com.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest, + com.google.longrunning.Operation> + getBatchDeleteVersionsMethod() { + io.grpc.MethodDescriptor< + com.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest, + com.google.longrunning.Operation> + getBatchDeleteVersionsMethod; + if ((getBatchDeleteVersionsMethod = ArtifactRegistryGrpc.getBatchDeleteVersionsMethod) + == null) { + synchronized (ArtifactRegistryGrpc.class) { + if ((getBatchDeleteVersionsMethod = ArtifactRegistryGrpc.getBatchDeleteVersionsMethod) + == null) { + ArtifactRegistryGrpc.getBatchDeleteVersionsMethod = + getBatchDeleteVersionsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "BatchDeleteVersions")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new ArtifactRegistryMethodDescriptorSupplier("BatchDeleteVersions")) + .build(); + } + } + } + return getBatchDeleteVersionsMethod; + } + private static volatile io.grpc.MethodDescriptor< com.google.devtools.artifactregistry.v1.ListFilesRequest, com.google.devtools.artifactregistry.v1.ListFilesResponse> @@ -2042,6 +2091,21 @@ default void deleteVersion( getDeleteVersionMethod(), responseObserver); } + /** + * + * + *
+     * Deletes multiple versions across a repository. The returned operation will
+     * complete once the versions have been deleted.
+     * 
+ */ + default void batchDeleteVersions( + com.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getBatchDeleteVersionsMethod(), responseObserver); + } + /** * * @@ -2654,6 +2718,23 @@ public void deleteVersion( responseObserver); } + /** + * + * + *
+     * Deletes multiple versions across a repository. The returned operation will
+     * complete once the versions have been deleted.
+     * 
+ */ + public void batchDeleteVersions( + com.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getBatchDeleteVersionsMethod(), getCallOptions()), + request, + responseObserver); + } + /** * * @@ -3185,6 +3266,20 @@ public com.google.longrunning.Operation deleteVersion( getChannel(), getDeleteVersionMethod(), getCallOptions(), request); } + /** + * + * + *
+     * Deletes multiple versions across a repository. The returned operation will
+     * complete once the versions have been deleted.
+     * 
+ */ + public com.google.longrunning.Operation batchDeleteVersions( + com.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getBatchDeleteVersionsMethod(), getCallOptions(), request); + } + /** * * @@ -3697,6 +3792,21 @@ protected ArtifactRegistryFutureStub build( getChannel().newCall(getDeleteVersionMethod(), getCallOptions()), request); } + /** + * + * + *
+     * Deletes multiple versions across a repository. The returned operation will
+     * complete once the versions have been deleted.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + batchDeleteVersions( + com.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getBatchDeleteVersionsMethod(), getCallOptions()), request); + } + /** * * @@ -3915,20 +4025,21 @@ public com.google.common.util.concurrent.ListenableFuture implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -4074,6 +4185,11 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (com.google.devtools.artifactregistry.v1.DeleteVersionRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_BATCH_DELETE_VERSIONS: + serviceImpl.batchDeleteVersions( + (com.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; case METHODID_LIST_FILES: serviceImpl.listFiles( (com.google.devtools.artifactregistry.v1.ListFilesRequest) request, @@ -4316,6 +4432,12 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser new MethodHandlers< com.google.devtools.artifactregistry.v1.DeleteVersionRequest, com.google.longrunning.Operation>(service, METHODID_DELETE_VERSION))) + .addMethod( + getBatchDeleteVersionsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest, + com.google.longrunning.Operation>(service, METHODID_BATCH_DELETE_VERSIONS))) .addMethod( getListFilesMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( @@ -4477,6 +4599,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getListVersionsMethod()) .addMethod(getGetVersionMethod()) .addMethod(getDeleteVersionMethod()) + .addMethod(getBatchDeleteVersionsMethod()) .addMethod(getListFilesMethod()) .addMethod(getGetFileMethod()) .addMethod(getListTagsMethod()) diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/BatchDeleteVersionsRequest.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/BatchDeleteVersionsRequest.java new file mode 100644 index 000000000000..9eda147f9860 --- /dev/null +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/BatchDeleteVersionsRequest.java @@ -0,0 +1,1045 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 request to delete multiple versions across a repository.
+ * 
+ * + * Protobuf type {@code google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest} + */ +public final class BatchDeleteVersionsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest) + BatchDeleteVersionsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use BatchDeleteVersionsRequest.newBuilder() to construct. + private BatchDeleteVersionsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BatchDeleteVersionsRequest() { + parent_ = ""; + names_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BatchDeleteVersionsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devtools.artifactregistry.v1.VersionProto + .internal_static_google_devtools_artifactregistry_v1_BatchDeleteVersionsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devtools.artifactregistry.v1.VersionProto + .internal_static_google_devtools_artifactregistry_v1_BatchDeleteVersionsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest.class, + com.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * The name of the repository holding all requested versions.
+   * 
+ * + * string parent = 1 [(.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; + } + } + /** + * + * + *
+   * The name of the repository holding all requested versions.
+   * 
+ * + * string parent = 1 [(.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 NAMES_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList names_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Required. The names of the versions to delete.
+   * A maximum of 10000 versions can be deleted in a batch.
+   * 
+ * + * + * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the names. + */ + public com.google.protobuf.ProtocolStringList getNamesList() { + return names_; + } + /** + * + * + *
+   * Required. The names of the versions to delete.
+   * A maximum of 10000 versions can be deleted in a batch.
+   * 
+ * + * + * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The count of names. + */ + public int getNamesCount() { + return names_.size(); + } + /** + * + * + *
+   * Required. The names of the versions to delete.
+   * A maximum of 10000 versions can be deleted in a batch.
+   * 
+ * + * + * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The names at the given index. + */ + public java.lang.String getNames(int index) { + return names_.get(index); + } + /** + * + * + *
+   * Required. The names of the versions to delete.
+   * A maximum of 10000 versions can be deleted in a batch.
+   * 
+ * + * + * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the names at the given index. + */ + public com.google.protobuf.ByteString getNamesBytes(int index) { + return names_.getByteString(index); + } + + public static final int VALIDATE_ONLY_FIELD_NUMBER = 3; + private boolean validateOnly_ = false; + /** + * + * + *
+   * If true, the request is performed without deleting data, following AIP-163.
+   * 
+ * + * bool validate_only = 3; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + 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_); + } + for (int i = 0; i < names_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, names_.getRaw(i)); + } + if (validateOnly_ != false) { + output.writeBool(3, validateOnly_); + } + 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_); + } + { + int dataSize = 0; + for (int i = 0; i < names_.size(); i++) { + dataSize += computeStringSizeNoTag(names_.getRaw(i)); + } + size += dataSize; + size += 1 * getNamesList().size(); + } + if (validateOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, validateOnly_); + } + 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.BatchDeleteVersionsRequest)) { + return super.equals(obj); + } + com.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest other = + (com.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getNamesList().equals(other.getNamesList())) return false; + if (getValidateOnly() != other.getValidateOnly()) 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(); + if (getNamesCount() > 0) { + hash = (37 * hash) + NAMES_FIELD_NUMBER; + hash = (53 * hash) + getNamesList().hashCode(); + } + hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest 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.BatchDeleteVersionsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest 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.BatchDeleteVersionsRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest 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.BatchDeleteVersionsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest 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.BatchDeleteVersionsRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest + 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.BatchDeleteVersionsRequest 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.BatchDeleteVersionsRequest 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.BatchDeleteVersionsRequest 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 delete multiple versions across a repository.
+   * 
+ * + * Protobuf type {@code google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest) + com.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devtools.artifactregistry.v1.VersionProto + .internal_static_google_devtools_artifactregistry_v1_BatchDeleteVersionsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devtools.artifactregistry.v1.VersionProto + .internal_static_google_devtools_artifactregistry_v1_BatchDeleteVersionsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest.class, + com.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest.Builder.class); + } + + // Construct using + // com.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + names_ = com.google.protobuf.LazyStringArrayList.emptyList(); + validateOnly_ = false; + 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_BatchDeleteVersionsRequest_descriptor; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest + getDefaultInstanceForType() { + return com.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest build() { + com.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest buildPartial() { + com.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest result = + new com.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + names_.makeImmutable(); + result.names_ = names_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.validateOnly_ = validateOnly_; + } + } + + @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.BatchDeleteVersionsRequest) { + return mergeFrom( + (com.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest other) { + if (other + == com.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.names_.isEmpty()) { + if (names_.isEmpty()) { + names_ = other.names_; + bitField0_ |= 0x00000002; + } else { + ensureNamesIsMutable(); + names_.addAll(other.names_); + } + onChanged(); + } + if (other.getValidateOnly() != false) { + setValidateOnly(other.getValidateOnly()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureNamesIsMutable(); + names_.add(s); + break; + } // case 18 + case 24: + { + validateOnly_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + 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_ = ""; + /** + * + * + *
+     * The name of the repository holding all requested versions.
+     * 
+ * + * string parent = 1 [(.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; + } + } + /** + * + * + *
+     * The name of the repository holding all requested versions.
+     * 
+ * + * string parent = 1 [(.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; + } + } + /** + * + * + *
+     * The name of the repository holding all requested versions.
+     * 
+ * + * string parent = 1 [(.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; + } + /** + * + * + *
+     * The name of the repository holding all requested versions.
+     * 
+ * + * string parent = 1 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the repository holding all requested versions.
+     * 
+ * + * string parent = 1 [(.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 com.google.protobuf.LazyStringArrayList names_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureNamesIsMutable() { + if (!names_.isModifiable()) { + names_ = new com.google.protobuf.LazyStringArrayList(names_); + } + bitField0_ |= 0x00000002; + } + /** + * + * + *
+     * Required. The names of the versions to delete.
+     * A maximum of 10000 versions can be deleted in a batch.
+     * 
+ * + * + * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the names. + */ + public com.google.protobuf.ProtocolStringList getNamesList() { + names_.makeImmutable(); + return names_; + } + /** + * + * + *
+     * Required. The names of the versions to delete.
+     * A maximum of 10000 versions can be deleted in a batch.
+     * 
+ * + * + * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The count of names. + */ + public int getNamesCount() { + return names_.size(); + } + /** + * + * + *
+     * Required. The names of the versions to delete.
+     * A maximum of 10000 versions can be deleted in a batch.
+     * 
+ * + * + * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The names at the given index. + */ + public java.lang.String getNames(int index) { + return names_.get(index); + } + /** + * + * + *
+     * Required. The names of the versions to delete.
+     * A maximum of 10000 versions can be deleted in a batch.
+     * 
+ * + * + * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the names at the given index. + */ + public com.google.protobuf.ByteString getNamesBytes(int index) { + return names_.getByteString(index); + } + /** + * + * + *
+     * Required. The names of the versions to delete.
+     * A maximum of 10000 versions can be deleted in a batch.
+     * 
+ * + * + * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index to set the value at. + * @param value The names to set. + * @return This builder for chaining. + */ + public Builder setNames(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureNamesIsMutable(); + names_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The names of the versions to delete.
+     * A maximum of 10000 versions can be deleted in a batch.
+     * 
+ * + * + * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The names to add. + * @return This builder for chaining. + */ + public Builder addNames(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureNamesIsMutable(); + names_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The names of the versions to delete.
+     * A maximum of 10000 versions can be deleted in a batch.
+     * 
+ * + * + * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param values The names to add. + * @return This builder for chaining. + */ + public Builder addAllNames(java.lang.Iterable values) { + ensureNamesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, names_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The names of the versions to delete.
+     * A maximum of 10000 versions can be deleted in a batch.
+     * 
+ * + * + * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearNames() { + names_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The names of the versions to delete.
+     * A maximum of 10000 versions can be deleted in a batch.
+     * 
+ * + * + * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes of the names to add. + * @return This builder for chaining. + */ + public Builder addNamesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureNamesIsMutable(); + names_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private boolean validateOnly_; + /** + * + * + *
+     * If true, the request is performed without deleting data, following AIP-163.
+     * 
+ * + * bool validate_only = 3; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + /** + * + * + *
+     * If true, the request is performed without deleting data, following AIP-163.
+     * 
+ * + * bool validate_only = 3; + * + * @param value The validateOnly to set. + * @return This builder for chaining. + */ + public Builder setValidateOnly(boolean value) { + + validateOnly_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * If true, the request is performed without deleting data, following AIP-163.
+     * 
+ * + * bool validate_only = 3; + * + * @return This builder for chaining. + */ + public Builder clearValidateOnly() { + bitField0_ = (bitField0_ & ~0x00000004); + validateOnly_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest) + } + + // @@protoc_insertion_point(class_scope:google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest) + private static final com.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest(); + } + + public static com.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchDeleteVersionsRequest 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.BatchDeleteVersionsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/BatchDeleteVersionsRequestOrBuilder.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/BatchDeleteVersionsRequestOrBuilder.java new file mode 100644 index 000000000000..28f761337a2f --- /dev/null +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/BatchDeleteVersionsRequestOrBuilder.java @@ -0,0 +1,126 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 BatchDeleteVersionsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The name of the repository holding all requested versions.
+   * 
+ * + * string parent = 1 [(.google.api.resource_reference) = { ... } + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * The name of the repository holding all requested versions.
+   * 
+ * + * string parent = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The names of the versions to delete.
+   * A maximum of 10000 versions can be deleted in a batch.
+   * 
+ * + * + * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the names. + */ + java.util.List getNamesList(); + /** + * + * + *
+   * Required. The names of the versions to delete.
+   * A maximum of 10000 versions can be deleted in a batch.
+   * 
+ * + * + * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The count of names. + */ + int getNamesCount(); + /** + * + * + *
+   * Required. The names of the versions to delete.
+   * A maximum of 10000 versions can be deleted in a batch.
+   * 
+ * + * + * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The names at the given index. + */ + java.lang.String getNames(int index); + /** + * + * + *
+   * Required. The names of the versions to delete.
+   * A maximum of 10000 versions can be deleted in a batch.
+   * 
+ * + * + * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the names at the given index. + */ + com.google.protobuf.ByteString getNamesBytes(int index); + + /** + * + * + *
+   * If true, the request is performed without deleting data, following AIP-163.
+   * 
+ * + * bool validate_only = 3; + * + * @return The validateOnly. + */ + boolean getValidateOnly(); +} diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/CleanupPolicy.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/CleanupPolicy.java new file mode 100644 index 000000000000..ba487d457d00 --- /dev/null +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/CleanupPolicy.java @@ -0,0 +1,1684 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/repository.proto + +package com.google.devtools.artifactregistry.v1; + +/** + * + * + *
+ * Artifact policy configuration for repository cleanup policies.
+ * 
+ * + * Protobuf type {@code google.devtools.artifactregistry.v1.CleanupPolicy} + */ +public final class CleanupPolicy extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.devtools.artifactregistry.v1.CleanupPolicy) + CleanupPolicyOrBuilder { + private static final long serialVersionUID = 0L; + // Use CleanupPolicy.newBuilder() to construct. + private CleanupPolicy(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CleanupPolicy() { + id_ = ""; + action_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CleanupPolicy(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_CleanupPolicy_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_CleanupPolicy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devtools.artifactregistry.v1.CleanupPolicy.class, + com.google.devtools.artifactregistry.v1.CleanupPolicy.Builder.class); + } + + /** + * + * + *
+   * Action type for a cleanup policy.
+   * 
+ * + * Protobuf enum {@code google.devtools.artifactregistry.v1.CleanupPolicy.Action} + */ + public enum Action implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Action not specified.
+     * 
+ * + * ACTION_UNSPECIFIED = 0; + */ + ACTION_UNSPECIFIED(0), + /** + * + * + *
+     * Delete action.
+     * 
+ * + * DELETE = 1; + */ + DELETE(1), + /** + * + * + *
+     * Keep action.
+     * 
+ * + * KEEP = 2; + */ + KEEP(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Action not specified.
+     * 
+ * + * ACTION_UNSPECIFIED = 0; + */ + public static final int ACTION_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Delete action.
+     * 
+ * + * DELETE = 1; + */ + public static final int DELETE_VALUE = 1; + /** + * + * + *
+     * Keep action.
+     * 
+ * + * KEEP = 2; + */ + public static final int KEEP_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 Action 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 Action forNumber(int value) { + switch (value) { + case 0: + return ACTION_UNSPECIFIED; + case 1: + return DELETE; + case 2: + return KEEP; + 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 Action findValueByNumber(int number) { + return Action.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.CleanupPolicy.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Action[] VALUES = values(); + + public static Action 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 Action(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.devtools.artifactregistry.v1.CleanupPolicy.Action) + } + + private int conditionTypeCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object conditionType_; + + public enum ConditionTypeCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + CONDITION(2), + MOST_RECENT_VERSIONS(4), + CONDITIONTYPE_NOT_SET(0); + private final int value; + + private ConditionTypeCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ConditionTypeCase valueOf(int value) { + return forNumber(value); + } + + public static ConditionTypeCase forNumber(int value) { + switch (value) { + case 2: + return CONDITION; + case 4: + return MOST_RECENT_VERSIONS; + case 0: + return CONDITIONTYPE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ConditionTypeCase getConditionTypeCase() { + return ConditionTypeCase.forNumber(conditionTypeCase_); + } + + public static final int CONDITION_FIELD_NUMBER = 2; + /** + * + * + *
+   * Policy condition for matching versions.
+   * 
+ * + * .google.devtools.artifactregistry.v1.CleanupPolicyCondition condition = 2; + * + * @return Whether the condition field is set. + */ + @java.lang.Override + public boolean hasCondition() { + return conditionTypeCase_ == 2; + } + /** + * + * + *
+   * Policy condition for matching versions.
+   * 
+ * + * .google.devtools.artifactregistry.v1.CleanupPolicyCondition condition = 2; + * + * @return The condition. + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.CleanupPolicyCondition getCondition() { + if (conditionTypeCase_ == 2) { + return (com.google.devtools.artifactregistry.v1.CleanupPolicyCondition) conditionType_; + } + return com.google.devtools.artifactregistry.v1.CleanupPolicyCondition.getDefaultInstance(); + } + /** + * + * + *
+   * Policy condition for matching versions.
+   * 
+ * + * .google.devtools.artifactregistry.v1.CleanupPolicyCondition condition = 2; + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.CleanupPolicyConditionOrBuilder + getConditionOrBuilder() { + if (conditionTypeCase_ == 2) { + return (com.google.devtools.artifactregistry.v1.CleanupPolicyCondition) conditionType_; + } + return com.google.devtools.artifactregistry.v1.CleanupPolicyCondition.getDefaultInstance(); + } + + public static final int MOST_RECENT_VERSIONS_FIELD_NUMBER = 4; + /** + * + * + *
+   * Policy condition for retaining a minimum number of versions. May only be
+   * specified with a Keep action.
+   * 
+ * + * + * .google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions most_recent_versions = 4; + * + * + * @return Whether the mostRecentVersions field is set. + */ + @java.lang.Override + public boolean hasMostRecentVersions() { + return conditionTypeCase_ == 4; + } + /** + * + * + *
+   * Policy condition for retaining a minimum number of versions. May only be
+   * specified with a Keep action.
+   * 
+ * + * + * .google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions most_recent_versions = 4; + * + * + * @return The mostRecentVersions. + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions + getMostRecentVersions() { + if (conditionTypeCase_ == 4) { + return (com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions) + conditionType_; + } + return com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions + .getDefaultInstance(); + } + /** + * + * + *
+   * Policy condition for retaining a minimum number of versions. May only be
+   * specified with a Keep action.
+   * 
+ * + * + * .google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions most_recent_versions = 4; + * + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersionsOrBuilder + getMostRecentVersionsOrBuilder() { + if (conditionTypeCase_ == 4) { + return (com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions) + conditionType_; + } + return com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions + .getDefaultInstance(); + } + + public static final int ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + * + * + *
+   * The user-provided ID of the cleanup policy.
+   * 
+ * + * string id = 1; + * + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + * + * + *
+   * The user-provided ID of the cleanup policy.
+   * 
+ * + * string id = 1; + * + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ACTION_FIELD_NUMBER = 3; + private int action_ = 0; + /** + * + * + *
+   * Policy action.
+   * 
+ * + * .google.devtools.artifactregistry.v1.CleanupPolicy.Action action = 3; + * + * @return The enum numeric value on the wire for action. + */ + @java.lang.Override + public int getActionValue() { + return action_; + } + /** + * + * + *
+   * Policy action.
+   * 
+ * + * .google.devtools.artifactregistry.v1.CleanupPolicy.Action action = 3; + * + * @return The action. + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.CleanupPolicy.Action getAction() { + com.google.devtools.artifactregistry.v1.CleanupPolicy.Action result = + com.google.devtools.artifactregistry.v1.CleanupPolicy.Action.forNumber(action_); + return result == null + ? com.google.devtools.artifactregistry.v1.CleanupPolicy.Action.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(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + if (conditionTypeCase_ == 2) { + output.writeMessage( + 2, (com.google.devtools.artifactregistry.v1.CleanupPolicyCondition) conditionType_); + } + if (action_ + != com.google.devtools.artifactregistry.v1.CleanupPolicy.Action.ACTION_UNSPECIFIED + .getNumber()) { + output.writeEnum(3, action_); + } + if (conditionTypeCase_ == 4) { + output.writeMessage( + 4, + (com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions) conditionType_); + } + 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(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + if (conditionTypeCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.devtools.artifactregistry.v1.CleanupPolicyCondition) conditionType_); + } + if (action_ + != com.google.devtools.artifactregistry.v1.CleanupPolicy.Action.ACTION_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, action_); + } + if (conditionTypeCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, + (com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions) + conditionType_); + } + 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.CleanupPolicy)) { + return super.equals(obj); + } + com.google.devtools.artifactregistry.v1.CleanupPolicy other = + (com.google.devtools.artifactregistry.v1.CleanupPolicy) obj; + + if (!getId().equals(other.getId())) return false; + if (action_ != other.action_) return false; + if (!getConditionTypeCase().equals(other.getConditionTypeCase())) return false; + switch (conditionTypeCase_) { + case 2: + if (!getCondition().equals(other.getCondition())) return false; + break; + case 4: + if (!getMostRecentVersions().equals(other.getMostRecentVersions())) return false; + break; + case 0: + default: + } + 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) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (37 * hash) + ACTION_FIELD_NUMBER; + hash = (53 * hash) + action_; + switch (conditionTypeCase_) { + case 2: + hash = (37 * hash) + CONDITION_FIELD_NUMBER; + hash = (53 * hash) + getCondition().hashCode(); + break; + case 4: + hash = (37 * hash) + MOST_RECENT_VERSIONS_FIELD_NUMBER; + hash = (53 * hash) + getMostRecentVersions().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devtools.artifactregistry.v1.CleanupPolicy parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.CleanupPolicy 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.CleanupPolicy parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.CleanupPolicy 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.CleanupPolicy parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.CleanupPolicy 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.CleanupPolicy parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.CleanupPolicy 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.CleanupPolicy parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.CleanupPolicy 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.CleanupPolicy 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.CleanupPolicy 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.CleanupPolicy 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; + } + /** + * + * + *
+   * Artifact policy configuration for repository cleanup policies.
+   * 
+ * + * Protobuf type {@code google.devtools.artifactregistry.v1.CleanupPolicy} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devtools.artifactregistry.v1.CleanupPolicy) + com.google.devtools.artifactregistry.v1.CleanupPolicyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_CleanupPolicy_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_CleanupPolicy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devtools.artifactregistry.v1.CleanupPolicy.class, + com.google.devtools.artifactregistry.v1.CleanupPolicy.Builder.class); + } + + // Construct using com.google.devtools.artifactregistry.v1.CleanupPolicy.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (conditionBuilder_ != null) { + conditionBuilder_.clear(); + } + if (mostRecentVersionsBuilder_ != null) { + mostRecentVersionsBuilder_.clear(); + } + id_ = ""; + action_ = 0; + conditionTypeCase_ = 0; + conditionType_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_CleanupPolicy_descriptor; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.CleanupPolicy getDefaultInstanceForType() { + return com.google.devtools.artifactregistry.v1.CleanupPolicy.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.CleanupPolicy build() { + com.google.devtools.artifactregistry.v1.CleanupPolicy result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.CleanupPolicy buildPartial() { + com.google.devtools.artifactregistry.v1.CleanupPolicy result = + new com.google.devtools.artifactregistry.v1.CleanupPolicy(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.devtools.artifactregistry.v1.CleanupPolicy result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.id_ = id_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.action_ = action_; + } + } + + private void buildPartialOneofs(com.google.devtools.artifactregistry.v1.CleanupPolicy result) { + result.conditionTypeCase_ = conditionTypeCase_; + result.conditionType_ = this.conditionType_; + if (conditionTypeCase_ == 2 && conditionBuilder_ != null) { + result.conditionType_ = conditionBuilder_.build(); + } + if (conditionTypeCase_ == 4 && mostRecentVersionsBuilder_ != null) { + result.conditionType_ = mostRecentVersionsBuilder_.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.CleanupPolicy) { + return mergeFrom((com.google.devtools.artifactregistry.v1.CleanupPolicy) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.devtools.artifactregistry.v1.CleanupPolicy other) { + if (other == com.google.devtools.artifactregistry.v1.CleanupPolicy.getDefaultInstance()) + return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.action_ != 0) { + setActionValue(other.getActionValue()); + } + switch (other.getConditionTypeCase()) { + case CONDITION: + { + mergeCondition(other.getCondition()); + break; + } + case MOST_RECENT_VERSIONS: + { + mergeMostRecentVersions(other.getMostRecentVersions()); + break; + } + case CONDITIONTYPE_NOT_SET: + { + break; + } + } + 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: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 10 + case 18: + { + input.readMessage(getConditionFieldBuilder().getBuilder(), extensionRegistry); + conditionTypeCase_ = 2; + break; + } // case 18 + case 24: + { + action_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 24 + case 34: + { + input.readMessage( + getMostRecentVersionsFieldBuilder().getBuilder(), extensionRegistry); + conditionTypeCase_ = 4; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int conditionTypeCase_ = 0; + private java.lang.Object conditionType_; + + public ConditionTypeCase getConditionTypeCase() { + return ConditionTypeCase.forNumber(conditionTypeCase_); + } + + public Builder clearConditionType() { + conditionTypeCase_ = 0; + conditionType_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.devtools.artifactregistry.v1.CleanupPolicyCondition, + com.google.devtools.artifactregistry.v1.CleanupPolicyCondition.Builder, + com.google.devtools.artifactregistry.v1.CleanupPolicyConditionOrBuilder> + conditionBuilder_; + /** + * + * + *
+     * Policy condition for matching versions.
+     * 
+ * + * .google.devtools.artifactregistry.v1.CleanupPolicyCondition condition = 2; + * + * @return Whether the condition field is set. + */ + @java.lang.Override + public boolean hasCondition() { + return conditionTypeCase_ == 2; + } + /** + * + * + *
+     * Policy condition for matching versions.
+     * 
+ * + * .google.devtools.artifactregistry.v1.CleanupPolicyCondition condition = 2; + * + * @return The condition. + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.CleanupPolicyCondition getCondition() { + if (conditionBuilder_ == null) { + if (conditionTypeCase_ == 2) { + return (com.google.devtools.artifactregistry.v1.CleanupPolicyCondition) conditionType_; + } + return com.google.devtools.artifactregistry.v1.CleanupPolicyCondition.getDefaultInstance(); + } else { + if (conditionTypeCase_ == 2) { + return conditionBuilder_.getMessage(); + } + return com.google.devtools.artifactregistry.v1.CleanupPolicyCondition.getDefaultInstance(); + } + } + /** + * + * + *
+     * Policy condition for matching versions.
+     * 
+ * + * .google.devtools.artifactregistry.v1.CleanupPolicyCondition condition = 2; + */ + public Builder setCondition( + com.google.devtools.artifactregistry.v1.CleanupPolicyCondition value) { + if (conditionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + conditionType_ = value; + onChanged(); + } else { + conditionBuilder_.setMessage(value); + } + conditionTypeCase_ = 2; + return this; + } + /** + * + * + *
+     * Policy condition for matching versions.
+     * 
+ * + * .google.devtools.artifactregistry.v1.CleanupPolicyCondition condition = 2; + */ + public Builder setCondition( + com.google.devtools.artifactregistry.v1.CleanupPolicyCondition.Builder builderForValue) { + if (conditionBuilder_ == null) { + conditionType_ = builderForValue.build(); + onChanged(); + } else { + conditionBuilder_.setMessage(builderForValue.build()); + } + conditionTypeCase_ = 2; + return this; + } + /** + * + * + *
+     * Policy condition for matching versions.
+     * 
+ * + * .google.devtools.artifactregistry.v1.CleanupPolicyCondition condition = 2; + */ + public Builder mergeCondition( + com.google.devtools.artifactregistry.v1.CleanupPolicyCondition value) { + if (conditionBuilder_ == null) { + if (conditionTypeCase_ == 2 + && conditionType_ + != com.google.devtools.artifactregistry.v1.CleanupPolicyCondition + .getDefaultInstance()) { + conditionType_ = + com.google.devtools.artifactregistry.v1.CleanupPolicyCondition.newBuilder( + (com.google.devtools.artifactregistry.v1.CleanupPolicyCondition) + conditionType_) + .mergeFrom(value) + .buildPartial(); + } else { + conditionType_ = value; + } + onChanged(); + } else { + if (conditionTypeCase_ == 2) { + conditionBuilder_.mergeFrom(value); + } else { + conditionBuilder_.setMessage(value); + } + } + conditionTypeCase_ = 2; + return this; + } + /** + * + * + *
+     * Policy condition for matching versions.
+     * 
+ * + * .google.devtools.artifactregistry.v1.CleanupPolicyCondition condition = 2; + */ + public Builder clearCondition() { + if (conditionBuilder_ == null) { + if (conditionTypeCase_ == 2) { + conditionTypeCase_ = 0; + conditionType_ = null; + onChanged(); + } + } else { + if (conditionTypeCase_ == 2) { + conditionTypeCase_ = 0; + conditionType_ = null; + } + conditionBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Policy condition for matching versions.
+     * 
+ * + * .google.devtools.artifactregistry.v1.CleanupPolicyCondition condition = 2; + */ + public com.google.devtools.artifactregistry.v1.CleanupPolicyCondition.Builder + getConditionBuilder() { + return getConditionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Policy condition for matching versions.
+     * 
+ * + * .google.devtools.artifactregistry.v1.CleanupPolicyCondition condition = 2; + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.CleanupPolicyConditionOrBuilder + getConditionOrBuilder() { + if ((conditionTypeCase_ == 2) && (conditionBuilder_ != null)) { + return conditionBuilder_.getMessageOrBuilder(); + } else { + if (conditionTypeCase_ == 2) { + return (com.google.devtools.artifactregistry.v1.CleanupPolicyCondition) conditionType_; + } + return com.google.devtools.artifactregistry.v1.CleanupPolicyCondition.getDefaultInstance(); + } + } + /** + * + * + *
+     * Policy condition for matching versions.
+     * 
+ * + * .google.devtools.artifactregistry.v1.CleanupPolicyCondition condition = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.devtools.artifactregistry.v1.CleanupPolicyCondition, + com.google.devtools.artifactregistry.v1.CleanupPolicyCondition.Builder, + com.google.devtools.artifactregistry.v1.CleanupPolicyConditionOrBuilder> + getConditionFieldBuilder() { + if (conditionBuilder_ == null) { + if (!(conditionTypeCase_ == 2)) { + conditionType_ = + com.google.devtools.artifactregistry.v1.CleanupPolicyCondition.getDefaultInstance(); + } + conditionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.devtools.artifactregistry.v1.CleanupPolicyCondition, + com.google.devtools.artifactregistry.v1.CleanupPolicyCondition.Builder, + com.google.devtools.artifactregistry.v1.CleanupPolicyConditionOrBuilder>( + (com.google.devtools.artifactregistry.v1.CleanupPolicyCondition) conditionType_, + getParentForChildren(), + isClean()); + conditionType_ = null; + } + conditionTypeCase_ = 2; + onChanged(); + return conditionBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions, + com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions.Builder, + com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersionsOrBuilder> + mostRecentVersionsBuilder_; + /** + * + * + *
+     * Policy condition for retaining a minimum number of versions. May only be
+     * specified with a Keep action.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions most_recent_versions = 4; + * + * + * @return Whether the mostRecentVersions field is set. + */ + @java.lang.Override + public boolean hasMostRecentVersions() { + return conditionTypeCase_ == 4; + } + /** + * + * + *
+     * Policy condition for retaining a minimum number of versions. May only be
+     * specified with a Keep action.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions most_recent_versions = 4; + * + * + * @return The mostRecentVersions. + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions + getMostRecentVersions() { + if (mostRecentVersionsBuilder_ == null) { + if (conditionTypeCase_ == 4) { + return (com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions) + conditionType_; + } + return com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions + .getDefaultInstance(); + } else { + if (conditionTypeCase_ == 4) { + return mostRecentVersionsBuilder_.getMessage(); + } + return com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Policy condition for retaining a minimum number of versions. May only be
+     * specified with a Keep action.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions most_recent_versions = 4; + * + */ + public Builder setMostRecentVersions( + com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions value) { + if (mostRecentVersionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + conditionType_ = value; + onChanged(); + } else { + mostRecentVersionsBuilder_.setMessage(value); + } + conditionTypeCase_ = 4; + return this; + } + /** + * + * + *
+     * Policy condition for retaining a minimum number of versions. May only be
+     * specified with a Keep action.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions most_recent_versions = 4; + * + */ + public Builder setMostRecentVersions( + com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions.Builder + builderForValue) { + if (mostRecentVersionsBuilder_ == null) { + conditionType_ = builderForValue.build(); + onChanged(); + } else { + mostRecentVersionsBuilder_.setMessage(builderForValue.build()); + } + conditionTypeCase_ = 4; + return this; + } + /** + * + * + *
+     * Policy condition for retaining a minimum number of versions. May only be
+     * specified with a Keep action.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions most_recent_versions = 4; + * + */ + public Builder mergeMostRecentVersions( + com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions value) { + if (mostRecentVersionsBuilder_ == null) { + if (conditionTypeCase_ == 4 + && conditionType_ + != com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions + .getDefaultInstance()) { + conditionType_ = + com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions.newBuilder( + (com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions) + conditionType_) + .mergeFrom(value) + .buildPartial(); + } else { + conditionType_ = value; + } + onChanged(); + } else { + if (conditionTypeCase_ == 4) { + mostRecentVersionsBuilder_.mergeFrom(value); + } else { + mostRecentVersionsBuilder_.setMessage(value); + } + } + conditionTypeCase_ = 4; + return this; + } + /** + * + * + *
+     * Policy condition for retaining a minimum number of versions. May only be
+     * specified with a Keep action.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions most_recent_versions = 4; + * + */ + public Builder clearMostRecentVersions() { + if (mostRecentVersionsBuilder_ == null) { + if (conditionTypeCase_ == 4) { + conditionTypeCase_ = 0; + conditionType_ = null; + onChanged(); + } + } else { + if (conditionTypeCase_ == 4) { + conditionTypeCase_ = 0; + conditionType_ = null; + } + mostRecentVersionsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Policy condition for retaining a minimum number of versions. May only be
+     * specified with a Keep action.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions most_recent_versions = 4; + * + */ + public com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions.Builder + getMostRecentVersionsBuilder() { + return getMostRecentVersionsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Policy condition for retaining a minimum number of versions. May only be
+     * specified with a Keep action.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions most_recent_versions = 4; + * + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersionsOrBuilder + getMostRecentVersionsOrBuilder() { + if ((conditionTypeCase_ == 4) && (mostRecentVersionsBuilder_ != null)) { + return mostRecentVersionsBuilder_.getMessageOrBuilder(); + } else { + if (conditionTypeCase_ == 4) { + return (com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions) + conditionType_; + } + return com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Policy condition for retaining a minimum number of versions. May only be
+     * specified with a Keep action.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions most_recent_versions = 4; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions, + com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions.Builder, + com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersionsOrBuilder> + getMostRecentVersionsFieldBuilder() { + if (mostRecentVersionsBuilder_ == null) { + if (!(conditionTypeCase_ == 4)) { + conditionType_ = + com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions + .getDefaultInstance(); + } + mostRecentVersionsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions, + com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions.Builder, + com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersionsOrBuilder>( + (com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions) + conditionType_, + getParentForChildren(), + isClean()); + conditionType_ = null; + } + conditionTypeCase_ = 4; + onChanged(); + return mostRecentVersionsBuilder_; + } + + private java.lang.Object id_ = ""; + /** + * + * + *
+     * The user-provided ID of the cleanup policy.
+     * 
+ * + * string id = 1; + * + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The user-provided ID of the cleanup policy.
+     * 
+ * + * string id = 1; + * + * @return The bytes for id. + */ + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The user-provided ID of the cleanup policy.
+     * 
+ * + * string id = 1; + * + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + id_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The user-provided ID of the cleanup policy.
+     * 
+ * + * string id = 1; + * + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * The user-provided ID of the cleanup policy.
+     * 
+ * + * string id = 1; + * + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private int action_ = 0; + /** + * + * + *
+     * Policy action.
+     * 
+ * + * .google.devtools.artifactregistry.v1.CleanupPolicy.Action action = 3; + * + * @return The enum numeric value on the wire for action. + */ + @java.lang.Override + public int getActionValue() { + return action_; + } + /** + * + * + *
+     * Policy action.
+     * 
+ * + * .google.devtools.artifactregistry.v1.CleanupPolicy.Action action = 3; + * + * @param value The enum numeric value on the wire for action to set. + * @return This builder for chaining. + */ + public Builder setActionValue(int value) { + action_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Policy action.
+     * 
+ * + * .google.devtools.artifactregistry.v1.CleanupPolicy.Action action = 3; + * + * @return The action. + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.CleanupPolicy.Action getAction() { + com.google.devtools.artifactregistry.v1.CleanupPolicy.Action result = + com.google.devtools.artifactregistry.v1.CleanupPolicy.Action.forNumber(action_); + return result == null + ? com.google.devtools.artifactregistry.v1.CleanupPolicy.Action.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Policy action.
+     * 
+ * + * .google.devtools.artifactregistry.v1.CleanupPolicy.Action action = 3; + * + * @param value The action to set. + * @return This builder for chaining. + */ + public Builder setAction(com.google.devtools.artifactregistry.v1.CleanupPolicy.Action value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + action_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Policy action.
+     * 
+ * + * .google.devtools.artifactregistry.v1.CleanupPolicy.Action action = 3; + * + * @return This builder for chaining. + */ + public Builder clearAction() { + bitField0_ = (bitField0_ & ~0x00000008); + action_ = 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.CleanupPolicy) + } + + // @@protoc_insertion_point(class_scope:google.devtools.artifactregistry.v1.CleanupPolicy) + private static final com.google.devtools.artifactregistry.v1.CleanupPolicy DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devtools.artifactregistry.v1.CleanupPolicy(); + } + + public static com.google.devtools.artifactregistry.v1.CleanupPolicy getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CleanupPolicy 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.CleanupPolicy getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/CleanupPolicyCondition.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/CleanupPolicyCondition.java new file mode 100644 index 000000000000..c27a79328636 --- /dev/null +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/CleanupPolicyCondition.java @@ -0,0 +1,2201 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/repository.proto + +package com.google.devtools.artifactregistry.v1; + +/** + * + * + *
+ * CleanupPolicyCondition is a set of conditions attached to a CleanupPolicy.
+ * If multiple entries are set, all must be satisfied for the condition to be
+ * satisfied.
+ * 
+ * + * Protobuf type {@code google.devtools.artifactregistry.v1.CleanupPolicyCondition} + */ +public final class CleanupPolicyCondition extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.devtools.artifactregistry.v1.CleanupPolicyCondition) + CleanupPolicyConditionOrBuilder { + private static final long serialVersionUID = 0L; + // Use CleanupPolicyCondition.newBuilder() to construct. + private CleanupPolicyCondition(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CleanupPolicyCondition() { + tagState_ = 0; + tagPrefixes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + versionNamePrefixes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + packageNamePrefixes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CleanupPolicyCondition(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_CleanupPolicyCondition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_CleanupPolicyCondition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devtools.artifactregistry.v1.CleanupPolicyCondition.class, + com.google.devtools.artifactregistry.v1.CleanupPolicyCondition.Builder.class); + } + + /** + * + * + *
+   * Statuses applying to versions.
+   * 
+ * + * Protobuf enum {@code google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagState} + */ + public enum TagState implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Tag status not specified.
+     * 
+ * + * TAG_STATE_UNSPECIFIED = 0; + */ + TAG_STATE_UNSPECIFIED(0), + /** + * + * + *
+     * Applies to tagged versions only.
+     * 
+ * + * TAGGED = 1; + */ + TAGGED(1), + /** + * + * + *
+     * Applies to untagged versions only.
+     * 
+ * + * UNTAGGED = 2; + */ + UNTAGGED(2), + /** + * + * + *
+     * Applies to all versions.
+     * 
+ * + * ANY = 3; + */ + ANY(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Tag status not specified.
+     * 
+ * + * TAG_STATE_UNSPECIFIED = 0; + */ + public static final int TAG_STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Applies to tagged versions only.
+     * 
+ * + * TAGGED = 1; + */ + public static final int TAGGED_VALUE = 1; + /** + * + * + *
+     * Applies to untagged versions only.
+     * 
+ * + * UNTAGGED = 2; + */ + public static final int UNTAGGED_VALUE = 2; + /** + * + * + *
+     * Applies to all versions.
+     * 
+ * + * ANY = 3; + */ + public static final int ANY_VALUE = 3; + + 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 TagState 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 TagState forNumber(int value) { + switch (value) { + case 0: + return TAG_STATE_UNSPECIFIED; + case 1: + return TAGGED; + case 2: + return UNTAGGED; + case 3: + return ANY; + 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 TagState findValueByNumber(int number) { + return TagState.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.CleanupPolicyCondition.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final TagState[] VALUES = values(); + + public static TagState 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 TagState(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagState) + } + + private int bitField0_; + public static final int TAG_STATE_FIELD_NUMBER = 2; + private int tagState_ = 0; + /** + * + * + *
+   * Match versions by tag status.
+   * 
+ * + * + * optional .google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagState tag_state = 2; + * + * + * @return Whether the tagState field is set. + */ + @java.lang.Override + public boolean hasTagState() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Match versions by tag status.
+   * 
+ * + * + * optional .google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagState tag_state = 2; + * + * + * @return The enum numeric value on the wire for tagState. + */ + @java.lang.Override + public int getTagStateValue() { + return tagState_; + } + /** + * + * + *
+   * Match versions by tag status.
+   * 
+ * + * + * optional .google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagState tag_state = 2; + * + * + * @return The tagState. + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagState getTagState() { + com.google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagState result = + com.google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagState.forNumber( + tagState_); + return result == null + ? com.google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagState.UNRECOGNIZED + : result; + } + + public static final int TAG_PREFIXES_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList tagPrefixes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Match versions by tag prefix. Applied on any prefix match.
+   * 
+ * + * repeated string tag_prefixes = 3; + * + * @return A list containing the tagPrefixes. + */ + public com.google.protobuf.ProtocolStringList getTagPrefixesList() { + return tagPrefixes_; + } + /** + * + * + *
+   * Match versions by tag prefix. Applied on any prefix match.
+   * 
+ * + * repeated string tag_prefixes = 3; + * + * @return The count of tagPrefixes. + */ + public int getTagPrefixesCount() { + return tagPrefixes_.size(); + } + /** + * + * + *
+   * Match versions by tag prefix. Applied on any prefix match.
+   * 
+ * + * repeated string tag_prefixes = 3; + * + * @param index The index of the element to return. + * @return The tagPrefixes at the given index. + */ + public java.lang.String getTagPrefixes(int index) { + return tagPrefixes_.get(index); + } + /** + * + * + *
+   * Match versions by tag prefix. Applied on any prefix match.
+   * 
+ * + * repeated string tag_prefixes = 3; + * + * @param index The index of the value to return. + * @return The bytes of the tagPrefixes at the given index. + */ + public com.google.protobuf.ByteString getTagPrefixesBytes(int index) { + return tagPrefixes_.getByteString(index); + } + + public static final int VERSION_NAME_PREFIXES_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList versionNamePrefixes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Match versions by version name prefix. Applied on any prefix match.
+   * 
+ * + * repeated string version_name_prefixes = 4; + * + * @return A list containing the versionNamePrefixes. + */ + public com.google.protobuf.ProtocolStringList getVersionNamePrefixesList() { + return versionNamePrefixes_; + } + /** + * + * + *
+   * Match versions by version name prefix. Applied on any prefix match.
+   * 
+ * + * repeated string version_name_prefixes = 4; + * + * @return The count of versionNamePrefixes. + */ + public int getVersionNamePrefixesCount() { + return versionNamePrefixes_.size(); + } + /** + * + * + *
+   * Match versions by version name prefix. Applied on any prefix match.
+   * 
+ * + * repeated string version_name_prefixes = 4; + * + * @param index The index of the element to return. + * @return The versionNamePrefixes at the given index. + */ + public java.lang.String getVersionNamePrefixes(int index) { + return versionNamePrefixes_.get(index); + } + /** + * + * + *
+   * Match versions by version name prefix. Applied on any prefix match.
+   * 
+ * + * repeated string version_name_prefixes = 4; + * + * @param index The index of the value to return. + * @return The bytes of the versionNamePrefixes at the given index. + */ + public com.google.protobuf.ByteString getVersionNamePrefixesBytes(int index) { + return versionNamePrefixes_.getByteString(index); + } + + public static final int PACKAGE_NAME_PREFIXES_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList packageNamePrefixes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Match versions by package prefix. Applied on any prefix match.
+   * 
+ * + * repeated string package_name_prefixes = 5; + * + * @return A list containing the packageNamePrefixes. + */ + public com.google.protobuf.ProtocolStringList getPackageNamePrefixesList() { + return packageNamePrefixes_; + } + /** + * + * + *
+   * Match versions by package prefix. Applied on any prefix match.
+   * 
+ * + * repeated string package_name_prefixes = 5; + * + * @return The count of packageNamePrefixes. + */ + public int getPackageNamePrefixesCount() { + return packageNamePrefixes_.size(); + } + /** + * + * + *
+   * Match versions by package prefix. Applied on any prefix match.
+   * 
+ * + * repeated string package_name_prefixes = 5; + * + * @param index The index of the element to return. + * @return The packageNamePrefixes at the given index. + */ + public java.lang.String getPackageNamePrefixes(int index) { + return packageNamePrefixes_.get(index); + } + /** + * + * + *
+   * Match versions by package prefix. Applied on any prefix match.
+   * 
+ * + * repeated string package_name_prefixes = 5; + * + * @param index The index of the value to return. + * @return The bytes of the packageNamePrefixes at the given index. + */ + public com.google.protobuf.ByteString getPackageNamePrefixesBytes(int index) { + return packageNamePrefixes_.getByteString(index); + } + + public static final int OLDER_THAN_FIELD_NUMBER = 6; + private com.google.protobuf.Duration olderThan_; + /** + * + * + *
+   * Match versions older than a duration.
+   * 
+ * + * optional .google.protobuf.Duration older_than = 6; + * + * @return Whether the olderThan field is set. + */ + @java.lang.Override + public boolean hasOlderThan() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Match versions older than a duration.
+   * 
+ * + * optional .google.protobuf.Duration older_than = 6; + * + * @return The olderThan. + */ + @java.lang.Override + public com.google.protobuf.Duration getOlderThan() { + return olderThan_ == null ? com.google.protobuf.Duration.getDefaultInstance() : olderThan_; + } + /** + * + * + *
+   * Match versions older than a duration.
+   * 
+ * + * optional .google.protobuf.Duration older_than = 6; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getOlderThanOrBuilder() { + return olderThan_ == null ? com.google.protobuf.Duration.getDefaultInstance() : olderThan_; + } + + public static final int NEWER_THAN_FIELD_NUMBER = 7; + private com.google.protobuf.Duration newerThan_; + /** + * + * + *
+   * Match versions newer than a duration.
+   * 
+ * + * optional .google.protobuf.Duration newer_than = 7; + * + * @return Whether the newerThan field is set. + */ + @java.lang.Override + public boolean hasNewerThan() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+   * Match versions newer than a duration.
+   * 
+ * + * optional .google.protobuf.Duration newer_than = 7; + * + * @return The newerThan. + */ + @java.lang.Override + public com.google.protobuf.Duration getNewerThan() { + return newerThan_ == null ? com.google.protobuf.Duration.getDefaultInstance() : newerThan_; + } + /** + * + * + *
+   * Match versions newer than a duration.
+   * 
+ * + * optional .google.protobuf.Duration newer_than = 7; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getNewerThanOrBuilder() { + return newerThan_ == null ? com.google.protobuf.Duration.getDefaultInstance() : newerThan_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeEnum(2, tagState_); + } + for (int i = 0; i < tagPrefixes_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, tagPrefixes_.getRaw(i)); + } + for (int i = 0; i < versionNamePrefixes_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, versionNamePrefixes_.getRaw(i)); + } + for (int i = 0; i < packageNamePrefixes_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, packageNamePrefixes_.getRaw(i)); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(6, getOlderThan()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(7, getNewerThan()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, tagState_); + } + { + int dataSize = 0; + for (int i = 0; i < tagPrefixes_.size(); i++) { + dataSize += computeStringSizeNoTag(tagPrefixes_.getRaw(i)); + } + size += dataSize; + size += 1 * getTagPrefixesList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < versionNamePrefixes_.size(); i++) { + dataSize += computeStringSizeNoTag(versionNamePrefixes_.getRaw(i)); + } + size += dataSize; + size += 1 * getVersionNamePrefixesList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < packageNamePrefixes_.size(); i++) { + dataSize += computeStringSizeNoTag(packageNamePrefixes_.getRaw(i)); + } + size += dataSize; + size += 1 * getPackageNamePrefixesList().size(); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getOlderThan()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getNewerThan()); + } + 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.CleanupPolicyCondition)) { + return super.equals(obj); + } + com.google.devtools.artifactregistry.v1.CleanupPolicyCondition other = + (com.google.devtools.artifactregistry.v1.CleanupPolicyCondition) obj; + + if (hasTagState() != other.hasTagState()) return false; + if (hasTagState()) { + if (tagState_ != other.tagState_) return false; + } + if (!getTagPrefixesList().equals(other.getTagPrefixesList())) return false; + if (!getVersionNamePrefixesList().equals(other.getVersionNamePrefixesList())) return false; + if (!getPackageNamePrefixesList().equals(other.getPackageNamePrefixesList())) return false; + if (hasOlderThan() != other.hasOlderThan()) return false; + if (hasOlderThan()) { + if (!getOlderThan().equals(other.getOlderThan())) return false; + } + if (hasNewerThan() != other.hasNewerThan()) return false; + if (hasNewerThan()) { + if (!getNewerThan().equals(other.getNewerThan())) 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 (hasTagState()) { + hash = (37 * hash) + TAG_STATE_FIELD_NUMBER; + hash = (53 * hash) + tagState_; + } + if (getTagPrefixesCount() > 0) { + hash = (37 * hash) + TAG_PREFIXES_FIELD_NUMBER; + hash = (53 * hash) + getTagPrefixesList().hashCode(); + } + if (getVersionNamePrefixesCount() > 0) { + hash = (37 * hash) + VERSION_NAME_PREFIXES_FIELD_NUMBER; + hash = (53 * hash) + getVersionNamePrefixesList().hashCode(); + } + if (getPackageNamePrefixesCount() > 0) { + hash = (37 * hash) + PACKAGE_NAME_PREFIXES_FIELD_NUMBER; + hash = (53 * hash) + getPackageNamePrefixesList().hashCode(); + } + if (hasOlderThan()) { + hash = (37 * hash) + OLDER_THAN_FIELD_NUMBER; + hash = (53 * hash) + getOlderThan().hashCode(); + } + if (hasNewerThan()) { + hash = (37 * hash) + NEWER_THAN_FIELD_NUMBER; + hash = (53 * hash) + getNewerThan().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devtools.artifactregistry.v1.CleanupPolicyCondition parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.CleanupPolicyCondition 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.CleanupPolicyCondition parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.CleanupPolicyCondition 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.CleanupPolicyCondition parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.CleanupPolicyCondition 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.CleanupPolicyCondition parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.CleanupPolicyCondition 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.CleanupPolicyCondition parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.CleanupPolicyCondition 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.CleanupPolicyCondition 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.CleanupPolicyCondition 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.CleanupPolicyCondition 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; + } + /** + * + * + *
+   * CleanupPolicyCondition is a set of conditions attached to a CleanupPolicy.
+   * If multiple entries are set, all must be satisfied for the condition to be
+   * satisfied.
+   * 
+ * + * Protobuf type {@code google.devtools.artifactregistry.v1.CleanupPolicyCondition} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devtools.artifactregistry.v1.CleanupPolicyCondition) + com.google.devtools.artifactregistry.v1.CleanupPolicyConditionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_CleanupPolicyCondition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_CleanupPolicyCondition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devtools.artifactregistry.v1.CleanupPolicyCondition.class, + com.google.devtools.artifactregistry.v1.CleanupPolicyCondition.Builder.class); + } + + // Construct using com.google.devtools.artifactregistry.v1.CleanupPolicyCondition.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getOlderThanFieldBuilder(); + getNewerThanFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + tagState_ = 0; + tagPrefixes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + versionNamePrefixes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + packageNamePrefixes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + olderThan_ = null; + if (olderThanBuilder_ != null) { + olderThanBuilder_.dispose(); + olderThanBuilder_ = null; + } + newerThan_ = null; + if (newerThanBuilder_ != null) { + newerThanBuilder_.dispose(); + newerThanBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_CleanupPolicyCondition_descriptor; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.CleanupPolicyCondition + getDefaultInstanceForType() { + return com.google.devtools.artifactregistry.v1.CleanupPolicyCondition.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.CleanupPolicyCondition build() { + com.google.devtools.artifactregistry.v1.CleanupPolicyCondition result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.CleanupPolicyCondition buildPartial() { + com.google.devtools.artifactregistry.v1.CleanupPolicyCondition result = + new com.google.devtools.artifactregistry.v1.CleanupPolicyCondition(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.devtools.artifactregistry.v1.CleanupPolicyCondition result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.tagState_ = tagState_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + tagPrefixes_.makeImmutable(); + result.tagPrefixes_ = tagPrefixes_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + versionNamePrefixes_.makeImmutable(); + result.versionNamePrefixes_ = versionNamePrefixes_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + packageNamePrefixes_.makeImmutable(); + result.packageNamePrefixes_ = packageNamePrefixes_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.olderThan_ = olderThanBuilder_ == null ? olderThan_ : olderThanBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.newerThan_ = newerThanBuilder_ == null ? newerThan_ : newerThanBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + result.bitField0_ |= to_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.CleanupPolicyCondition) { + return mergeFrom((com.google.devtools.artifactregistry.v1.CleanupPolicyCondition) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.devtools.artifactregistry.v1.CleanupPolicyCondition other) { + if (other + == com.google.devtools.artifactregistry.v1.CleanupPolicyCondition.getDefaultInstance()) + return this; + if (other.hasTagState()) { + setTagState(other.getTagState()); + } + if (!other.tagPrefixes_.isEmpty()) { + if (tagPrefixes_.isEmpty()) { + tagPrefixes_ = other.tagPrefixes_; + bitField0_ |= 0x00000002; + } else { + ensureTagPrefixesIsMutable(); + tagPrefixes_.addAll(other.tagPrefixes_); + } + onChanged(); + } + if (!other.versionNamePrefixes_.isEmpty()) { + if (versionNamePrefixes_.isEmpty()) { + versionNamePrefixes_ = other.versionNamePrefixes_; + bitField0_ |= 0x00000004; + } else { + ensureVersionNamePrefixesIsMutable(); + versionNamePrefixes_.addAll(other.versionNamePrefixes_); + } + onChanged(); + } + if (!other.packageNamePrefixes_.isEmpty()) { + if (packageNamePrefixes_.isEmpty()) { + packageNamePrefixes_ = other.packageNamePrefixes_; + bitField0_ |= 0x00000008; + } else { + ensurePackageNamePrefixesIsMutable(); + packageNamePrefixes_.addAll(other.packageNamePrefixes_); + } + onChanged(); + } + if (other.hasOlderThan()) { + mergeOlderThan(other.getOlderThan()); + } + if (other.hasNewerThan()) { + mergeNewerThan(other.getNewerThan()); + } + 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 16: + { + tagState_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 16 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureTagPrefixesIsMutable(); + tagPrefixes_.add(s); + break; + } // case 26 + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureVersionNamePrefixesIsMutable(); + versionNamePrefixes_.add(s); + break; + } // case 34 + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + ensurePackageNamePrefixesIsMutable(); + packageNamePrefixes_.add(s); + break; + } // case 42 + case 50: + { + input.readMessage(getOlderThanFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 50 + case 58: + { + input.readMessage(getNewerThanFieldBuilder().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 int tagState_ = 0; + /** + * + * + *
+     * Match versions by tag status.
+     * 
+ * + * + * optional .google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagState tag_state = 2; + * + * + * @return Whether the tagState field is set. + */ + @java.lang.Override + public boolean hasTagState() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Match versions by tag status.
+     * 
+ * + * + * optional .google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagState tag_state = 2; + * + * + * @return The enum numeric value on the wire for tagState. + */ + @java.lang.Override + public int getTagStateValue() { + return tagState_; + } + /** + * + * + *
+     * Match versions by tag status.
+     * 
+ * + * + * optional .google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagState tag_state = 2; + * + * + * @param value The enum numeric value on the wire for tagState to set. + * @return This builder for chaining. + */ + public Builder setTagStateValue(int value) { + tagState_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Match versions by tag status.
+     * 
+ * + * + * optional .google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagState tag_state = 2; + * + * + * @return The tagState. + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagState getTagState() { + com.google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagState result = + com.google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagState.forNumber( + tagState_); + return result == null + ? com.google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagState.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Match versions by tag status.
+     * 
+ * + * + * optional .google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagState tag_state = 2; + * + * + * @param value The tagState to set. + * @return This builder for chaining. + */ + public Builder setTagState( + com.google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagState value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + tagState_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Match versions by tag status.
+     * 
+ * + * + * optional .google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagState tag_state = 2; + * + * + * @return This builder for chaining. + */ + public Builder clearTagState() { + bitField0_ = (bitField0_ & ~0x00000001); + tagState_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList tagPrefixes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureTagPrefixesIsMutable() { + if (!tagPrefixes_.isModifiable()) { + tagPrefixes_ = new com.google.protobuf.LazyStringArrayList(tagPrefixes_); + } + bitField0_ |= 0x00000002; + } + /** + * + * + *
+     * Match versions by tag prefix. Applied on any prefix match.
+     * 
+ * + * repeated string tag_prefixes = 3; + * + * @return A list containing the tagPrefixes. + */ + public com.google.protobuf.ProtocolStringList getTagPrefixesList() { + tagPrefixes_.makeImmutable(); + return tagPrefixes_; + } + /** + * + * + *
+     * Match versions by tag prefix. Applied on any prefix match.
+     * 
+ * + * repeated string tag_prefixes = 3; + * + * @return The count of tagPrefixes. + */ + public int getTagPrefixesCount() { + return tagPrefixes_.size(); + } + /** + * + * + *
+     * Match versions by tag prefix. Applied on any prefix match.
+     * 
+ * + * repeated string tag_prefixes = 3; + * + * @param index The index of the element to return. + * @return The tagPrefixes at the given index. + */ + public java.lang.String getTagPrefixes(int index) { + return tagPrefixes_.get(index); + } + /** + * + * + *
+     * Match versions by tag prefix. Applied on any prefix match.
+     * 
+ * + * repeated string tag_prefixes = 3; + * + * @param index The index of the value to return. + * @return The bytes of the tagPrefixes at the given index. + */ + public com.google.protobuf.ByteString getTagPrefixesBytes(int index) { + return tagPrefixes_.getByteString(index); + } + /** + * + * + *
+     * Match versions by tag prefix. Applied on any prefix match.
+     * 
+ * + * repeated string tag_prefixes = 3; + * + * @param index The index to set the value at. + * @param value The tagPrefixes to set. + * @return This builder for chaining. + */ + public Builder setTagPrefixes(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTagPrefixesIsMutable(); + tagPrefixes_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Match versions by tag prefix. Applied on any prefix match.
+     * 
+ * + * repeated string tag_prefixes = 3; + * + * @param value The tagPrefixes to add. + * @return This builder for chaining. + */ + public Builder addTagPrefixes(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTagPrefixesIsMutable(); + tagPrefixes_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Match versions by tag prefix. Applied on any prefix match.
+     * 
+ * + * repeated string tag_prefixes = 3; + * + * @param values The tagPrefixes to add. + * @return This builder for chaining. + */ + public Builder addAllTagPrefixes(java.lang.Iterable values) { + ensureTagPrefixesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, tagPrefixes_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Match versions by tag prefix. Applied on any prefix match.
+     * 
+ * + * repeated string tag_prefixes = 3; + * + * @return This builder for chaining. + */ + public Builder clearTagPrefixes() { + tagPrefixes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Match versions by tag prefix. Applied on any prefix match.
+     * 
+ * + * repeated string tag_prefixes = 3; + * + * @param value The bytes of the tagPrefixes to add. + * @return This builder for chaining. + */ + public Builder addTagPrefixesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureTagPrefixesIsMutable(); + tagPrefixes_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList versionNamePrefixes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureVersionNamePrefixesIsMutable() { + if (!versionNamePrefixes_.isModifiable()) { + versionNamePrefixes_ = new com.google.protobuf.LazyStringArrayList(versionNamePrefixes_); + } + bitField0_ |= 0x00000004; + } + /** + * + * + *
+     * Match versions by version name prefix. Applied on any prefix match.
+     * 
+ * + * repeated string version_name_prefixes = 4; + * + * @return A list containing the versionNamePrefixes. + */ + public com.google.protobuf.ProtocolStringList getVersionNamePrefixesList() { + versionNamePrefixes_.makeImmutable(); + return versionNamePrefixes_; + } + /** + * + * + *
+     * Match versions by version name prefix. Applied on any prefix match.
+     * 
+ * + * repeated string version_name_prefixes = 4; + * + * @return The count of versionNamePrefixes. + */ + public int getVersionNamePrefixesCount() { + return versionNamePrefixes_.size(); + } + /** + * + * + *
+     * Match versions by version name prefix. Applied on any prefix match.
+     * 
+ * + * repeated string version_name_prefixes = 4; + * + * @param index The index of the element to return. + * @return The versionNamePrefixes at the given index. + */ + public java.lang.String getVersionNamePrefixes(int index) { + return versionNamePrefixes_.get(index); + } + /** + * + * + *
+     * Match versions by version name prefix. Applied on any prefix match.
+     * 
+ * + * repeated string version_name_prefixes = 4; + * + * @param index The index of the value to return. + * @return The bytes of the versionNamePrefixes at the given index. + */ + public com.google.protobuf.ByteString getVersionNamePrefixesBytes(int index) { + return versionNamePrefixes_.getByteString(index); + } + /** + * + * + *
+     * Match versions by version name prefix. Applied on any prefix match.
+     * 
+ * + * repeated string version_name_prefixes = 4; + * + * @param index The index to set the value at. + * @param value The versionNamePrefixes to set. + * @return This builder for chaining. + */ + public Builder setVersionNamePrefixes(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureVersionNamePrefixesIsMutable(); + versionNamePrefixes_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Match versions by version name prefix. Applied on any prefix match.
+     * 
+ * + * repeated string version_name_prefixes = 4; + * + * @param value The versionNamePrefixes to add. + * @return This builder for chaining. + */ + public Builder addVersionNamePrefixes(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureVersionNamePrefixesIsMutable(); + versionNamePrefixes_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Match versions by version name prefix. Applied on any prefix match.
+     * 
+ * + * repeated string version_name_prefixes = 4; + * + * @param values The versionNamePrefixes to add. + * @return This builder for chaining. + */ + public Builder addAllVersionNamePrefixes(java.lang.Iterable values) { + ensureVersionNamePrefixesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, versionNamePrefixes_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Match versions by version name prefix. Applied on any prefix match.
+     * 
+ * + * repeated string version_name_prefixes = 4; + * + * @return This builder for chaining. + */ + public Builder clearVersionNamePrefixes() { + versionNamePrefixes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Match versions by version name prefix. Applied on any prefix match.
+     * 
+ * + * repeated string version_name_prefixes = 4; + * + * @param value The bytes of the versionNamePrefixes to add. + * @return This builder for chaining. + */ + public Builder addVersionNamePrefixesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureVersionNamePrefixesIsMutable(); + versionNamePrefixes_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList packageNamePrefixes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensurePackageNamePrefixesIsMutable() { + if (!packageNamePrefixes_.isModifiable()) { + packageNamePrefixes_ = new com.google.protobuf.LazyStringArrayList(packageNamePrefixes_); + } + bitField0_ |= 0x00000008; + } + /** + * + * + *
+     * Match versions by package prefix. Applied on any prefix match.
+     * 
+ * + * repeated string package_name_prefixes = 5; + * + * @return A list containing the packageNamePrefixes. + */ + public com.google.protobuf.ProtocolStringList getPackageNamePrefixesList() { + packageNamePrefixes_.makeImmutable(); + return packageNamePrefixes_; + } + /** + * + * + *
+     * Match versions by package prefix. Applied on any prefix match.
+     * 
+ * + * repeated string package_name_prefixes = 5; + * + * @return The count of packageNamePrefixes. + */ + public int getPackageNamePrefixesCount() { + return packageNamePrefixes_.size(); + } + /** + * + * + *
+     * Match versions by package prefix. Applied on any prefix match.
+     * 
+ * + * repeated string package_name_prefixes = 5; + * + * @param index The index of the element to return. + * @return The packageNamePrefixes at the given index. + */ + public java.lang.String getPackageNamePrefixes(int index) { + return packageNamePrefixes_.get(index); + } + /** + * + * + *
+     * Match versions by package prefix. Applied on any prefix match.
+     * 
+ * + * repeated string package_name_prefixes = 5; + * + * @param index The index of the value to return. + * @return The bytes of the packageNamePrefixes at the given index. + */ + public com.google.protobuf.ByteString getPackageNamePrefixesBytes(int index) { + return packageNamePrefixes_.getByteString(index); + } + /** + * + * + *
+     * Match versions by package prefix. Applied on any prefix match.
+     * 
+ * + * repeated string package_name_prefixes = 5; + * + * @param index The index to set the value at. + * @param value The packageNamePrefixes to set. + * @return This builder for chaining. + */ + public Builder setPackageNamePrefixes(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePackageNamePrefixesIsMutable(); + packageNamePrefixes_.set(index, value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Match versions by package prefix. Applied on any prefix match.
+     * 
+ * + * repeated string package_name_prefixes = 5; + * + * @param value The packageNamePrefixes to add. + * @return This builder for chaining. + */ + public Builder addPackageNamePrefixes(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePackageNamePrefixesIsMutable(); + packageNamePrefixes_.add(value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Match versions by package prefix. Applied on any prefix match.
+     * 
+ * + * repeated string package_name_prefixes = 5; + * + * @param values The packageNamePrefixes to add. + * @return This builder for chaining. + */ + public Builder addAllPackageNamePrefixes(java.lang.Iterable values) { + ensurePackageNamePrefixesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, packageNamePrefixes_); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Match versions by package prefix. Applied on any prefix match.
+     * 
+ * + * repeated string package_name_prefixes = 5; + * + * @return This builder for chaining. + */ + public Builder clearPackageNamePrefixes() { + packageNamePrefixes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Match versions by package prefix. Applied on any prefix match.
+     * 
+ * + * repeated string package_name_prefixes = 5; + * + * @param value The bytes of the packageNamePrefixes to add. + * @return This builder for chaining. + */ + public Builder addPackageNamePrefixesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensurePackageNamePrefixesIsMutable(); + packageNamePrefixes_.add(value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private com.google.protobuf.Duration olderThan_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + olderThanBuilder_; + /** + * + * + *
+     * Match versions older than a duration.
+     * 
+ * + * optional .google.protobuf.Duration older_than = 6; + * + * @return Whether the olderThan field is set. + */ + public boolean hasOlderThan() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * Match versions older than a duration.
+     * 
+ * + * optional .google.protobuf.Duration older_than = 6; + * + * @return The olderThan. + */ + public com.google.protobuf.Duration getOlderThan() { + if (olderThanBuilder_ == null) { + return olderThan_ == null ? com.google.protobuf.Duration.getDefaultInstance() : olderThan_; + } else { + return olderThanBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Match versions older than a duration.
+     * 
+ * + * optional .google.protobuf.Duration older_than = 6; + */ + public Builder setOlderThan(com.google.protobuf.Duration value) { + if (olderThanBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + olderThan_ = value; + } else { + olderThanBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Match versions older than a duration.
+     * 
+ * + * optional .google.protobuf.Duration older_than = 6; + */ + public Builder setOlderThan(com.google.protobuf.Duration.Builder builderForValue) { + if (olderThanBuilder_ == null) { + olderThan_ = builderForValue.build(); + } else { + olderThanBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Match versions older than a duration.
+     * 
+ * + * optional .google.protobuf.Duration older_than = 6; + */ + public Builder mergeOlderThan(com.google.protobuf.Duration value) { + if (olderThanBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && olderThan_ != null + && olderThan_ != com.google.protobuf.Duration.getDefaultInstance()) { + getOlderThanBuilder().mergeFrom(value); + } else { + olderThan_ = value; + } + } else { + olderThanBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Match versions older than a duration.
+     * 
+ * + * optional .google.protobuf.Duration older_than = 6; + */ + public Builder clearOlderThan() { + bitField0_ = (bitField0_ & ~0x00000010); + olderThan_ = null; + if (olderThanBuilder_ != null) { + olderThanBuilder_.dispose(); + olderThanBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Match versions older than a duration.
+     * 
+ * + * optional .google.protobuf.Duration older_than = 6; + */ + public com.google.protobuf.Duration.Builder getOlderThanBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getOlderThanFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Match versions older than a duration.
+     * 
+ * + * optional .google.protobuf.Duration older_than = 6; + */ + public com.google.protobuf.DurationOrBuilder getOlderThanOrBuilder() { + if (olderThanBuilder_ != null) { + return olderThanBuilder_.getMessageOrBuilder(); + } else { + return olderThan_ == null ? com.google.protobuf.Duration.getDefaultInstance() : olderThan_; + } + } + /** + * + * + *
+     * Match versions older than a duration.
+     * 
+ * + * optional .google.protobuf.Duration older_than = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getOlderThanFieldBuilder() { + if (olderThanBuilder_ == null) { + olderThanBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getOlderThan(), getParentForChildren(), isClean()); + olderThan_ = null; + } + return olderThanBuilder_; + } + + private com.google.protobuf.Duration newerThan_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + newerThanBuilder_; + /** + * + * + *
+     * Match versions newer than a duration.
+     * 
+ * + * optional .google.protobuf.Duration newer_than = 7; + * + * @return Whether the newerThan field is set. + */ + public boolean hasNewerThan() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+     * Match versions newer than a duration.
+     * 
+ * + * optional .google.protobuf.Duration newer_than = 7; + * + * @return The newerThan. + */ + public com.google.protobuf.Duration getNewerThan() { + if (newerThanBuilder_ == null) { + return newerThan_ == null ? com.google.protobuf.Duration.getDefaultInstance() : newerThan_; + } else { + return newerThanBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Match versions newer than a duration.
+     * 
+ * + * optional .google.protobuf.Duration newer_than = 7; + */ + public Builder setNewerThan(com.google.protobuf.Duration value) { + if (newerThanBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + newerThan_ = value; + } else { + newerThanBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Match versions newer than a duration.
+     * 
+ * + * optional .google.protobuf.Duration newer_than = 7; + */ + public Builder setNewerThan(com.google.protobuf.Duration.Builder builderForValue) { + if (newerThanBuilder_ == null) { + newerThan_ = builderForValue.build(); + } else { + newerThanBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Match versions newer than a duration.
+     * 
+ * + * optional .google.protobuf.Duration newer_than = 7; + */ + public Builder mergeNewerThan(com.google.protobuf.Duration value) { + if (newerThanBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && newerThan_ != null + && newerThan_ != com.google.protobuf.Duration.getDefaultInstance()) { + getNewerThanBuilder().mergeFrom(value); + } else { + newerThan_ = value; + } + } else { + newerThanBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Match versions newer than a duration.
+     * 
+ * + * optional .google.protobuf.Duration newer_than = 7; + */ + public Builder clearNewerThan() { + bitField0_ = (bitField0_ & ~0x00000020); + newerThan_ = null; + if (newerThanBuilder_ != null) { + newerThanBuilder_.dispose(); + newerThanBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Match versions newer than a duration.
+     * 
+ * + * optional .google.protobuf.Duration newer_than = 7; + */ + public com.google.protobuf.Duration.Builder getNewerThanBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getNewerThanFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Match versions newer than a duration.
+     * 
+ * + * optional .google.protobuf.Duration newer_than = 7; + */ + public com.google.protobuf.DurationOrBuilder getNewerThanOrBuilder() { + if (newerThanBuilder_ != null) { + return newerThanBuilder_.getMessageOrBuilder(); + } else { + return newerThan_ == null ? com.google.protobuf.Duration.getDefaultInstance() : newerThan_; + } + } + /** + * + * + *
+     * Match versions newer than a duration.
+     * 
+ * + * optional .google.protobuf.Duration newer_than = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getNewerThanFieldBuilder() { + if (newerThanBuilder_ == null) { + newerThanBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getNewerThan(), getParentForChildren(), isClean()); + newerThan_ = null; + } + return newerThanBuilder_; + } + + @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.CleanupPolicyCondition) + } + + // @@protoc_insertion_point(class_scope:google.devtools.artifactregistry.v1.CleanupPolicyCondition) + private static final com.google.devtools.artifactregistry.v1.CleanupPolicyCondition + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devtools.artifactregistry.v1.CleanupPolicyCondition(); + } + + public static com.google.devtools.artifactregistry.v1.CleanupPolicyCondition + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CleanupPolicyCondition 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.CleanupPolicyCondition + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/CleanupPolicyConditionOrBuilder.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/CleanupPolicyConditionOrBuilder.java new file mode 100644 index 000000000000..c993333ba263 --- /dev/null +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/CleanupPolicyConditionOrBuilder.java @@ -0,0 +1,291 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/repository.proto + +package com.google.devtools.artifactregistry.v1; + +public interface CleanupPolicyConditionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devtools.artifactregistry.v1.CleanupPolicyCondition) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Match versions by tag status.
+   * 
+ * + * + * optional .google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagState tag_state = 2; + * + * + * @return Whether the tagState field is set. + */ + boolean hasTagState(); + /** + * + * + *
+   * Match versions by tag status.
+   * 
+ * + * + * optional .google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagState tag_state = 2; + * + * + * @return The enum numeric value on the wire for tagState. + */ + int getTagStateValue(); + /** + * + * + *
+   * Match versions by tag status.
+   * 
+ * + * + * optional .google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagState tag_state = 2; + * + * + * @return The tagState. + */ + com.google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagState getTagState(); + + /** + * + * + *
+   * Match versions by tag prefix. Applied on any prefix match.
+   * 
+ * + * repeated string tag_prefixes = 3; + * + * @return A list containing the tagPrefixes. + */ + java.util.List getTagPrefixesList(); + /** + * + * + *
+   * Match versions by tag prefix. Applied on any prefix match.
+   * 
+ * + * repeated string tag_prefixes = 3; + * + * @return The count of tagPrefixes. + */ + int getTagPrefixesCount(); + /** + * + * + *
+   * Match versions by tag prefix. Applied on any prefix match.
+   * 
+ * + * repeated string tag_prefixes = 3; + * + * @param index The index of the element to return. + * @return The tagPrefixes at the given index. + */ + java.lang.String getTagPrefixes(int index); + /** + * + * + *
+   * Match versions by tag prefix. Applied on any prefix match.
+   * 
+ * + * repeated string tag_prefixes = 3; + * + * @param index The index of the value to return. + * @return The bytes of the tagPrefixes at the given index. + */ + com.google.protobuf.ByteString getTagPrefixesBytes(int index); + + /** + * + * + *
+   * Match versions by version name prefix. Applied on any prefix match.
+   * 
+ * + * repeated string version_name_prefixes = 4; + * + * @return A list containing the versionNamePrefixes. + */ + java.util.List getVersionNamePrefixesList(); + /** + * + * + *
+   * Match versions by version name prefix. Applied on any prefix match.
+   * 
+ * + * repeated string version_name_prefixes = 4; + * + * @return The count of versionNamePrefixes. + */ + int getVersionNamePrefixesCount(); + /** + * + * + *
+   * Match versions by version name prefix. Applied on any prefix match.
+   * 
+ * + * repeated string version_name_prefixes = 4; + * + * @param index The index of the element to return. + * @return The versionNamePrefixes at the given index. + */ + java.lang.String getVersionNamePrefixes(int index); + /** + * + * + *
+   * Match versions by version name prefix. Applied on any prefix match.
+   * 
+ * + * repeated string version_name_prefixes = 4; + * + * @param index The index of the value to return. + * @return The bytes of the versionNamePrefixes at the given index. + */ + com.google.protobuf.ByteString getVersionNamePrefixesBytes(int index); + + /** + * + * + *
+   * Match versions by package prefix. Applied on any prefix match.
+   * 
+ * + * repeated string package_name_prefixes = 5; + * + * @return A list containing the packageNamePrefixes. + */ + java.util.List getPackageNamePrefixesList(); + /** + * + * + *
+   * Match versions by package prefix. Applied on any prefix match.
+   * 
+ * + * repeated string package_name_prefixes = 5; + * + * @return The count of packageNamePrefixes. + */ + int getPackageNamePrefixesCount(); + /** + * + * + *
+   * Match versions by package prefix. Applied on any prefix match.
+   * 
+ * + * repeated string package_name_prefixes = 5; + * + * @param index The index of the element to return. + * @return The packageNamePrefixes at the given index. + */ + java.lang.String getPackageNamePrefixes(int index); + /** + * + * + *
+   * Match versions by package prefix. Applied on any prefix match.
+   * 
+ * + * repeated string package_name_prefixes = 5; + * + * @param index The index of the value to return. + * @return The bytes of the packageNamePrefixes at the given index. + */ + com.google.protobuf.ByteString getPackageNamePrefixesBytes(int index); + + /** + * + * + *
+   * Match versions older than a duration.
+   * 
+ * + * optional .google.protobuf.Duration older_than = 6; + * + * @return Whether the olderThan field is set. + */ + boolean hasOlderThan(); + /** + * + * + *
+   * Match versions older than a duration.
+   * 
+ * + * optional .google.protobuf.Duration older_than = 6; + * + * @return The olderThan. + */ + com.google.protobuf.Duration getOlderThan(); + /** + * + * + *
+   * Match versions older than a duration.
+   * 
+ * + * optional .google.protobuf.Duration older_than = 6; + */ + com.google.protobuf.DurationOrBuilder getOlderThanOrBuilder(); + + /** + * + * + *
+   * Match versions newer than a duration.
+   * 
+ * + * optional .google.protobuf.Duration newer_than = 7; + * + * @return Whether the newerThan field is set. + */ + boolean hasNewerThan(); + /** + * + * + *
+   * Match versions newer than a duration.
+   * 
+ * + * optional .google.protobuf.Duration newer_than = 7; + * + * @return The newerThan. + */ + com.google.protobuf.Duration getNewerThan(); + /** + * + * + *
+   * Match versions newer than a duration.
+   * 
+ * + * optional .google.protobuf.Duration newer_than = 7; + */ + com.google.protobuf.DurationOrBuilder getNewerThanOrBuilder(); +} diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/CleanupPolicyMostRecentVersions.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/CleanupPolicyMostRecentVersions.java new file mode 100644 index 000000000000..4bdded7687f5 --- /dev/null +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/CleanupPolicyMostRecentVersions.java @@ -0,0 +1,870 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/repository.proto + +package com.google.devtools.artifactregistry.v1; + +/** + * + * + *
+ * CleanupPolicyMostRecentVersions is an alternate condition of a CleanupPolicy
+ * for retaining a minimum number of versions.
+ * 
+ * + * Protobuf type {@code google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions} + */ +public final class CleanupPolicyMostRecentVersions extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions) + CleanupPolicyMostRecentVersionsOrBuilder { + private static final long serialVersionUID = 0L; + // Use CleanupPolicyMostRecentVersions.newBuilder() to construct. + private CleanupPolicyMostRecentVersions( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CleanupPolicyMostRecentVersions() { + packageNamePrefixes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CleanupPolicyMostRecentVersions(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_CleanupPolicyMostRecentVersions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_CleanupPolicyMostRecentVersions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions.class, + com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions.Builder.class); + } + + private int bitField0_; + public static final int PACKAGE_NAME_PREFIXES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList packageNamePrefixes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * List of package name prefixes that will apply this rule.
+   * 
+ * + * repeated string package_name_prefixes = 1; + * + * @return A list containing the packageNamePrefixes. + */ + public com.google.protobuf.ProtocolStringList getPackageNamePrefixesList() { + return packageNamePrefixes_; + } + /** + * + * + *
+   * List of package name prefixes that will apply this rule.
+   * 
+ * + * repeated string package_name_prefixes = 1; + * + * @return The count of packageNamePrefixes. + */ + public int getPackageNamePrefixesCount() { + return packageNamePrefixes_.size(); + } + /** + * + * + *
+   * List of package name prefixes that will apply this rule.
+   * 
+ * + * repeated string package_name_prefixes = 1; + * + * @param index The index of the element to return. + * @return The packageNamePrefixes at the given index. + */ + public java.lang.String getPackageNamePrefixes(int index) { + return packageNamePrefixes_.get(index); + } + /** + * + * + *
+   * List of package name prefixes that will apply this rule.
+   * 
+ * + * repeated string package_name_prefixes = 1; + * + * @param index The index of the value to return. + * @return The bytes of the packageNamePrefixes at the given index. + */ + public com.google.protobuf.ByteString getPackageNamePrefixesBytes(int index) { + return packageNamePrefixes_.getByteString(index); + } + + public static final int KEEP_COUNT_FIELD_NUMBER = 2; + private int keepCount_ = 0; + /** + * + * + *
+   * Minimum number of versions to keep.
+   * 
+ * + * optional int32 keep_count = 2; + * + * @return Whether the keepCount field is set. + */ + @java.lang.Override + public boolean hasKeepCount() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Minimum number of versions to keep.
+   * 
+ * + * optional int32 keep_count = 2; + * + * @return The keepCount. + */ + @java.lang.Override + public int getKeepCount() { + return keepCount_; + } + + 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 < packageNamePrefixes_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, packageNamePrefixes_.getRaw(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeInt32(2, keepCount_); + } + 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 < packageNamePrefixes_.size(); i++) { + dataSize += computeStringSizeNoTag(packageNamePrefixes_.getRaw(i)); + } + size += dataSize; + size += 1 * getPackageNamePrefixesList().size(); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, keepCount_); + } + 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.CleanupPolicyMostRecentVersions)) { + return super.equals(obj); + } + com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions other = + (com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions) obj; + + if (!getPackageNamePrefixesList().equals(other.getPackageNamePrefixesList())) return false; + if (hasKeepCount() != other.hasKeepCount()) return false; + if (hasKeepCount()) { + if (getKeepCount() != other.getKeepCount()) 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 (getPackageNamePrefixesCount() > 0) { + hash = (37 * hash) + PACKAGE_NAME_PREFIXES_FIELD_NUMBER; + hash = (53 * hash) + getPackageNamePrefixesList().hashCode(); + } + if (hasKeepCount()) { + hash = (37 * hash) + KEEP_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getKeepCount(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions 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.CleanupPolicyMostRecentVersions parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions 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.CleanupPolicyMostRecentVersions parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions 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.CleanupPolicyMostRecentVersions parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions 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.CleanupPolicyMostRecentVersions + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions + 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.CleanupPolicyMostRecentVersions 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.CleanupPolicyMostRecentVersions 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.CleanupPolicyMostRecentVersions 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; + } + /** + * + * + *
+   * CleanupPolicyMostRecentVersions is an alternate condition of a CleanupPolicy
+   * for retaining a minimum number of versions.
+   * 
+ * + * Protobuf type {@code google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions) + com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersionsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_CleanupPolicyMostRecentVersions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_CleanupPolicyMostRecentVersions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions.class, + com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions.Builder + .class); + } + + // Construct using + // com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + packageNamePrefixes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + keepCount_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_CleanupPolicyMostRecentVersions_descriptor; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions + getDefaultInstanceForType() { + return com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions build() { + com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions buildPartial() { + com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions result = + new com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + packageNamePrefixes_.makeImmutable(); + result.packageNamePrefixes_ = packageNamePrefixes_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.keepCount_ = keepCount_; + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_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.CleanupPolicyMostRecentVersions) { + return mergeFrom( + (com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions other) { + if (other + == com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions + .getDefaultInstance()) return this; + if (!other.packageNamePrefixes_.isEmpty()) { + if (packageNamePrefixes_.isEmpty()) { + packageNamePrefixes_ = other.packageNamePrefixes_; + bitField0_ |= 0x00000001; + } else { + ensurePackageNamePrefixesIsMutable(); + packageNamePrefixes_.addAll(other.packageNamePrefixes_); + } + onChanged(); + } + if (other.hasKeepCount()) { + setKeepCount(other.getKeepCount()); + } + 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: + { + java.lang.String s = input.readStringRequireUtf8(); + ensurePackageNamePrefixesIsMutable(); + packageNamePrefixes_.add(s); + break; + } // case 10 + case 16: + { + keepCount_ = input.readInt32(); + 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 com.google.protobuf.LazyStringArrayList packageNamePrefixes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensurePackageNamePrefixesIsMutable() { + if (!packageNamePrefixes_.isModifiable()) { + packageNamePrefixes_ = new com.google.protobuf.LazyStringArrayList(packageNamePrefixes_); + } + bitField0_ |= 0x00000001; + } + /** + * + * + *
+     * List of package name prefixes that will apply this rule.
+     * 
+ * + * repeated string package_name_prefixes = 1; + * + * @return A list containing the packageNamePrefixes. + */ + public com.google.protobuf.ProtocolStringList getPackageNamePrefixesList() { + packageNamePrefixes_.makeImmutable(); + return packageNamePrefixes_; + } + /** + * + * + *
+     * List of package name prefixes that will apply this rule.
+     * 
+ * + * repeated string package_name_prefixes = 1; + * + * @return The count of packageNamePrefixes. + */ + public int getPackageNamePrefixesCount() { + return packageNamePrefixes_.size(); + } + /** + * + * + *
+     * List of package name prefixes that will apply this rule.
+     * 
+ * + * repeated string package_name_prefixes = 1; + * + * @param index The index of the element to return. + * @return The packageNamePrefixes at the given index. + */ + public java.lang.String getPackageNamePrefixes(int index) { + return packageNamePrefixes_.get(index); + } + /** + * + * + *
+     * List of package name prefixes that will apply this rule.
+     * 
+ * + * repeated string package_name_prefixes = 1; + * + * @param index The index of the value to return. + * @return The bytes of the packageNamePrefixes at the given index. + */ + public com.google.protobuf.ByteString getPackageNamePrefixesBytes(int index) { + return packageNamePrefixes_.getByteString(index); + } + /** + * + * + *
+     * List of package name prefixes that will apply this rule.
+     * 
+ * + * repeated string package_name_prefixes = 1; + * + * @param index The index to set the value at. + * @param value The packageNamePrefixes to set. + * @return This builder for chaining. + */ + public Builder setPackageNamePrefixes(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePackageNamePrefixesIsMutable(); + packageNamePrefixes_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * List of package name prefixes that will apply this rule.
+     * 
+ * + * repeated string package_name_prefixes = 1; + * + * @param value The packageNamePrefixes to add. + * @return This builder for chaining. + */ + public Builder addPackageNamePrefixes(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePackageNamePrefixesIsMutable(); + packageNamePrefixes_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * List of package name prefixes that will apply this rule.
+     * 
+ * + * repeated string package_name_prefixes = 1; + * + * @param values The packageNamePrefixes to add. + * @return This builder for chaining. + */ + public Builder addAllPackageNamePrefixes(java.lang.Iterable values) { + ensurePackageNamePrefixesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, packageNamePrefixes_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * List of package name prefixes that will apply this rule.
+     * 
+ * + * repeated string package_name_prefixes = 1; + * + * @return This builder for chaining. + */ + public Builder clearPackageNamePrefixes() { + packageNamePrefixes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * List of package name prefixes that will apply this rule.
+     * 
+ * + * repeated string package_name_prefixes = 1; + * + * @param value The bytes of the packageNamePrefixes to add. + * @return This builder for chaining. + */ + public Builder addPackageNamePrefixesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensurePackageNamePrefixesIsMutable(); + packageNamePrefixes_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int keepCount_; + /** + * + * + *
+     * Minimum number of versions to keep.
+     * 
+ * + * optional int32 keep_count = 2; + * + * @return Whether the keepCount field is set. + */ + @java.lang.Override + public boolean hasKeepCount() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Minimum number of versions to keep.
+     * 
+ * + * optional int32 keep_count = 2; + * + * @return The keepCount. + */ + @java.lang.Override + public int getKeepCount() { + return keepCount_; + } + /** + * + * + *
+     * Minimum number of versions to keep.
+     * 
+ * + * optional int32 keep_count = 2; + * + * @param value The keepCount to set. + * @return This builder for chaining. + */ + public Builder setKeepCount(int value) { + + keepCount_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Minimum number of versions to keep.
+     * 
+ * + * optional int32 keep_count = 2; + * + * @return This builder for chaining. + */ + public Builder clearKeepCount() { + bitField0_ = (bitField0_ & ~0x00000002); + keepCount_ = 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.CleanupPolicyMostRecentVersions) + } + + // @@protoc_insertion_point(class_scope:google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions) + private static final com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions(); + } + + public static com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CleanupPolicyMostRecentVersions 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.CleanupPolicyMostRecentVersions + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/CleanupPolicyMostRecentVersionsOrBuilder.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/CleanupPolicyMostRecentVersionsOrBuilder.java new file mode 100644 index 000000000000..dc9e64d62077 --- /dev/null +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/CleanupPolicyMostRecentVersionsOrBuilder.java @@ -0,0 +1,101 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/repository.proto + +package com.google.devtools.artifactregistry.v1; + +public interface CleanupPolicyMostRecentVersionsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * List of package name prefixes that will apply this rule.
+   * 
+ * + * repeated string package_name_prefixes = 1; + * + * @return A list containing the packageNamePrefixes. + */ + java.util.List getPackageNamePrefixesList(); + /** + * + * + *
+   * List of package name prefixes that will apply this rule.
+   * 
+ * + * repeated string package_name_prefixes = 1; + * + * @return The count of packageNamePrefixes. + */ + int getPackageNamePrefixesCount(); + /** + * + * + *
+   * List of package name prefixes that will apply this rule.
+   * 
+ * + * repeated string package_name_prefixes = 1; + * + * @param index The index of the element to return. + * @return The packageNamePrefixes at the given index. + */ + java.lang.String getPackageNamePrefixes(int index); + /** + * + * + *
+   * List of package name prefixes that will apply this rule.
+   * 
+ * + * repeated string package_name_prefixes = 1; + * + * @param index The index of the value to return. + * @return The bytes of the packageNamePrefixes at the given index. + */ + com.google.protobuf.ByteString getPackageNamePrefixesBytes(int index); + + /** + * + * + *
+   * Minimum number of versions to keep.
+   * 
+ * + * optional int32 keep_count = 2; + * + * @return Whether the keepCount field is set. + */ + boolean hasKeepCount(); + /** + * + * + *
+   * Minimum number of versions to keep.
+   * 
+ * + * optional int32 keep_count = 2; + * + * @return The keepCount. + */ + int getKeepCount(); +} diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/CleanupPolicyOrBuilder.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/CleanupPolicyOrBuilder.java new file mode 100644 index 000000000000..6eb580781c56 --- /dev/null +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/CleanupPolicyOrBuilder.java @@ -0,0 +1,157 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/repository.proto + +package com.google.devtools.artifactregistry.v1; + +public interface CleanupPolicyOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devtools.artifactregistry.v1.CleanupPolicy) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Policy condition for matching versions.
+   * 
+ * + * .google.devtools.artifactregistry.v1.CleanupPolicyCondition condition = 2; + * + * @return Whether the condition field is set. + */ + boolean hasCondition(); + /** + * + * + *
+   * Policy condition for matching versions.
+   * 
+ * + * .google.devtools.artifactregistry.v1.CleanupPolicyCondition condition = 2; + * + * @return The condition. + */ + com.google.devtools.artifactregistry.v1.CleanupPolicyCondition getCondition(); + /** + * + * + *
+   * Policy condition for matching versions.
+   * 
+ * + * .google.devtools.artifactregistry.v1.CleanupPolicyCondition condition = 2; + */ + com.google.devtools.artifactregistry.v1.CleanupPolicyConditionOrBuilder getConditionOrBuilder(); + + /** + * + * + *
+   * Policy condition for retaining a minimum number of versions. May only be
+   * specified with a Keep action.
+   * 
+ * + * + * .google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions most_recent_versions = 4; + * + * + * @return Whether the mostRecentVersions field is set. + */ + boolean hasMostRecentVersions(); + /** + * + * + *
+   * Policy condition for retaining a minimum number of versions. May only be
+   * specified with a Keep action.
+   * 
+ * + * + * .google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions most_recent_versions = 4; + * + * + * @return The mostRecentVersions. + */ + com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions getMostRecentVersions(); + /** + * + * + *
+   * Policy condition for retaining a minimum number of versions. May only be
+   * specified with a Keep action.
+   * 
+ * + * + * .google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions most_recent_versions = 4; + * + */ + com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersionsOrBuilder + getMostRecentVersionsOrBuilder(); + + /** + * + * + *
+   * The user-provided ID of the cleanup policy.
+   * 
+ * + * string id = 1; + * + * @return The id. + */ + java.lang.String getId(); + /** + * + * + *
+   * The user-provided ID of the cleanup policy.
+   * 
+ * + * string id = 1; + * + * @return The bytes for id. + */ + com.google.protobuf.ByteString getIdBytes(); + + /** + * + * + *
+   * Policy action.
+   * 
+ * + * .google.devtools.artifactregistry.v1.CleanupPolicy.Action action = 3; + * + * @return The enum numeric value on the wire for action. + */ + int getActionValue(); + /** + * + * + *
+   * Policy action.
+   * 
+ * + * .google.devtools.artifactregistry.v1.CleanupPolicy.Action action = 3; + * + * @return The action. + */ + com.google.devtools.artifactregistry.v1.CleanupPolicy.Action getAction(); + + com.google.devtools.artifactregistry.v1.CleanupPolicy.ConditionTypeCase getConditionTypeCase(); +} diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/CreateRepositoryRequest.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/CreateRepositoryRequest.java index 97755be02f7d..46c14f46ca83 100644 --- a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/CreateRepositoryRequest.java +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/CreateRepositoryRequest.java @@ -128,7 +128,7 @@ public com.google.protobuf.ByteString getParentBytes() { * * *
-   * The repository id to use for this repository.
+   * Required. The repository id to use for this repository.
    * 
* * string repository_id = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -151,7 +151,7 @@ public java.lang.String getRepositoryId() { * * *
-   * The repository id to use for this repository.
+   * Required. The repository id to use for this repository.
    * 
* * string repository_id = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -177,7 +177,7 @@ public com.google.protobuf.ByteString getRepositoryIdBytes() { * * *
-   * The repository to be created.
+   * Required. The repository to be created.
    * 
* * @@ -194,7 +194,7 @@ public boolean hasRepository() { * * *
-   * The repository to be created.
+   * Required. The repository to be created.
    * 
* * @@ -213,7 +213,7 @@ public com.google.devtools.artifactregistry.v1.Repository getRepository() { * * *
-   * The repository to be created.
+   * Required. The repository to be created.
    * 
* * @@ -755,7 +755,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * * *
-     * The repository id to use for this repository.
+     * Required. The repository id to use for this repository.
      * 
* * string repository_id = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -777,7 +777,7 @@ public java.lang.String getRepositoryId() { * * *
-     * The repository id to use for this repository.
+     * Required. The repository id to use for this repository.
      * 
* * string repository_id = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -799,7 +799,7 @@ public com.google.protobuf.ByteString getRepositoryIdBytes() { * * *
-     * The repository id to use for this repository.
+     * Required. The repository id to use for this repository.
      * 
* * string repository_id = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -820,7 +820,7 @@ public Builder setRepositoryId(java.lang.String value) { * * *
-     * The repository id to use for this repository.
+     * Required. The repository id to use for this repository.
      * 
* * string repository_id = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -837,7 +837,7 @@ public Builder clearRepositoryId() { * * *
-     * The repository id to use for this repository.
+     * Required. The repository id to use for this repository.
      * 
* * string repository_id = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -866,7 +866,7 @@ public Builder setRepositoryIdBytes(com.google.protobuf.ByteString value) { * * *
-     * The repository to be created.
+     * Required. The repository to be created.
      * 
* * @@ -882,7 +882,7 @@ public boolean hasRepository() { * * *
-     * The repository to be created.
+     * Required. The repository to be created.
      * 
* * @@ -904,7 +904,7 @@ public com.google.devtools.artifactregistry.v1.Repository getRepository() { * * *
-     * The repository to be created.
+     * Required. The repository to be created.
      * 
* * @@ -928,7 +928,7 @@ public Builder setRepository(com.google.devtools.artifactregistry.v1.Repository * * *
-     * The repository to be created.
+     * Required. The repository to be created.
      * 
* * @@ -950,7 +950,7 @@ public Builder setRepository( * * *
-     * The repository to be created.
+     * Required. The repository to be created.
      * 
* * @@ -978,7 +978,7 @@ public Builder mergeRepository(com.google.devtools.artifactregistry.v1.Repositor * * *
-     * The repository to be created.
+     * Required. The repository to be created.
      * 
* * @@ -999,7 +999,7 @@ public Builder clearRepository() { * * *
-     * The repository to be created.
+     * Required. The repository to be created.
      * 
* * @@ -1015,7 +1015,7 @@ public com.google.devtools.artifactregistry.v1.Repository.Builder getRepositoryB * * *
-     * The repository to be created.
+     * Required. The repository to be created.
      * 
* * @@ -1035,7 +1035,7 @@ public com.google.devtools.artifactregistry.v1.RepositoryOrBuilder getRepository * * *
-     * The repository to be created.
+     * Required. The repository to be created.
      * 
* * diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/CreateRepositoryRequestOrBuilder.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/CreateRepositoryRequestOrBuilder.java index 6d0b6ae27065..c3f401223d15 100644 --- a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/CreateRepositoryRequestOrBuilder.java +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/CreateRepositoryRequestOrBuilder.java @@ -58,7 +58,7 @@ public interface CreateRepositoryRequestOrBuilder * * *
-   * The repository id to use for this repository.
+   * Required. The repository id to use for this repository.
    * 
* * string repository_id = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -70,7 +70,7 @@ public interface CreateRepositoryRequestOrBuilder * * *
-   * The repository id to use for this repository.
+   * Required. The repository id to use for this repository.
    * 
* * string repository_id = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -83,7 +83,7 @@ public interface CreateRepositoryRequestOrBuilder * * *
-   * The repository to be created.
+   * Required. The repository to be created.
    * 
* * @@ -97,7 +97,7 @@ public interface CreateRepositoryRequestOrBuilder * * *
-   * The repository to be created.
+   * Required. The repository to be created.
    * 
* * @@ -111,7 +111,7 @@ public interface CreateRepositoryRequestOrBuilder * * *
-   * The repository to be created.
+   * Required. The repository to be created.
    * 
* * diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListTagsRequest.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListTagsRequest.java index 43eb78a0bcfb..0684e5de9314 100644 --- a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListTagsRequest.java +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListTagsRequest.java @@ -72,7 +72,9 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * The name of the parent resource whose tags will be listed.
+   * The name of the parent package whose tags will be listed.
+   * For example:
+   * `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`.
    * 
* * string parent = 1; @@ -95,7 +97,9 @@ public java.lang.String getParent() { * * *
-   * The name of the parent resource whose tags will be listed.
+   * The name of the parent package whose tags will be listed.
+   * For example:
+   * `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`.
    * 
* * string parent = 1; @@ -669,7 +673,9 @@ public Builder mergeFrom( * * *
-     * The name of the parent resource whose tags will be listed.
+     * The name of the parent package whose tags will be listed.
+     * For example:
+     * `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`.
      * 
* * string parent = 1; @@ -691,7 +697,9 @@ public java.lang.String getParent() { * * *
-     * The name of the parent resource whose tags will be listed.
+     * The name of the parent package whose tags will be listed.
+     * For example:
+     * `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`.
      * 
* * string parent = 1; @@ -713,7 +721,9 @@ public com.google.protobuf.ByteString getParentBytes() { * * *
-     * The name of the parent resource whose tags will be listed.
+     * The name of the parent package whose tags will be listed.
+     * For example:
+     * `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`.
      * 
* * string parent = 1; @@ -734,7 +744,9 @@ public Builder setParent(java.lang.String value) { * * *
-     * The name of the parent resource whose tags will be listed.
+     * The name of the parent package whose tags will be listed.
+     * For example:
+     * `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`.
      * 
* * string parent = 1; @@ -751,7 +763,9 @@ public Builder clearParent() { * * *
-     * The name of the parent resource whose tags will be listed.
+     * The name of the parent package whose tags will be listed.
+     * For example:
+     * `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`.
      * 
* * string parent = 1; diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListTagsRequestOrBuilder.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListTagsRequestOrBuilder.java index a34b4abf1b61..fe61bc6da517 100644 --- a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListTagsRequestOrBuilder.java +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListTagsRequestOrBuilder.java @@ -27,7 +27,9 @@ public interface ListTagsRequestOrBuilder * * *
-   * The name of the parent resource whose tags will be listed.
+   * The name of the parent package whose tags will be listed.
+   * For example:
+   * `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`.
    * 
* * string parent = 1; @@ -39,7 +41,9 @@ public interface ListTagsRequestOrBuilder * * *
-   * The name of the parent resource whose tags will be listed.
+   * The name of the parent package whose tags will be listed.
+   * For example:
+   * `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`.
    * 
* * string parent = 1; diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/Package.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/Package.java index 0a4d7410c771..5374133544bf 100644 --- a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/Package.java +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/Package.java @@ -72,7 +72,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
    * The name of the package, for example:
-   * "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1".
+   * `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`.
    * If the package ID part contains slashes, the slashes are escaped.
    * 
* @@ -97,7 +97,7 @@ public java.lang.String getName() { * *
    * The name of the package, for example:
-   * "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1".
+   * `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`.
    * If the package ID part contains slashes, the slashes are escaped.
    * 
* @@ -698,7 +698,7 @@ public Builder mergeFrom( * *
      * The name of the package, for example:
-     * "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1".
+     * `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`.
      * If the package ID part contains slashes, the slashes are escaped.
      * 
* @@ -722,7 +722,7 @@ public java.lang.String getName() { * *
      * The name of the package, for example:
-     * "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1".
+     * `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`.
      * If the package ID part contains slashes, the slashes are escaped.
      * 
* @@ -746,7 +746,7 @@ public com.google.protobuf.ByteString getNameBytes() { * *
      * The name of the package, for example:
-     * "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1".
+     * `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`.
      * If the package ID part contains slashes, the slashes are escaped.
      * 
* @@ -769,7 +769,7 @@ public Builder setName(java.lang.String value) { * *
      * The name of the package, for example:
-     * "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1".
+     * `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`.
      * If the package ID part contains slashes, the slashes are escaped.
      * 
* @@ -788,7 +788,7 @@ public Builder clearName() { * *
      * The name of the package, for example:
-     * "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1".
+     * `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`.
      * If the package ID part contains slashes, the slashes are escaped.
      * 
* diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/PackageOrBuilder.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/PackageOrBuilder.java index 4615cb278b26..c2e2f2094811 100644 --- a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/PackageOrBuilder.java +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/PackageOrBuilder.java @@ -28,7 +28,7 @@ public interface PackageOrBuilder * *
    * The name of the package, for example:
-   * "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1".
+   * `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`.
    * If the package ID part contains slashes, the slashes are escaped.
    * 
* @@ -42,7 +42,7 @@ public interface PackageOrBuilder * *
    * The name of the package, for example:
-   * "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1".
+   * `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`.
    * If the package ID part contains slashes, the slashes are escaped.
    * 
* diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/RemoteRepositoryConfig.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/RemoteRepositoryConfig.java new file mode 100644 index 000000000000..70cf8342386d --- /dev/null +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/RemoteRepositoryConfig.java @@ -0,0 +1,13225 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/repository.proto + +package com.google.devtools.artifactregistry.v1; + +/** + * + * + *
+ * Remote repository configuration.
+ * 
+ * + * Protobuf type {@code google.devtools.artifactregistry.v1.RemoteRepositoryConfig} + */ +public final class RemoteRepositoryConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.devtools.artifactregistry.v1.RemoteRepositoryConfig) + RemoteRepositoryConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use RemoteRepositoryConfig.newBuilder() to construct. + private RemoteRepositoryConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RemoteRepositoryConfig() { + description_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RemoteRepositoryConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.class, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.Builder.class); + } + + public interface UpstreamCredentialsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Use username and password to access the remote repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials username_password_credentials = 1; + * + * + * @return Whether the usernamePasswordCredentials field is set. + */ + boolean hasUsernamePasswordCredentials(); + /** + * + * + *
+     * Use username and password to access the remote repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials username_password_credentials = 1; + * + * + * @return The usernamePasswordCredentials. + */ + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + .UsernamePasswordCredentials + getUsernamePasswordCredentials(); + /** + * + * + *
+     * Use username and password to access the remote repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials username_password_credentials = 1; + * + */ + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + .UsernamePasswordCredentialsOrBuilder + getUsernamePasswordCredentialsOrBuilder(); + + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + .CredentialsCase + getCredentialsCase(); + } + /** + * + * + *
+   * The credentials to access the remote repository.
+   * 
+ * + * Protobuf type {@code + * google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials} + */ + public static final class UpstreamCredentials extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials) + UpstreamCredentialsOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpstreamCredentials.newBuilder() to construct. + private UpstreamCredentials(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpstreamCredentials() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpstreamCredentials(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_UpstreamCredentials_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_UpstreamCredentials_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + .class, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + .Builder.class); + } + + public interface UsernamePasswordCredentialsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * The username to access the remote repository.
+       * 
+ * + * string username = 1; + * + * @return The username. + */ + java.lang.String getUsername(); + /** + * + * + *
+       * The username to access the remote repository.
+       * 
+ * + * string username = 1; + * + * @return The bytes for username. + */ + com.google.protobuf.ByteString getUsernameBytes(); + + /** + * + * + *
+       * The Secret Manager key version that holds the password to access the
+       * remote repository. Must be in the format of
+       * `projects/{project}/secrets/{secret}/versions/{version}`.
+       * 
+ * + * string password_secret_version = 2 [(.google.api.resource_reference) = { ... } + * + * @return The passwordSecretVersion. + */ + java.lang.String getPasswordSecretVersion(); + /** + * + * + *
+       * The Secret Manager key version that holds the password to access the
+       * remote repository. Must be in the format of
+       * `projects/{project}/secrets/{secret}/versions/{version}`.
+       * 
+ * + * string password_secret_version = 2 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for passwordSecretVersion. + */ + com.google.protobuf.ByteString getPasswordSecretVersionBytes(); + } + /** + * + * + *
+     * Username and password credentials.
+     * 
+ * + * Protobuf type {@code + * google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials} + */ + public static final class UsernamePasswordCredentials + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials) + UsernamePasswordCredentialsOrBuilder { + private static final long serialVersionUID = 0L; + // Use UsernamePasswordCredentials.newBuilder() to construct. + private UsernamePasswordCredentials( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UsernamePasswordCredentials() { + username_ = ""; + passwordSecretVersion_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UsernamePasswordCredentials(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_UpstreamCredentials_UsernamePasswordCredentials_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_UpstreamCredentials_UsernamePasswordCredentials_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + .UsernamePasswordCredentials.class, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + .UsernamePasswordCredentials.Builder.class); + } + + public static final int USERNAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object username_ = ""; + /** + * + * + *
+       * The username to access the remote repository.
+       * 
+ * + * string username = 1; + * + * @return The username. + */ + @java.lang.Override + public java.lang.String getUsername() { + java.lang.Object ref = username_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + username_ = s; + return s; + } + } + /** + * + * + *
+       * The username to access the remote repository.
+       * 
+ * + * string username = 1; + * + * @return The bytes for username. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUsernameBytes() { + java.lang.Object ref = username_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + username_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PASSWORD_SECRET_VERSION_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object passwordSecretVersion_ = ""; + /** + * + * + *
+       * The Secret Manager key version that holds the password to access the
+       * remote repository. Must be in the format of
+       * `projects/{project}/secrets/{secret}/versions/{version}`.
+       * 
+ * + * string password_secret_version = 2 [(.google.api.resource_reference) = { ... } + * + * @return The passwordSecretVersion. + */ + @java.lang.Override + public java.lang.String getPasswordSecretVersion() { + java.lang.Object ref = passwordSecretVersion_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + passwordSecretVersion_ = s; + return s; + } + } + /** + * + * + *
+       * The Secret Manager key version that holds the password to access the
+       * remote repository. Must be in the format of
+       * `projects/{project}/secrets/{secret}/versions/{version}`.
+       * 
+ * + * string password_secret_version = 2 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for passwordSecretVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPasswordSecretVersionBytes() { + java.lang.Object ref = passwordSecretVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + passwordSecretVersion_ = 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(username_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, username_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(passwordSecretVersion_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, passwordSecretVersion_); + } + 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(username_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, username_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(passwordSecretVersion_)) { + size += + com.google.protobuf.GeneratedMessageV3.computeStringSize(2, passwordSecretVersion_); + } + 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.RemoteRepositoryConfig.UpstreamCredentials + .UsernamePasswordCredentials)) { + return super.equals(obj); + } + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + .UsernamePasswordCredentials + other = + (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + .UsernamePasswordCredentials) + obj; + + if (!getUsername().equals(other.getUsername())) return false; + if (!getPasswordSecretVersion().equals(other.getPasswordSecretVersion())) 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) + USERNAME_FIELD_NUMBER; + hash = (53 * hash) + getUsername().hashCode(); + hash = (37 * hash) + PASSWORD_SECRET_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getPasswordSecretVersion().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig + .UpstreamCredentials.UsernamePasswordCredentials + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig + .UpstreamCredentials.UsernamePasswordCredentials + 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.RemoteRepositoryConfig + .UpstreamCredentials.UsernamePasswordCredentials + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig + .UpstreamCredentials.UsernamePasswordCredentials + 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.RemoteRepositoryConfig + .UpstreamCredentials.UsernamePasswordCredentials + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig + .UpstreamCredentials.UsernamePasswordCredentials + 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.RemoteRepositoryConfig + .UpstreamCredentials.UsernamePasswordCredentials + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig + .UpstreamCredentials.UsernamePasswordCredentials + 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.RemoteRepositoryConfig + .UpstreamCredentials.UsernamePasswordCredentials + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig + .UpstreamCredentials.UsernamePasswordCredentials + 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.RemoteRepositoryConfig + .UpstreamCredentials.UsernamePasswordCredentials + 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.RemoteRepositoryConfig + .UpstreamCredentials.UsernamePasswordCredentials + 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.RemoteRepositoryConfig.UpstreamCredentials + .UsernamePasswordCredentials + 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; + } + /** + * + * + *
+       * Username and password credentials.
+       * 
+ * + * Protobuf type {@code + * google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials) + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + .UsernamePasswordCredentialsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_UpstreamCredentials_UsernamePasswordCredentials_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_UpstreamCredentials_UsernamePasswordCredentials_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + .UsernamePasswordCredentials.class, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + .UsernamePasswordCredentials.Builder.class); + } + + // Construct using + // com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + username_ = ""; + passwordSecretVersion_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_UpstreamCredentials_UsernamePasswordCredentials_descriptor; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + .UsernamePasswordCredentials + getDefaultInstanceForType() { + return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + .UsernamePasswordCredentials.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + .UsernamePasswordCredentials + build() { + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + .UsernamePasswordCredentials + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + .UsernamePasswordCredentials + buildPartial() { + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + .UsernamePasswordCredentials + result = + new com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig + .UpstreamCredentials.UsernamePasswordCredentials(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + .UsernamePasswordCredentials + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.username_ = username_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.passwordSecretVersion_ = passwordSecretVersion_; + } + } + + @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.RemoteRepositoryConfig.UpstreamCredentials + .UsernamePasswordCredentials) { + return mergeFrom( + (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + .UsernamePasswordCredentials) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + .UsernamePasswordCredentials + other) { + if (other + == com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + .UsernamePasswordCredentials.getDefaultInstance()) return this; + if (!other.getUsername().isEmpty()) { + username_ = other.username_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getPasswordSecretVersion().isEmpty()) { + passwordSecretVersion_ = other.passwordSecretVersion_; + 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: + { + username_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + passwordSecretVersion_ = 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.lang.Object username_ = ""; + /** + * + * + *
+         * The username to access the remote repository.
+         * 
+ * + * string username = 1; + * + * @return The username. + */ + public java.lang.String getUsername() { + java.lang.Object ref = username_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + username_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * The username to access the remote repository.
+         * 
+ * + * string username = 1; + * + * @return The bytes for username. + */ + public com.google.protobuf.ByteString getUsernameBytes() { + java.lang.Object ref = username_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + username_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * The username to access the remote repository.
+         * 
+ * + * string username = 1; + * + * @param value The username to set. + * @return This builder for chaining. + */ + public Builder setUsername(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + username_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * The username to access the remote repository.
+         * 
+ * + * string username = 1; + * + * @return This builder for chaining. + */ + public Builder clearUsername() { + username_ = getDefaultInstance().getUsername(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+         * The username to access the remote repository.
+         * 
+ * + * string username = 1; + * + * @param value The bytes for username to set. + * @return This builder for chaining. + */ + public Builder setUsernameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + username_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object passwordSecretVersion_ = ""; + /** + * + * + *
+         * The Secret Manager key version that holds the password to access the
+         * remote repository. Must be in the format of
+         * `projects/{project}/secrets/{secret}/versions/{version}`.
+         * 
+ * + * string password_secret_version = 2 [(.google.api.resource_reference) = { ... } + * + * + * @return The passwordSecretVersion. + */ + public java.lang.String getPasswordSecretVersion() { + java.lang.Object ref = passwordSecretVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + passwordSecretVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * The Secret Manager key version that holds the password to access the
+         * remote repository. Must be in the format of
+         * `projects/{project}/secrets/{secret}/versions/{version}`.
+         * 
+ * + * string password_secret_version = 2 [(.google.api.resource_reference) = { ... } + * + * + * @return The bytes for passwordSecretVersion. + */ + public com.google.protobuf.ByteString getPasswordSecretVersionBytes() { + java.lang.Object ref = passwordSecretVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + passwordSecretVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * The Secret Manager key version that holds the password to access the
+         * remote repository. Must be in the format of
+         * `projects/{project}/secrets/{secret}/versions/{version}`.
+         * 
+ * + * string password_secret_version = 2 [(.google.api.resource_reference) = { ... } + * + * + * @param value The passwordSecretVersion to set. + * @return This builder for chaining. + */ + public Builder setPasswordSecretVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + passwordSecretVersion_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * The Secret Manager key version that holds the password to access the
+         * remote repository. Must be in the format of
+         * `projects/{project}/secrets/{secret}/versions/{version}`.
+         * 
+ * + * string password_secret_version = 2 [(.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearPasswordSecretVersion() { + passwordSecretVersion_ = getDefaultInstance().getPasswordSecretVersion(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+         * The Secret Manager key version that holds the password to access the
+         * remote repository. Must be in the format of
+         * `projects/{project}/secrets/{secret}/versions/{version}`.
+         * 
+ * + * string password_secret_version = 2 [(.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for passwordSecretVersion to set. + * @return This builder for chaining. + */ + public Builder setPasswordSecretVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + passwordSecretVersion_ = 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.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials) + } + + // @@protoc_insertion_point(class_scope:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials) + private static final com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig + .UpstreamCredentials.UsernamePasswordCredentials + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + .UsernamePasswordCredentials(); + } + + public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig + .UpstreamCredentials.UsernamePasswordCredentials + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UsernamePasswordCredentials 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.RemoteRepositoryConfig.UpstreamCredentials + .UsernamePasswordCredentials + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int credentialsCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object credentials_; + + public enum CredentialsCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + USERNAME_PASSWORD_CREDENTIALS(1), + CREDENTIALS_NOT_SET(0); + private final int value; + + private CredentialsCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static CredentialsCase valueOf(int value) { + return forNumber(value); + } + + public static CredentialsCase forNumber(int value) { + switch (value) { + case 1: + return USERNAME_PASSWORD_CREDENTIALS; + case 0: + return CREDENTIALS_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public CredentialsCase getCredentialsCase() { + return CredentialsCase.forNumber(credentialsCase_); + } + + public static final int USERNAME_PASSWORD_CREDENTIALS_FIELD_NUMBER = 1; + /** + * + * + *
+     * Use username and password to access the remote repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials username_password_credentials = 1; + * + * + * @return Whether the usernamePasswordCredentials field is set. + */ + @java.lang.Override + public boolean hasUsernamePasswordCredentials() { + return credentialsCase_ == 1; + } + /** + * + * + *
+     * Use username and password to access the remote repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials username_password_credentials = 1; + * + * + * @return The usernamePasswordCredentials. + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + .UsernamePasswordCredentials + getUsernamePasswordCredentials() { + if (credentialsCase_ == 1) { + return (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + .UsernamePasswordCredentials) + credentials_; + } + return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + .UsernamePasswordCredentials.getDefaultInstance(); + } + /** + * + * + *
+     * Use username and password to access the remote repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials username_password_credentials = 1; + * + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + .UsernamePasswordCredentialsOrBuilder + getUsernamePasswordCredentialsOrBuilder() { + if (credentialsCase_ == 1) { + return (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + .UsernamePasswordCredentials) + credentials_; + } + return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + .UsernamePasswordCredentials.getDefaultInstance(); + } + + 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 (credentialsCase_ == 1) { + output.writeMessage( + 1, + (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + .UsernamePasswordCredentials) + credentials_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (credentialsCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, + (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + .UsernamePasswordCredentials) + credentials_); + } + 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.RemoteRepositoryConfig.UpstreamCredentials)) { + return super.equals(obj); + } + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials other = + (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials) obj; + + if (!getCredentialsCase().equals(other.getCredentialsCase())) return false; + switch (credentialsCase_) { + case 1: + if (!getUsernamePasswordCredentials().equals(other.getUsernamePasswordCredentials())) + return false; + break; + case 0: + default: + } + 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(); + switch (credentialsCase_) { + case 1: + hash = (37 * hash) + USERNAME_PASSWORD_CREDENTIALS_FIELD_NUMBER; + hash = (53 * hash) + getUsernamePasswordCredentials().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + 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.RemoteRepositoryConfig.UpstreamCredentials + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + 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.RemoteRepositoryConfig.UpstreamCredentials + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + 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.RemoteRepositoryConfig.UpstreamCredentials + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + 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.RemoteRepositoryConfig.UpstreamCredentials + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + 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.RemoteRepositoryConfig.UpstreamCredentials + 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.RemoteRepositoryConfig.UpstreamCredentials + 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.RemoteRepositoryConfig.UpstreamCredentials + 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 credentials to access the remote repository.
+     * 
+ * + * Protobuf type {@code + * google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials) + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig + .UpstreamCredentialsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_UpstreamCredentials_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_UpstreamCredentials_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + .class, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + .Builder.class); + } + + // Construct using + // com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (usernamePasswordCredentialsBuilder_ != null) { + usernamePasswordCredentialsBuilder_.clear(); + } + credentialsCase_ = 0; + credentials_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_UpstreamCredentials_descriptor; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + getDefaultInstanceForType() { + return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + build() { + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + buildPartial() { + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials result = + new com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + result) { + result.credentialsCase_ = credentialsCase_; + result.credentials_ = this.credentials_; + if (credentialsCase_ == 1 && usernamePasswordCredentialsBuilder_ != null) { + result.credentials_ = usernamePasswordCredentialsBuilder_.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.RemoteRepositoryConfig.UpstreamCredentials) { + return mergeFrom( + (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + other) { + if (other + == com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + .getDefaultInstance()) return this; + switch (other.getCredentialsCase()) { + case USERNAME_PASSWORD_CREDENTIALS: + { + mergeUsernamePasswordCredentials(other.getUsernamePasswordCredentials()); + break; + } + case CREDENTIALS_NOT_SET: + { + break; + } + } + 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( + getUsernamePasswordCredentialsFieldBuilder().getBuilder(), extensionRegistry); + credentialsCase_ = 1; + 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 credentialsCase_ = 0; + private java.lang.Object credentials_; + + public CredentialsCase getCredentialsCase() { + return CredentialsCase.forNumber(credentialsCase_); + } + + public Builder clearCredentials() { + credentialsCase_ = 0; + credentials_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + .UsernamePasswordCredentials, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + .UsernamePasswordCredentials.Builder, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + .UsernamePasswordCredentialsOrBuilder> + usernamePasswordCredentialsBuilder_; + /** + * + * + *
+       * Use username and password to access the remote repository.
+       * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials username_password_credentials = 1; + * + * + * @return Whether the usernamePasswordCredentials field is set. + */ + @java.lang.Override + public boolean hasUsernamePasswordCredentials() { + return credentialsCase_ == 1; + } + /** + * + * + *
+       * Use username and password to access the remote repository.
+       * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials username_password_credentials = 1; + * + * + * @return The usernamePasswordCredentials. + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + .UsernamePasswordCredentials + getUsernamePasswordCredentials() { + if (usernamePasswordCredentialsBuilder_ == null) { + if (credentialsCase_ == 1) { + return (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig + .UpstreamCredentials.UsernamePasswordCredentials) + credentials_; + } + return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + .UsernamePasswordCredentials.getDefaultInstance(); + } else { + if (credentialsCase_ == 1) { + return usernamePasswordCredentialsBuilder_.getMessage(); + } + return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + .UsernamePasswordCredentials.getDefaultInstance(); + } + } + /** + * + * + *
+       * Use username and password to access the remote repository.
+       * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials username_password_credentials = 1; + * + */ + public Builder setUsernamePasswordCredentials( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + .UsernamePasswordCredentials + value) { + if (usernamePasswordCredentialsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + credentials_ = value; + onChanged(); + } else { + usernamePasswordCredentialsBuilder_.setMessage(value); + } + credentialsCase_ = 1; + return this; + } + /** + * + * + *
+       * Use username and password to access the remote repository.
+       * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials username_password_credentials = 1; + * + */ + public Builder setUsernamePasswordCredentials( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + .UsernamePasswordCredentials.Builder + builderForValue) { + if (usernamePasswordCredentialsBuilder_ == null) { + credentials_ = builderForValue.build(); + onChanged(); + } else { + usernamePasswordCredentialsBuilder_.setMessage(builderForValue.build()); + } + credentialsCase_ = 1; + return this; + } + /** + * + * + *
+       * Use username and password to access the remote repository.
+       * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials username_password_credentials = 1; + * + */ + public Builder mergeUsernamePasswordCredentials( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + .UsernamePasswordCredentials + value) { + if (usernamePasswordCredentialsBuilder_ == null) { + if (credentialsCase_ == 1 + && credentials_ + != com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig + .UpstreamCredentials.UsernamePasswordCredentials.getDefaultInstance()) { + credentials_ = + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + .UsernamePasswordCredentials.newBuilder( + (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig + .UpstreamCredentials.UsernamePasswordCredentials) + credentials_) + .mergeFrom(value) + .buildPartial(); + } else { + credentials_ = value; + } + onChanged(); + } else { + if (credentialsCase_ == 1) { + usernamePasswordCredentialsBuilder_.mergeFrom(value); + } else { + usernamePasswordCredentialsBuilder_.setMessage(value); + } + } + credentialsCase_ = 1; + return this; + } + /** + * + * + *
+       * Use username and password to access the remote repository.
+       * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials username_password_credentials = 1; + * + */ + public Builder clearUsernamePasswordCredentials() { + if (usernamePasswordCredentialsBuilder_ == null) { + if (credentialsCase_ == 1) { + credentialsCase_ = 0; + credentials_ = null; + onChanged(); + } + } else { + if (credentialsCase_ == 1) { + credentialsCase_ = 0; + credentials_ = null; + } + usernamePasswordCredentialsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Use username and password to access the remote repository.
+       * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials username_password_credentials = 1; + * + */ + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + .UsernamePasswordCredentials.Builder + getUsernamePasswordCredentialsBuilder() { + return getUsernamePasswordCredentialsFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Use username and password to access the remote repository.
+       * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials username_password_credentials = 1; + * + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + .UsernamePasswordCredentialsOrBuilder + getUsernamePasswordCredentialsOrBuilder() { + if ((credentialsCase_ == 1) && (usernamePasswordCredentialsBuilder_ != null)) { + return usernamePasswordCredentialsBuilder_.getMessageOrBuilder(); + } else { + if (credentialsCase_ == 1) { + return (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig + .UpstreamCredentials.UsernamePasswordCredentials) + credentials_; + } + return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + .UsernamePasswordCredentials.getDefaultInstance(); + } + } + /** + * + * + *
+       * Use username and password to access the remote repository.
+       * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials username_password_credentials = 1; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + .UsernamePasswordCredentials, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + .UsernamePasswordCredentials.Builder, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + .UsernamePasswordCredentialsOrBuilder> + getUsernamePasswordCredentialsFieldBuilder() { + if (usernamePasswordCredentialsBuilder_ == null) { + if (!(credentialsCase_ == 1)) { + credentials_ = + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + .UsernamePasswordCredentials.getDefaultInstance(); + } + usernamePasswordCredentialsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + .UsernamePasswordCredentials, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + .UsernamePasswordCredentials.Builder, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + .UsernamePasswordCredentialsOrBuilder>( + (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig + .UpstreamCredentials.UsernamePasswordCredentials) + credentials_, + getParentForChildren(), + isClean()); + credentials_ = null; + } + credentialsCase_ = 1; + onChanged(); + return usernamePasswordCredentialsBuilder_; + } + + @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.RemoteRepositoryConfig.UpstreamCredentials) + } + + // @@protoc_insertion_point(class_scope:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials) + private static final com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig + .UpstreamCredentials + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials(); + } + + public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpstreamCredentials 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.RemoteRepositoryConfig.UpstreamCredentials + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface DockerRepositoryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * One of the publicly available Docker repositories supported by Artifact
+     * Registry.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.PublicRepository public_repository = 1; + * + * + * @return Whether the publicRepository field is set. + */ + boolean hasPublicRepository(); + /** + * + * + *
+     * One of the publicly available Docker repositories supported by Artifact
+     * Registry.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.PublicRepository public_repository = 1; + * + * + * @return The enum numeric value on the wire for publicRepository. + */ + int getPublicRepositoryValue(); + /** + * + * + *
+     * One of the publicly available Docker repositories supported by Artifact
+     * Registry.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.PublicRepository public_repository = 1; + * + * + * @return The publicRepository. + */ + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.PublicRepository + getPublicRepository(); + + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.UpstreamCase + getUpstreamCase(); + } + /** + * + * + *
+   * Configuration for a Docker remote repository.
+   * 
+ * + * Protobuf type {@code + * google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository} + */ + public static final class DockerRepository extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository) + DockerRepositoryOrBuilder { + private static final long serialVersionUID = 0L; + // Use DockerRepository.newBuilder() to construct. + private DockerRepository(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DockerRepository() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DockerRepository(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_DockerRepository_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_DockerRepository_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.class, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository + .Builder.class); + } + + /** + * + * + *
+     * Predefined list of publicly available Docker repositories like Docker
+     * Hub.
+     * 
+ * + * Protobuf enum {@code + * google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.PublicRepository} + */ + public enum PublicRepository implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Unspecified repository.
+       * 
+ * + * PUBLIC_REPOSITORY_UNSPECIFIED = 0; + */ + PUBLIC_REPOSITORY_UNSPECIFIED(0), + /** + * + * + *
+       * Docker Hub.
+       * 
+ * + * DOCKER_HUB = 1; + */ + DOCKER_HUB(1), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * Unspecified repository.
+       * 
+ * + * PUBLIC_REPOSITORY_UNSPECIFIED = 0; + */ + public static final int PUBLIC_REPOSITORY_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * Docker Hub.
+       * 
+ * + * DOCKER_HUB = 1; + */ + public static final int DOCKER_HUB_VALUE = 1; + + 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 PublicRepository 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 PublicRepository forNumber(int value) { + switch (value) { + case 0: + return PUBLIC_REPOSITORY_UNSPECIFIED; + case 1: + return DOCKER_HUB; + 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 PublicRepository findValueByNumber(int number) { + return PublicRepository.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.RemoteRepositoryConfig.DockerRepository + .getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final PublicRepository[] VALUES = values(); + + public static PublicRepository 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 PublicRepository(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.PublicRepository) + } + + private int upstreamCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object upstream_; + + public enum UpstreamCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + PUBLIC_REPOSITORY(1), + UPSTREAM_NOT_SET(0); + private final int value; + + private UpstreamCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static UpstreamCase valueOf(int value) { + return forNumber(value); + } + + public static UpstreamCase forNumber(int value) { + switch (value) { + case 1: + return PUBLIC_REPOSITORY; + case 0: + return UPSTREAM_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public UpstreamCase getUpstreamCase() { + return UpstreamCase.forNumber(upstreamCase_); + } + + public static final int PUBLIC_REPOSITORY_FIELD_NUMBER = 1; + /** + * + * + *
+     * One of the publicly available Docker repositories supported by Artifact
+     * Registry.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.PublicRepository public_repository = 1; + * + * + * @return Whether the publicRepository field is set. + */ + public boolean hasPublicRepository() { + return upstreamCase_ == 1; + } + /** + * + * + *
+     * One of the publicly available Docker repositories supported by Artifact
+     * Registry.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.PublicRepository public_repository = 1; + * + * + * @return The enum numeric value on the wire for publicRepository. + */ + public int getPublicRepositoryValue() { + if (upstreamCase_ == 1) { + return (java.lang.Integer) upstream_; + } + return 0; + } + /** + * + * + *
+     * One of the publicly available Docker repositories supported by Artifact
+     * Registry.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.PublicRepository public_repository = 1; + * + * + * @return The publicRepository. + */ + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository + .PublicRepository + getPublicRepository() { + if (upstreamCase_ == 1) { + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository + .PublicRepository + result = + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository + .PublicRepository.forNumber((java.lang.Integer) upstream_); + return result == null + ? com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository + .PublicRepository.UNRECOGNIZED + : result; + } + return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository + .PublicRepository.PUBLIC_REPOSITORY_UNSPECIFIED; + } + + 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 (upstreamCase_ == 1) { + output.writeEnum(1, ((java.lang.Integer) upstream_)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (upstreamCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeEnumSize( + 1, ((java.lang.Integer) upstream_)); + } + 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.RemoteRepositoryConfig.DockerRepository)) { + return super.equals(obj); + } + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository other = + (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository) obj; + + if (!getUpstreamCase().equals(other.getUpstreamCase())) return false; + switch (upstreamCase_) { + case 1: + if (getPublicRepositoryValue() != other.getPublicRepositoryValue()) return false; + break; + case 0: + default: + } + 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(); + switch (upstreamCase_) { + case 1: + hash = (37 * hash) + PUBLIC_REPOSITORY_FIELD_NUMBER; + hash = (53 * hash) + getPublicRepositoryValue(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository + 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.RemoteRepositoryConfig.DockerRepository + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository + 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.RemoteRepositoryConfig.DockerRepository + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository + 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.RemoteRepositoryConfig.DockerRepository + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository + 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.RemoteRepositoryConfig.DockerRepository + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository + 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.RemoteRepositoryConfig.DockerRepository + 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.RemoteRepositoryConfig.DockerRepository + 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.RemoteRepositoryConfig.DockerRepository 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; + } + /** + * + * + *
+     * Configuration for a Docker remote repository.
+     * 
+ * + * Protobuf type {@code + * google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository) + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepositoryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_DockerRepository_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_DockerRepository_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository + .class, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository + .Builder.class); + } + + // Construct using + // com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + upstreamCase_ = 0; + upstream_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_DockerRepository_descriptor; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository + getDefaultInstanceForType() { + return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository + build() { + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository + buildPartial() { + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository result = + new com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository result) { + result.upstreamCase_ = upstreamCase_; + result.upstream_ = this.upstream_; + } + + @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.RemoteRepositoryConfig.DockerRepository) { + return mergeFrom( + (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository other) { + if (other + == com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository + .getDefaultInstance()) return this; + switch (other.getUpstreamCase()) { + case PUBLIC_REPOSITORY: + { + setPublicRepositoryValue(other.getPublicRepositoryValue()); + break; + } + case UPSTREAM_NOT_SET: + { + break; + } + } + 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 8: + { + int rawValue = input.readEnum(); + upstreamCase_ = 1; + upstream_ = rawValue; + break; + } // case 8 + 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 upstreamCase_ = 0; + private java.lang.Object upstream_; + + public UpstreamCase getUpstreamCase() { + return UpstreamCase.forNumber(upstreamCase_); + } + + public Builder clearUpstream() { + upstreamCase_ = 0; + upstream_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+       * One of the publicly available Docker repositories supported by Artifact
+       * Registry.
+       * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.PublicRepository public_repository = 1; + * + * + * @return Whether the publicRepository field is set. + */ + @java.lang.Override + public boolean hasPublicRepository() { + return upstreamCase_ == 1; + } + /** + * + * + *
+       * One of the publicly available Docker repositories supported by Artifact
+       * Registry.
+       * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.PublicRepository public_repository = 1; + * + * + * @return The enum numeric value on the wire for publicRepository. + */ + @java.lang.Override + public int getPublicRepositoryValue() { + if (upstreamCase_ == 1) { + return ((java.lang.Integer) upstream_).intValue(); + } + return 0; + } + /** + * + * + *
+       * One of the publicly available Docker repositories supported by Artifact
+       * Registry.
+       * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.PublicRepository public_repository = 1; + * + * + * @param value The enum numeric value on the wire for publicRepository to set. + * @return This builder for chaining. + */ + public Builder setPublicRepositoryValue(int value) { + upstreamCase_ = 1; + upstream_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * One of the publicly available Docker repositories supported by Artifact
+       * Registry.
+       * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.PublicRepository public_repository = 1; + * + * + * @return The publicRepository. + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository + .PublicRepository + getPublicRepository() { + if (upstreamCase_ == 1) { + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository + .PublicRepository + result = + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository + .PublicRepository.forNumber((java.lang.Integer) upstream_); + return result == null + ? com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository + .PublicRepository.UNRECOGNIZED + : result; + } + return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository + .PublicRepository.PUBLIC_REPOSITORY_UNSPECIFIED; + } + /** + * + * + *
+       * One of the publicly available Docker repositories supported by Artifact
+       * Registry.
+       * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.PublicRepository public_repository = 1; + * + * + * @param value The publicRepository to set. + * @return This builder for chaining. + */ + public Builder setPublicRepository( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository + .PublicRepository + value) { + if (value == null) { + throw new NullPointerException(); + } + upstreamCase_ = 1; + upstream_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * One of the publicly available Docker repositories supported by Artifact
+       * Registry.
+       * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.PublicRepository public_repository = 1; + * + * + * @return This builder for chaining. + */ + public Builder clearPublicRepository() { + if (upstreamCase_ == 1) { + upstreamCase_ = 0; + upstream_ = null; + 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.RemoteRepositoryConfig.DockerRepository) + } + + // @@protoc_insertion_point(class_scope:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository) + private static final com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig + .DockerRepository + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository(); + } + + public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DockerRepository 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.RemoteRepositoryConfig.DockerRepository + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface MavenRepositoryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * One of the publicly available Maven repositories supported by Artifact
+     * Registry.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.PublicRepository public_repository = 1; + * + * + * @return Whether the publicRepository field is set. + */ + boolean hasPublicRepository(); + /** + * + * + *
+     * One of the publicly available Maven repositories supported by Artifact
+     * Registry.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.PublicRepository public_repository = 1; + * + * + * @return The enum numeric value on the wire for publicRepository. + */ + int getPublicRepositoryValue(); + /** + * + * + *
+     * One of the publicly available Maven repositories supported by Artifact
+     * Registry.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.PublicRepository public_repository = 1; + * + * + * @return The publicRepository. + */ + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.PublicRepository + getPublicRepository(); + + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.UpstreamCase + getUpstreamCase(); + } + /** + * + * + *
+   * Configuration for a Maven remote repository.
+   * 
+ * + * Protobuf type {@code + * google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository} + */ + public static final class MavenRepository extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository) + MavenRepositoryOrBuilder { + private static final long serialVersionUID = 0L; + // Use MavenRepository.newBuilder() to construct. + private MavenRepository(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private MavenRepository() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new MavenRepository(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_MavenRepository_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_MavenRepository_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.class, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.Builder + .class); + } + + /** + * + * + *
+     * Predefined list of publicly available Maven repositories like Maven
+     * Central.
+     * 
+ * + * Protobuf enum {@code + * google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.PublicRepository} + */ + public enum PublicRepository implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Unspecified repository.
+       * 
+ * + * PUBLIC_REPOSITORY_UNSPECIFIED = 0; + */ + PUBLIC_REPOSITORY_UNSPECIFIED(0), + /** + * + * + *
+       * Maven Central.
+       * 
+ * + * MAVEN_CENTRAL = 1; + */ + MAVEN_CENTRAL(1), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * Unspecified repository.
+       * 
+ * + * PUBLIC_REPOSITORY_UNSPECIFIED = 0; + */ + public static final int PUBLIC_REPOSITORY_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * Maven Central.
+       * 
+ * + * MAVEN_CENTRAL = 1; + */ + public static final int MAVEN_CENTRAL_VALUE = 1; + + 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 PublicRepository 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 PublicRepository forNumber(int value) { + switch (value) { + case 0: + return PUBLIC_REPOSITORY_UNSPECIFIED; + case 1: + return MAVEN_CENTRAL; + 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 PublicRepository findValueByNumber(int number) { + return PublicRepository.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.RemoteRepositoryConfig.MavenRepository + .getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final PublicRepository[] VALUES = values(); + + public static PublicRepository 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 PublicRepository(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.PublicRepository) + } + + private int upstreamCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object upstream_; + + public enum UpstreamCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + PUBLIC_REPOSITORY(1), + UPSTREAM_NOT_SET(0); + private final int value; + + private UpstreamCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static UpstreamCase valueOf(int value) { + return forNumber(value); + } + + public static UpstreamCase forNumber(int value) { + switch (value) { + case 1: + return PUBLIC_REPOSITORY; + case 0: + return UPSTREAM_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public UpstreamCase getUpstreamCase() { + return UpstreamCase.forNumber(upstreamCase_); + } + + public static final int PUBLIC_REPOSITORY_FIELD_NUMBER = 1; + /** + * + * + *
+     * One of the publicly available Maven repositories supported by Artifact
+     * Registry.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.PublicRepository public_repository = 1; + * + * + * @return Whether the publicRepository field is set. + */ + public boolean hasPublicRepository() { + return upstreamCase_ == 1; + } + /** + * + * + *
+     * One of the publicly available Maven repositories supported by Artifact
+     * Registry.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.PublicRepository public_repository = 1; + * + * + * @return The enum numeric value on the wire for publicRepository. + */ + public int getPublicRepositoryValue() { + if (upstreamCase_ == 1) { + return (java.lang.Integer) upstream_; + } + return 0; + } + /** + * + * + *
+     * One of the publicly available Maven repositories supported by Artifact
+     * Registry.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.PublicRepository public_repository = 1; + * + * + * @return The publicRepository. + */ + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository + .PublicRepository + getPublicRepository() { + if (upstreamCase_ == 1) { + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository + .PublicRepository + result = + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository + .PublicRepository.forNumber((java.lang.Integer) upstream_); + return result == null + ? com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository + .PublicRepository.UNRECOGNIZED + : result; + } + return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository + .PublicRepository.PUBLIC_REPOSITORY_UNSPECIFIED; + } + + 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 (upstreamCase_ == 1) { + output.writeEnum(1, ((java.lang.Integer) upstream_)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (upstreamCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeEnumSize( + 1, ((java.lang.Integer) upstream_)); + } + 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.RemoteRepositoryConfig.MavenRepository)) { + return super.equals(obj); + } + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository other = + (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository) obj; + + if (!getUpstreamCase().equals(other.getUpstreamCase())) return false; + switch (upstreamCase_) { + case 1: + if (getPublicRepositoryValue() != other.getPublicRepositoryValue()) return false; + break; + case 0: + default: + } + 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(); + switch (upstreamCase_) { + case 1: + hash = (37 * hash) + PUBLIC_REPOSITORY_FIELD_NUMBER; + hash = (53 * hash) + getPublicRepositoryValue(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository + 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.RemoteRepositoryConfig.MavenRepository + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository + 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.RemoteRepositoryConfig.MavenRepository + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository + 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.RemoteRepositoryConfig.MavenRepository + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository + 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.RemoteRepositoryConfig.MavenRepository + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository + 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.RemoteRepositoryConfig.MavenRepository + 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.RemoteRepositoryConfig.MavenRepository + 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.RemoteRepositoryConfig.MavenRepository 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; + } + /** + * + * + *
+     * Configuration for a Maven remote repository.
+     * 
+ * + * Protobuf type {@code + * google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository) + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepositoryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_MavenRepository_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_MavenRepository_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository + .class, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository + .Builder.class); + } + + // Construct using + // com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + upstreamCase_ = 0; + upstream_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_MavenRepository_descriptor; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository + getDefaultInstanceForType() { + return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository + build() { + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository + buildPartial() { + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository result = + new com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository result) { + result.upstreamCase_ = upstreamCase_; + result.upstream_ = this.upstream_; + } + + @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.RemoteRepositoryConfig.MavenRepository) { + return mergeFrom( + (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository other) { + if (other + == com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository + .getDefaultInstance()) return this; + switch (other.getUpstreamCase()) { + case PUBLIC_REPOSITORY: + { + setPublicRepositoryValue(other.getPublicRepositoryValue()); + break; + } + case UPSTREAM_NOT_SET: + { + break; + } + } + 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 8: + { + int rawValue = input.readEnum(); + upstreamCase_ = 1; + upstream_ = rawValue; + break; + } // case 8 + 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 upstreamCase_ = 0; + private java.lang.Object upstream_; + + public UpstreamCase getUpstreamCase() { + return UpstreamCase.forNumber(upstreamCase_); + } + + public Builder clearUpstream() { + upstreamCase_ = 0; + upstream_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+       * One of the publicly available Maven repositories supported by Artifact
+       * Registry.
+       * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.PublicRepository public_repository = 1; + * + * + * @return Whether the publicRepository field is set. + */ + @java.lang.Override + public boolean hasPublicRepository() { + return upstreamCase_ == 1; + } + /** + * + * + *
+       * One of the publicly available Maven repositories supported by Artifact
+       * Registry.
+       * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.PublicRepository public_repository = 1; + * + * + * @return The enum numeric value on the wire for publicRepository. + */ + @java.lang.Override + public int getPublicRepositoryValue() { + if (upstreamCase_ == 1) { + return ((java.lang.Integer) upstream_).intValue(); + } + return 0; + } + /** + * + * + *
+       * One of the publicly available Maven repositories supported by Artifact
+       * Registry.
+       * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.PublicRepository public_repository = 1; + * + * + * @param value The enum numeric value on the wire for publicRepository to set. + * @return This builder for chaining. + */ + public Builder setPublicRepositoryValue(int value) { + upstreamCase_ = 1; + upstream_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * One of the publicly available Maven repositories supported by Artifact
+       * Registry.
+       * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.PublicRepository public_repository = 1; + * + * + * @return The publicRepository. + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository + .PublicRepository + getPublicRepository() { + if (upstreamCase_ == 1) { + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository + .PublicRepository + result = + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository + .PublicRepository.forNumber((java.lang.Integer) upstream_); + return result == null + ? com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository + .PublicRepository.UNRECOGNIZED + : result; + } + return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository + .PublicRepository.PUBLIC_REPOSITORY_UNSPECIFIED; + } + /** + * + * + *
+       * One of the publicly available Maven repositories supported by Artifact
+       * Registry.
+       * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.PublicRepository public_repository = 1; + * + * + * @param value The publicRepository to set. + * @return This builder for chaining. + */ + public Builder setPublicRepository( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository + .PublicRepository + value) { + if (value == null) { + throw new NullPointerException(); + } + upstreamCase_ = 1; + upstream_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * One of the publicly available Maven repositories supported by Artifact
+       * Registry.
+       * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.PublicRepository public_repository = 1; + * + * + * @return This builder for chaining. + */ + public Builder clearPublicRepository() { + if (upstreamCase_ == 1) { + upstreamCase_ = 0; + upstream_ = null; + 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.RemoteRepositoryConfig.MavenRepository) + } + + // @@protoc_insertion_point(class_scope:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository) + private static final com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig + .MavenRepository + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository(); + } + + public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MavenRepository 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.RemoteRepositoryConfig.MavenRepository + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface NpmRepositoryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * One of the publicly available Npm repositories supported by Artifact
+     * Registry.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.PublicRepository public_repository = 1; + * + * + * @return Whether the publicRepository field is set. + */ + boolean hasPublicRepository(); + /** + * + * + *
+     * One of the publicly available Npm repositories supported by Artifact
+     * Registry.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.PublicRepository public_repository = 1; + * + * + * @return The enum numeric value on the wire for publicRepository. + */ + int getPublicRepositoryValue(); + /** + * + * + *
+     * One of the publicly available Npm repositories supported by Artifact
+     * Registry.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.PublicRepository public_repository = 1; + * + * + * @return The publicRepository. + */ + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.PublicRepository + getPublicRepository(); + + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.UpstreamCase + getUpstreamCase(); + } + /** + * + * + *
+   * Configuration for a Npm remote repository.
+   * 
+ * + * Protobuf type {@code google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository} + */ + public static final class NpmRepository extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository) + NpmRepositoryOrBuilder { + private static final long serialVersionUID = 0L; + // Use NpmRepository.newBuilder() to construct. + private NpmRepository(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private NpmRepository() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new NpmRepository(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_NpmRepository_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_NpmRepository_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.class, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.Builder + .class); + } + + /** + * + * + *
+     * Predefined list of publicly available NPM repositories like npmjs.
+     * 
+ * + * Protobuf enum {@code + * google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.PublicRepository} + */ + public enum PublicRepository implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Unspecified repository.
+       * 
+ * + * PUBLIC_REPOSITORY_UNSPECIFIED = 0; + */ + PUBLIC_REPOSITORY_UNSPECIFIED(0), + /** + * + * + *
+       * npmjs.
+       * 
+ * + * NPMJS = 1; + */ + NPMJS(1), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * Unspecified repository.
+       * 
+ * + * PUBLIC_REPOSITORY_UNSPECIFIED = 0; + */ + public static final int PUBLIC_REPOSITORY_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * npmjs.
+       * 
+ * + * NPMJS = 1; + */ + public static final int NPMJS_VALUE = 1; + + 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 PublicRepository 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 PublicRepository forNumber(int value) { + switch (value) { + case 0: + return PUBLIC_REPOSITORY_UNSPECIFIED; + case 1: + return NPMJS; + 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 PublicRepository findValueByNumber(int number) { + return PublicRepository.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.RemoteRepositoryConfig.NpmRepository + .getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final PublicRepository[] VALUES = values(); + + public static PublicRepository 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 PublicRepository(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.PublicRepository) + } + + private int upstreamCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object upstream_; + + public enum UpstreamCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + PUBLIC_REPOSITORY(1), + UPSTREAM_NOT_SET(0); + private final int value; + + private UpstreamCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static UpstreamCase valueOf(int value) { + return forNumber(value); + } + + public static UpstreamCase forNumber(int value) { + switch (value) { + case 1: + return PUBLIC_REPOSITORY; + case 0: + return UPSTREAM_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public UpstreamCase getUpstreamCase() { + return UpstreamCase.forNumber(upstreamCase_); + } + + public static final int PUBLIC_REPOSITORY_FIELD_NUMBER = 1; + /** + * + * + *
+     * One of the publicly available Npm repositories supported by Artifact
+     * Registry.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.PublicRepository public_repository = 1; + * + * + * @return Whether the publicRepository field is set. + */ + public boolean hasPublicRepository() { + return upstreamCase_ == 1; + } + /** + * + * + *
+     * One of the publicly available Npm repositories supported by Artifact
+     * Registry.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.PublicRepository public_repository = 1; + * + * + * @return The enum numeric value on the wire for publicRepository. + */ + public int getPublicRepositoryValue() { + if (upstreamCase_ == 1) { + return (java.lang.Integer) upstream_; + } + return 0; + } + /** + * + * + *
+     * One of the publicly available Npm repositories supported by Artifact
+     * Registry.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.PublicRepository public_repository = 1; + * + * + * @return The publicRepository. + */ + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository + .PublicRepository + getPublicRepository() { + if (upstreamCase_ == 1) { + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository + .PublicRepository + result = + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository + .PublicRepository.forNumber((java.lang.Integer) upstream_); + return result == null + ? com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository + .PublicRepository.UNRECOGNIZED + : result; + } + return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository + .PublicRepository.PUBLIC_REPOSITORY_UNSPECIFIED; + } + + 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 (upstreamCase_ == 1) { + output.writeEnum(1, ((java.lang.Integer) upstream_)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (upstreamCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeEnumSize( + 1, ((java.lang.Integer) upstream_)); + } + 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.RemoteRepositoryConfig.NpmRepository)) { + return super.equals(obj); + } + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository other = + (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository) obj; + + if (!getUpstreamCase().equals(other.getUpstreamCase())) return false; + switch (upstreamCase_) { + case 1: + if (getPublicRepositoryValue() != other.getPublicRepositoryValue()) return false; + break; + case 0: + default: + } + 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(); + switch (upstreamCase_) { + case 1: + hash = (37 * hash) + PUBLIC_REPOSITORY_FIELD_NUMBER; + hash = (53 * hash) + getPublicRepositoryValue(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository + 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.RemoteRepositoryConfig.NpmRepository + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository + 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.RemoteRepositoryConfig.NpmRepository + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository + 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.RemoteRepositoryConfig.NpmRepository + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository + 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.RemoteRepositoryConfig.NpmRepository + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository + 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.RemoteRepositoryConfig.NpmRepository + 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.RemoteRepositoryConfig.NpmRepository + 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.RemoteRepositoryConfig.NpmRepository 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; + } + /** + * + * + *
+     * Configuration for a Npm remote repository.
+     * 
+ * + * Protobuf type {@code + * google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository) + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepositoryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_NpmRepository_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_NpmRepository_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.class, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.Builder + .class); + } + + // Construct using + // com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + upstreamCase_ = 0; + upstream_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_NpmRepository_descriptor; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository + getDefaultInstanceForType() { + return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository build() { + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository + buildPartial() { + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository result = + new com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository result) { + result.upstreamCase_ = upstreamCase_; + result.upstream_ = this.upstream_; + } + + @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.RemoteRepositoryConfig.NpmRepository) { + return mergeFrom( + (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository other) { + if (other + == com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository + .getDefaultInstance()) return this; + switch (other.getUpstreamCase()) { + case PUBLIC_REPOSITORY: + { + setPublicRepositoryValue(other.getPublicRepositoryValue()); + break; + } + case UPSTREAM_NOT_SET: + { + break; + } + } + 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 8: + { + int rawValue = input.readEnum(); + upstreamCase_ = 1; + upstream_ = rawValue; + break; + } // case 8 + 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 upstreamCase_ = 0; + private java.lang.Object upstream_; + + public UpstreamCase getUpstreamCase() { + return UpstreamCase.forNumber(upstreamCase_); + } + + public Builder clearUpstream() { + upstreamCase_ = 0; + upstream_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+       * One of the publicly available Npm repositories supported by Artifact
+       * Registry.
+       * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.PublicRepository public_repository = 1; + * + * + * @return Whether the publicRepository field is set. + */ + @java.lang.Override + public boolean hasPublicRepository() { + return upstreamCase_ == 1; + } + /** + * + * + *
+       * One of the publicly available Npm repositories supported by Artifact
+       * Registry.
+       * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.PublicRepository public_repository = 1; + * + * + * @return The enum numeric value on the wire for publicRepository. + */ + @java.lang.Override + public int getPublicRepositoryValue() { + if (upstreamCase_ == 1) { + return ((java.lang.Integer) upstream_).intValue(); + } + return 0; + } + /** + * + * + *
+       * One of the publicly available Npm repositories supported by Artifact
+       * Registry.
+       * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.PublicRepository public_repository = 1; + * + * + * @param value The enum numeric value on the wire for publicRepository to set. + * @return This builder for chaining. + */ + public Builder setPublicRepositoryValue(int value) { + upstreamCase_ = 1; + upstream_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * One of the publicly available Npm repositories supported by Artifact
+       * Registry.
+       * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.PublicRepository public_repository = 1; + * + * + * @return The publicRepository. + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository + .PublicRepository + getPublicRepository() { + if (upstreamCase_ == 1) { + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository + .PublicRepository + result = + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository + .PublicRepository.forNumber((java.lang.Integer) upstream_); + return result == null + ? com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository + .PublicRepository.UNRECOGNIZED + : result; + } + return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository + .PublicRepository.PUBLIC_REPOSITORY_UNSPECIFIED; + } + /** + * + * + *
+       * One of the publicly available Npm repositories supported by Artifact
+       * Registry.
+       * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.PublicRepository public_repository = 1; + * + * + * @param value The publicRepository to set. + * @return This builder for chaining. + */ + public Builder setPublicRepository( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository + .PublicRepository + value) { + if (value == null) { + throw new NullPointerException(); + } + upstreamCase_ = 1; + upstream_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * One of the publicly available Npm repositories supported by Artifact
+       * Registry.
+       * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.PublicRepository public_repository = 1; + * + * + * @return This builder for chaining. + */ + public Builder clearPublicRepository() { + if (upstreamCase_ == 1) { + upstreamCase_ = 0; + upstream_ = null; + 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.RemoteRepositoryConfig.NpmRepository) + } + + // @@protoc_insertion_point(class_scope:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository) + private static final com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig + .NpmRepository + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository(); + } + + public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NpmRepository 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.RemoteRepositoryConfig.NpmRepository + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface PythonRepositoryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * One of the publicly available Python repositories supported by Artifact
+     * Registry.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.PublicRepository public_repository = 1; + * + * + * @return Whether the publicRepository field is set. + */ + boolean hasPublicRepository(); + /** + * + * + *
+     * One of the publicly available Python repositories supported by Artifact
+     * Registry.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.PublicRepository public_repository = 1; + * + * + * @return The enum numeric value on the wire for publicRepository. + */ + int getPublicRepositoryValue(); + /** + * + * + *
+     * One of the publicly available Python repositories supported by Artifact
+     * Registry.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.PublicRepository public_repository = 1; + * + * + * @return The publicRepository. + */ + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.PublicRepository + getPublicRepository(); + + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.UpstreamCase + getUpstreamCase(); + } + /** + * + * + *
+   * Configuration for a Python remote repository.
+   * 
+ * + * Protobuf type {@code + * google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository} + */ + public static final class PythonRepository extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository) + PythonRepositoryOrBuilder { + private static final long serialVersionUID = 0L; + // Use PythonRepository.newBuilder() to construct. + private PythonRepository(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PythonRepository() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PythonRepository(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_PythonRepository_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_PythonRepository_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.class, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository + .Builder.class); + } + + /** + * + * + *
+     * Predefined list of publicly available Python repositories like PyPI.org.
+     * 
+ * + * Protobuf enum {@code + * google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.PublicRepository} + */ + public enum PublicRepository implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Unspecified repository.
+       * 
+ * + * PUBLIC_REPOSITORY_UNSPECIFIED = 0; + */ + PUBLIC_REPOSITORY_UNSPECIFIED(0), + /** + * + * + *
+       * PyPI.
+       * 
+ * + * PYPI = 1; + */ + PYPI(1), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * Unspecified repository.
+       * 
+ * + * PUBLIC_REPOSITORY_UNSPECIFIED = 0; + */ + public static final int PUBLIC_REPOSITORY_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * PyPI.
+       * 
+ * + * PYPI = 1; + */ + public static final int PYPI_VALUE = 1; + + 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 PublicRepository 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 PublicRepository forNumber(int value) { + switch (value) { + case 0: + return PUBLIC_REPOSITORY_UNSPECIFIED; + case 1: + return PYPI; + 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 PublicRepository findValueByNumber(int number) { + return PublicRepository.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.RemoteRepositoryConfig.PythonRepository + .getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final PublicRepository[] VALUES = values(); + + public static PublicRepository 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 PublicRepository(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.PublicRepository) + } + + private int upstreamCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object upstream_; + + public enum UpstreamCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + PUBLIC_REPOSITORY(1), + UPSTREAM_NOT_SET(0); + private final int value; + + private UpstreamCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static UpstreamCase valueOf(int value) { + return forNumber(value); + } + + public static UpstreamCase forNumber(int value) { + switch (value) { + case 1: + return PUBLIC_REPOSITORY; + case 0: + return UPSTREAM_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public UpstreamCase getUpstreamCase() { + return UpstreamCase.forNumber(upstreamCase_); + } + + public static final int PUBLIC_REPOSITORY_FIELD_NUMBER = 1; + /** + * + * + *
+     * One of the publicly available Python repositories supported by Artifact
+     * Registry.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.PublicRepository public_repository = 1; + * + * + * @return Whether the publicRepository field is set. + */ + public boolean hasPublicRepository() { + return upstreamCase_ == 1; + } + /** + * + * + *
+     * One of the publicly available Python repositories supported by Artifact
+     * Registry.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.PublicRepository public_repository = 1; + * + * + * @return The enum numeric value on the wire for publicRepository. + */ + public int getPublicRepositoryValue() { + if (upstreamCase_ == 1) { + return (java.lang.Integer) upstream_; + } + return 0; + } + /** + * + * + *
+     * One of the publicly available Python repositories supported by Artifact
+     * Registry.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.PublicRepository public_repository = 1; + * + * + * @return The publicRepository. + */ + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository + .PublicRepository + getPublicRepository() { + if (upstreamCase_ == 1) { + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository + .PublicRepository + result = + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository + .PublicRepository.forNumber((java.lang.Integer) upstream_); + return result == null + ? com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository + .PublicRepository.UNRECOGNIZED + : result; + } + return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository + .PublicRepository.PUBLIC_REPOSITORY_UNSPECIFIED; + } + + 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 (upstreamCase_ == 1) { + output.writeEnum(1, ((java.lang.Integer) upstream_)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (upstreamCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeEnumSize( + 1, ((java.lang.Integer) upstream_)); + } + 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.RemoteRepositoryConfig.PythonRepository)) { + return super.equals(obj); + } + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository other = + (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository) obj; + + if (!getUpstreamCase().equals(other.getUpstreamCase())) return false; + switch (upstreamCase_) { + case 1: + if (getPublicRepositoryValue() != other.getPublicRepositoryValue()) return false; + break; + case 0: + default: + } + 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(); + switch (upstreamCase_) { + case 1: + hash = (37 * hash) + PUBLIC_REPOSITORY_FIELD_NUMBER; + hash = (53 * hash) + getPublicRepositoryValue(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository + 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.RemoteRepositoryConfig.PythonRepository + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository + 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.RemoteRepositoryConfig.PythonRepository + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository + 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.RemoteRepositoryConfig.PythonRepository + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository + 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.RemoteRepositoryConfig.PythonRepository + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository + 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.RemoteRepositoryConfig.PythonRepository + 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.RemoteRepositoryConfig.PythonRepository + 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.RemoteRepositoryConfig.PythonRepository 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; + } + /** + * + * + *
+     * Configuration for a Python remote repository.
+     * 
+ * + * Protobuf type {@code + * google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository) + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepositoryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_PythonRepository_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_PythonRepository_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository + .class, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository + .Builder.class); + } + + // Construct using + // com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + upstreamCase_ = 0; + upstream_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_PythonRepository_descriptor; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository + getDefaultInstanceForType() { + return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository + build() { + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository + buildPartial() { + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository result = + new com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository result) { + result.upstreamCase_ = upstreamCase_; + result.upstream_ = this.upstream_; + } + + @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.RemoteRepositoryConfig.PythonRepository) { + return mergeFrom( + (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository other) { + if (other + == com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository + .getDefaultInstance()) return this; + switch (other.getUpstreamCase()) { + case PUBLIC_REPOSITORY: + { + setPublicRepositoryValue(other.getPublicRepositoryValue()); + break; + } + case UPSTREAM_NOT_SET: + { + break; + } + } + 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 8: + { + int rawValue = input.readEnum(); + upstreamCase_ = 1; + upstream_ = rawValue; + break; + } // case 8 + 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 upstreamCase_ = 0; + private java.lang.Object upstream_; + + public UpstreamCase getUpstreamCase() { + return UpstreamCase.forNumber(upstreamCase_); + } + + public Builder clearUpstream() { + upstreamCase_ = 0; + upstream_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+       * One of the publicly available Python repositories supported by Artifact
+       * Registry.
+       * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.PublicRepository public_repository = 1; + * + * + * @return Whether the publicRepository field is set. + */ + @java.lang.Override + public boolean hasPublicRepository() { + return upstreamCase_ == 1; + } + /** + * + * + *
+       * One of the publicly available Python repositories supported by Artifact
+       * Registry.
+       * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.PublicRepository public_repository = 1; + * + * + * @return The enum numeric value on the wire for publicRepository. + */ + @java.lang.Override + public int getPublicRepositoryValue() { + if (upstreamCase_ == 1) { + return ((java.lang.Integer) upstream_).intValue(); + } + return 0; + } + /** + * + * + *
+       * One of the publicly available Python repositories supported by Artifact
+       * Registry.
+       * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.PublicRepository public_repository = 1; + * + * + * @param value The enum numeric value on the wire for publicRepository to set. + * @return This builder for chaining. + */ + public Builder setPublicRepositoryValue(int value) { + upstreamCase_ = 1; + upstream_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * One of the publicly available Python repositories supported by Artifact
+       * Registry.
+       * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.PublicRepository public_repository = 1; + * + * + * @return The publicRepository. + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository + .PublicRepository + getPublicRepository() { + if (upstreamCase_ == 1) { + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository + .PublicRepository + result = + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository + .PublicRepository.forNumber((java.lang.Integer) upstream_); + return result == null + ? com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository + .PublicRepository.UNRECOGNIZED + : result; + } + return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository + .PublicRepository.PUBLIC_REPOSITORY_UNSPECIFIED; + } + /** + * + * + *
+       * One of the publicly available Python repositories supported by Artifact
+       * Registry.
+       * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.PublicRepository public_repository = 1; + * + * + * @param value The publicRepository to set. + * @return This builder for chaining. + */ + public Builder setPublicRepository( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository + .PublicRepository + value) { + if (value == null) { + throw new NullPointerException(); + } + upstreamCase_ = 1; + upstream_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * One of the publicly available Python repositories supported by Artifact
+       * Registry.
+       * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.PublicRepository public_repository = 1; + * + * + * @return This builder for chaining. + */ + public Builder clearPublicRepository() { + if (upstreamCase_ == 1) { + upstreamCase_ = 0; + upstream_ = null; + 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.RemoteRepositoryConfig.PythonRepository) + } + + // @@protoc_insertion_point(class_scope:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository) + private static final com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig + .PythonRepository + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository(); + } + + public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PythonRepository 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.RemoteRepositoryConfig.PythonRepository + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface AptRepositoryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * One of the publicly available Apt repositories supported by Artifact
+     * Registry.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository public_repository = 1; + * + * + * @return Whether the publicRepository field is set. + */ + boolean hasPublicRepository(); + /** + * + * + *
+     * One of the publicly available Apt repositories supported by Artifact
+     * Registry.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository public_repository = 1; + * + * + * @return The publicRepository. + */ + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository + getPublicRepository(); + /** + * + * + *
+     * One of the publicly available Apt repositories supported by Artifact
+     * Registry.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository public_repository = 1; + * + */ + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + .PublicRepositoryOrBuilder + getPublicRepositoryOrBuilder(); + + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.UpstreamCase + getUpstreamCase(); + } + /** + * + * + *
+   * Configuration for an Apt remote repository.
+   * 
+ * + * Protobuf type {@code google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository} + */ + public static final class AptRepository extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository) + AptRepositoryOrBuilder { + private static final long serialVersionUID = 0L; + // Use AptRepository.newBuilder() to construct. + private AptRepository(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AptRepository() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AptRepository(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_AptRepository_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_AptRepository_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.class, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.Builder + .class); + } + + public interface PublicRepositoryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * A common public repository base for Apt.
+       * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository.RepositoryBase repository_base = 1; + * + * + * @return The enum numeric value on the wire for repositoryBase. + */ + int getRepositoryBaseValue(); + /** + * + * + *
+       * A common public repository base for Apt.
+       * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository.RepositoryBase repository_base = 1; + * + * + * @return The repositoryBase. + */ + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository + .RepositoryBase + getRepositoryBase(); + + /** + * + * + *
+       * A custom field to define a path to a specific repository from the base.
+       * 
+ * + * string repository_path = 2; + * + * @return The repositoryPath. + */ + java.lang.String getRepositoryPath(); + /** + * + * + *
+       * A custom field to define a path to a specific repository from the base.
+       * 
+ * + * string repository_path = 2; + * + * @return The bytes for repositoryPath. + */ + com.google.protobuf.ByteString getRepositoryPathBytes(); + } + /** + * + * + *
+     * Publicly available Apt repositories constructed from a common repository
+     * base and a custom repository path.
+     * 
+ * + * Protobuf type {@code + * google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository} + */ + public static final class PublicRepository extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository) + PublicRepositoryOrBuilder { + private static final long serialVersionUID = 0L; + // Use PublicRepository.newBuilder() to construct. + private PublicRepository(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PublicRepository() { + repositoryBase_ = 0; + repositoryPath_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PublicRepository(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_AptRepository_PublicRepository_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_AptRepository_PublicRepository_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + .PublicRepository.class, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + .PublicRepository.Builder.class); + } + + /** + * + * + *
+       * Predefined list of publicly available repository bases for Apt.
+       * 
+ * + * Protobuf enum {@code + * google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository.RepositoryBase} + */ + public enum RepositoryBase implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+         * Unspecified repository base.
+         * 
+ * + * REPOSITORY_BASE_UNSPECIFIED = 0; + */ + REPOSITORY_BASE_UNSPECIFIED(0), + /** + * + * + *
+         * Debian.
+         * 
+ * + * DEBIAN = 1; + */ + DEBIAN(1), + /** + * + * + *
+         * Ubuntu LTS/Pro.
+         * 
+ * + * UBUNTU = 2; + */ + UBUNTU(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+         * Unspecified repository base.
+         * 
+ * + * REPOSITORY_BASE_UNSPECIFIED = 0; + */ + public static final int REPOSITORY_BASE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+         * Debian.
+         * 
+ * + * DEBIAN = 1; + */ + public static final int DEBIAN_VALUE = 1; + /** + * + * + *
+         * Ubuntu LTS/Pro.
+         * 
+ * + * UBUNTU = 2; + */ + public static final int UBUNTU_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 RepositoryBase 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 RepositoryBase forNumber(int value) { + switch (value) { + case 0: + return REPOSITORY_BASE_UNSPECIFIED; + case 1: + return DEBIAN; + case 2: + return UBUNTU; + 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 RepositoryBase findValueByNumber(int number) { + return RepositoryBase.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.RemoteRepositoryConfig.AptRepository + .PublicRepository.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final RepositoryBase[] VALUES = values(); + + public static RepositoryBase 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 RepositoryBase(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository.RepositoryBase) + } + + public static final int REPOSITORY_BASE_FIELD_NUMBER = 1; + private int repositoryBase_ = 0; + /** + * + * + *
+       * A common public repository base for Apt.
+       * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository.RepositoryBase repository_base = 1; + * + * + * @return The enum numeric value on the wire for repositoryBase. + */ + @java.lang.Override + public int getRepositoryBaseValue() { + return repositoryBase_; + } + /** + * + * + *
+       * A common public repository base for Apt.
+       * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository.RepositoryBase repository_base = 1; + * + * + * @return The repositoryBase. + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + .PublicRepository.RepositoryBase + getRepositoryBase() { + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + .PublicRepository.RepositoryBase + result = + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + .PublicRepository.RepositoryBase.forNumber(repositoryBase_); + return result == null + ? com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + .PublicRepository.RepositoryBase.UNRECOGNIZED + : result; + } + + public static final int REPOSITORY_PATH_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object repositoryPath_ = ""; + /** + * + * + *
+       * A custom field to define a path to a specific repository from the base.
+       * 
+ * + * string repository_path = 2; + * + * @return The repositoryPath. + */ + @java.lang.Override + public java.lang.String getRepositoryPath() { + java.lang.Object ref = repositoryPath_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + repositoryPath_ = s; + return s; + } + } + /** + * + * + *
+       * A custom field to define a path to a specific repository from the base.
+       * 
+ * + * string repository_path = 2; + * + * @return The bytes for repositoryPath. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRepositoryPathBytes() { + java.lang.Object ref = repositoryPath_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + repositoryPath_ = 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 (repositoryBase_ + != com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + .PublicRepository.RepositoryBase.REPOSITORY_BASE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, repositoryBase_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(repositoryPath_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, repositoryPath_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (repositoryBase_ + != com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + .PublicRepository.RepositoryBase.REPOSITORY_BASE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, repositoryBase_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(repositoryPath_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, repositoryPath_); + } + 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.RemoteRepositoryConfig.AptRepository + .PublicRepository)) { + return super.equals(obj); + } + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + .PublicRepository + other = + (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + .PublicRepository) + obj; + + if (repositoryBase_ != other.repositoryBase_) return false; + if (!getRepositoryPath().equals(other.getRepositoryPath())) 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) + REPOSITORY_BASE_FIELD_NUMBER; + hash = (53 * hash) + repositoryBase_; + hash = (37 * hash) + REPOSITORY_PATH_FIELD_NUMBER; + hash = (53 * hash) + getRepositoryPath().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + .PublicRepository + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + .PublicRepository + 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.RemoteRepositoryConfig.AptRepository + .PublicRepository + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + .PublicRepository + 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.RemoteRepositoryConfig.AptRepository + .PublicRepository + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + .PublicRepository + 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.RemoteRepositoryConfig.AptRepository + .PublicRepository + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + .PublicRepository + 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.RemoteRepositoryConfig.AptRepository + .PublicRepository + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + .PublicRepository + 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.RemoteRepositoryConfig.AptRepository + .PublicRepository + 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.RemoteRepositoryConfig.AptRepository + .PublicRepository + 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.RemoteRepositoryConfig.AptRepository + .PublicRepository + 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; + } + /** + * + * + *
+       * Publicly available Apt repositories constructed from a common repository
+       * base and a custom repository path.
+       * 
+ * + * Protobuf type {@code + * google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository) + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + .PublicRepositoryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_AptRepository_PublicRepository_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_AptRepository_PublicRepository_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + .PublicRepository.class, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + .PublicRepository.Builder.class); + } + + // Construct using + // com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + repositoryBase_ = 0; + repositoryPath_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_AptRepository_PublicRepository_descriptor; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + .PublicRepository + getDefaultInstanceForType() { + return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + .PublicRepository.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + .PublicRepository + build() { + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + .PublicRepository + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + .PublicRepository + buildPartial() { + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + .PublicRepository + result = + new com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + .PublicRepository(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + .PublicRepository + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.repositoryBase_ = repositoryBase_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.repositoryPath_ = repositoryPath_; + } + } + + @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.RemoteRepositoryConfig.AptRepository + .PublicRepository) { + return mergeFrom( + (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + .PublicRepository) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + .PublicRepository + other) { + if (other + == com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + .PublicRepository.getDefaultInstance()) return this; + if (other.repositoryBase_ != 0) { + setRepositoryBaseValue(other.getRepositoryBaseValue()); + } + if (!other.getRepositoryPath().isEmpty()) { + repositoryPath_ = other.repositoryPath_; + 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 8: + { + repositoryBase_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + repositoryPath_ = 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 int repositoryBase_ = 0; + /** + * + * + *
+         * A common public repository base for Apt.
+         * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository.RepositoryBase repository_base = 1; + * + * + * @return The enum numeric value on the wire for repositoryBase. + */ + @java.lang.Override + public int getRepositoryBaseValue() { + return repositoryBase_; + } + /** + * + * + *
+         * A common public repository base for Apt.
+         * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository.RepositoryBase repository_base = 1; + * + * + * @param value The enum numeric value on the wire for repositoryBase to set. + * @return This builder for chaining. + */ + public Builder setRepositoryBaseValue(int value) { + repositoryBase_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * A common public repository base for Apt.
+         * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository.RepositoryBase repository_base = 1; + * + * + * @return The repositoryBase. + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + .PublicRepository.RepositoryBase + getRepositoryBase() { + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + .PublicRepository.RepositoryBase + result = + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + .PublicRepository.RepositoryBase.forNumber(repositoryBase_); + return result == null + ? com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + .PublicRepository.RepositoryBase.UNRECOGNIZED + : result; + } + /** + * + * + *
+         * A common public repository base for Apt.
+         * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository.RepositoryBase repository_base = 1; + * + * + * @param value The repositoryBase to set. + * @return This builder for chaining. + */ + public Builder setRepositoryBase( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + .PublicRepository.RepositoryBase + value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + repositoryBase_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+         * A common public repository base for Apt.
+         * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository.RepositoryBase repository_base = 1; + * + * + * @return This builder for chaining. + */ + public Builder clearRepositoryBase() { + bitField0_ = (bitField0_ & ~0x00000001); + repositoryBase_ = 0; + onChanged(); + return this; + } + + private java.lang.Object repositoryPath_ = ""; + /** + * + * + *
+         * A custom field to define a path to a specific repository from the base.
+         * 
+ * + * string repository_path = 2; + * + * @return The repositoryPath. + */ + public java.lang.String getRepositoryPath() { + java.lang.Object ref = repositoryPath_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + repositoryPath_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * A custom field to define a path to a specific repository from the base.
+         * 
+ * + * string repository_path = 2; + * + * @return The bytes for repositoryPath. + */ + public com.google.protobuf.ByteString getRepositoryPathBytes() { + java.lang.Object ref = repositoryPath_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + repositoryPath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * A custom field to define a path to a specific repository from the base.
+         * 
+ * + * string repository_path = 2; + * + * @param value The repositoryPath to set. + * @return This builder for chaining. + */ + public Builder setRepositoryPath(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + repositoryPath_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * A custom field to define a path to a specific repository from the base.
+         * 
+ * + * string repository_path = 2; + * + * @return This builder for chaining. + */ + public Builder clearRepositoryPath() { + repositoryPath_ = getDefaultInstance().getRepositoryPath(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+         * A custom field to define a path to a specific repository from the base.
+         * 
+ * + * string repository_path = 2; + * + * @param value The bytes for repositoryPath to set. + * @return This builder for chaining. + */ + public Builder setRepositoryPathBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + repositoryPath_ = 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.RemoteRepositoryConfig.AptRepository.PublicRepository) + } + + // @@protoc_insertion_point(class_scope:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository) + private static final com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig + .AptRepository.PublicRepository + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + .PublicRepository(); + } + + public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + .PublicRepository + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PublicRepository 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.RemoteRepositoryConfig.AptRepository + .PublicRepository + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int upstreamCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object upstream_; + + public enum UpstreamCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + PUBLIC_REPOSITORY(1), + UPSTREAM_NOT_SET(0); + private final int value; + + private UpstreamCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static UpstreamCase valueOf(int value) { + return forNumber(value); + } + + public static UpstreamCase forNumber(int value) { + switch (value) { + case 1: + return PUBLIC_REPOSITORY; + case 0: + return UPSTREAM_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public UpstreamCase getUpstreamCase() { + return UpstreamCase.forNumber(upstreamCase_); + } + + public static final int PUBLIC_REPOSITORY_FIELD_NUMBER = 1; + /** + * + * + *
+     * One of the publicly available Apt repositories supported by Artifact
+     * Registry.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository public_repository = 1; + * + * + * @return Whether the publicRepository field is set. + */ + @java.lang.Override + public boolean hasPublicRepository() { + return upstreamCase_ == 1; + } + /** + * + * + *
+     * One of the publicly available Apt repositories supported by Artifact
+     * Registry.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository public_repository = 1; + * + * + * @return The publicRepository. + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + .PublicRepository + getPublicRepository() { + if (upstreamCase_ == 1) { + return (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + .PublicRepository) + upstream_; + } + return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + .PublicRepository.getDefaultInstance(); + } + /** + * + * + *
+     * One of the publicly available Apt repositories supported by Artifact
+     * Registry.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository public_repository = 1; + * + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + .PublicRepositoryOrBuilder + getPublicRepositoryOrBuilder() { + if (upstreamCase_ == 1) { + return (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + .PublicRepository) + upstream_; + } + return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + .PublicRepository.getDefaultInstance(); + } + + 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 (upstreamCase_ == 1) { + output.writeMessage( + 1, + (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + .PublicRepository) + upstream_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (upstreamCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, + (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + .PublicRepository) + upstream_); + } + 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.RemoteRepositoryConfig.AptRepository)) { + return super.equals(obj); + } + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository other = + (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository) obj; + + if (!getUpstreamCase().equals(other.getUpstreamCase())) return false; + switch (upstreamCase_) { + case 1: + if (!getPublicRepository().equals(other.getPublicRepository())) return false; + break; + case 0: + default: + } + 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(); + switch (upstreamCase_) { + case 1: + hash = (37 * hash) + PUBLIC_REPOSITORY_FIELD_NUMBER; + hash = (53 * hash) + getPublicRepository().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + 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.RemoteRepositoryConfig.AptRepository + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + 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.RemoteRepositoryConfig.AptRepository + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + 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.RemoteRepositoryConfig.AptRepository + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + 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.RemoteRepositoryConfig.AptRepository + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + 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.RemoteRepositoryConfig.AptRepository + 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.RemoteRepositoryConfig.AptRepository + 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.RemoteRepositoryConfig.AptRepository 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; + } + /** + * + * + *
+     * Configuration for an Apt remote repository.
+     * 
+ * + * Protobuf type {@code + * google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository) + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepositoryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_AptRepository_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_AptRepository_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.class, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.Builder + .class); + } + + // Construct using + // com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (publicRepositoryBuilder_ != null) { + publicRepositoryBuilder_.clear(); + } + upstreamCase_ = 0; + upstream_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_AptRepository_descriptor; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + getDefaultInstanceForType() { + return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository build() { + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + buildPartial() { + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository result = + new com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository result) { + result.upstreamCase_ = upstreamCase_; + result.upstream_ = this.upstream_; + if (upstreamCase_ == 1 && publicRepositoryBuilder_ != null) { + result.upstream_ = publicRepositoryBuilder_.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.RemoteRepositoryConfig.AptRepository) { + return mergeFrom( + (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository other) { + if (other + == com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + .getDefaultInstance()) return this; + switch (other.getUpstreamCase()) { + case PUBLIC_REPOSITORY: + { + mergePublicRepository(other.getPublicRepository()); + break; + } + case UPSTREAM_NOT_SET: + { + break; + } + } + 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( + getPublicRepositoryFieldBuilder().getBuilder(), extensionRegistry); + upstreamCase_ = 1; + 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 upstreamCase_ = 0; + private java.lang.Object upstream_; + + public UpstreamCase getUpstreamCase() { + return UpstreamCase.forNumber(upstreamCase_); + } + + public Builder clearUpstream() { + upstreamCase_ = 0; + upstream_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + .PublicRepository, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + .PublicRepository.Builder, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + .PublicRepositoryOrBuilder> + publicRepositoryBuilder_; + /** + * + * + *
+       * One of the publicly available Apt repositories supported by Artifact
+       * Registry.
+       * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository public_repository = 1; + * + * + * @return Whether the publicRepository field is set. + */ + @java.lang.Override + public boolean hasPublicRepository() { + return upstreamCase_ == 1; + } + /** + * + * + *
+       * One of the publicly available Apt repositories supported by Artifact
+       * Registry.
+       * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository public_repository = 1; + * + * + * @return The publicRepository. + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + .PublicRepository + getPublicRepository() { + if (publicRepositoryBuilder_ == null) { + if (upstreamCase_ == 1) { + return (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + .PublicRepository) + upstream_; + } + return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + .PublicRepository.getDefaultInstance(); + } else { + if (upstreamCase_ == 1) { + return publicRepositoryBuilder_.getMessage(); + } + return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + .PublicRepository.getDefaultInstance(); + } + } + /** + * + * + *
+       * One of the publicly available Apt repositories supported by Artifact
+       * Registry.
+       * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository public_repository = 1; + * + */ + public Builder setPublicRepository( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + .PublicRepository + value) { + if (publicRepositoryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + upstream_ = value; + onChanged(); + } else { + publicRepositoryBuilder_.setMessage(value); + } + upstreamCase_ = 1; + return this; + } + /** + * + * + *
+       * One of the publicly available Apt repositories supported by Artifact
+       * Registry.
+       * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository public_repository = 1; + * + */ + public Builder setPublicRepository( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + .PublicRepository.Builder + builderForValue) { + if (publicRepositoryBuilder_ == null) { + upstream_ = builderForValue.build(); + onChanged(); + } else { + publicRepositoryBuilder_.setMessage(builderForValue.build()); + } + upstreamCase_ = 1; + return this; + } + /** + * + * + *
+       * One of the publicly available Apt repositories supported by Artifact
+       * Registry.
+       * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository public_repository = 1; + * + */ + public Builder mergePublicRepository( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + .PublicRepository + value) { + if (publicRepositoryBuilder_ == null) { + if (upstreamCase_ == 1 + && upstream_ + != com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + .PublicRepository.getDefaultInstance()) { + upstream_ = + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + .PublicRepository.newBuilder( + (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig + .AptRepository.PublicRepository) + upstream_) + .mergeFrom(value) + .buildPartial(); + } else { + upstream_ = value; + } + onChanged(); + } else { + if (upstreamCase_ == 1) { + publicRepositoryBuilder_.mergeFrom(value); + } else { + publicRepositoryBuilder_.setMessage(value); + } + } + upstreamCase_ = 1; + return this; + } + /** + * + * + *
+       * One of the publicly available Apt repositories supported by Artifact
+       * Registry.
+       * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository public_repository = 1; + * + */ + public Builder clearPublicRepository() { + if (publicRepositoryBuilder_ == null) { + if (upstreamCase_ == 1) { + upstreamCase_ = 0; + upstream_ = null; + onChanged(); + } + } else { + if (upstreamCase_ == 1) { + upstreamCase_ = 0; + upstream_ = null; + } + publicRepositoryBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * One of the publicly available Apt repositories supported by Artifact
+       * Registry.
+       * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository public_repository = 1; + * + */ + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + .PublicRepository.Builder + getPublicRepositoryBuilder() { + return getPublicRepositoryFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * One of the publicly available Apt repositories supported by Artifact
+       * Registry.
+       * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository public_repository = 1; + * + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + .PublicRepositoryOrBuilder + getPublicRepositoryOrBuilder() { + if ((upstreamCase_ == 1) && (publicRepositoryBuilder_ != null)) { + return publicRepositoryBuilder_.getMessageOrBuilder(); + } else { + if (upstreamCase_ == 1) { + return (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + .PublicRepository) + upstream_; + } + return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + .PublicRepository.getDefaultInstance(); + } + } + /** + * + * + *
+       * One of the publicly available Apt repositories supported by Artifact
+       * Registry.
+       * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository public_repository = 1; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + .PublicRepository, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + .PublicRepository.Builder, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + .PublicRepositoryOrBuilder> + getPublicRepositoryFieldBuilder() { + if (publicRepositoryBuilder_ == null) { + if (!(upstreamCase_ == 1)) { + upstream_ = + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + .PublicRepository.getDefaultInstance(); + } + publicRepositoryBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + .PublicRepository, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + .PublicRepository.Builder, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + .PublicRepositoryOrBuilder>( + (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + .PublicRepository) + upstream_, + getParentForChildren(), + isClean()); + upstream_ = null; + } + upstreamCase_ = 1; + onChanged(); + return publicRepositoryBuilder_; + } + + @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.RemoteRepositoryConfig.AptRepository) + } + + // @@protoc_insertion_point(class_scope:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository) + private static final com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig + .AptRepository + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository(); + } + + public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AptRepository 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.RemoteRepositoryConfig.AptRepository + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface YumRepositoryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * One of the publicly available Yum repositories supported by Artifact
+     * Registry.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository public_repository = 1; + * + * + * @return Whether the publicRepository field is set. + */ + boolean hasPublicRepository(); + /** + * + * + *
+     * One of the publicly available Yum repositories supported by Artifact
+     * Registry.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository public_repository = 1; + * + * + * @return The publicRepository. + */ + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository + getPublicRepository(); + /** + * + * + *
+     * One of the publicly available Yum repositories supported by Artifact
+     * Registry.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository public_repository = 1; + * + */ + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + .PublicRepositoryOrBuilder + getPublicRepositoryOrBuilder(); + + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.UpstreamCase + getUpstreamCase(); + } + /** + * + * + *
+   * Configuration for a Yum remote repository.
+   * 
+ * + * Protobuf type {@code google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository} + */ + public static final class YumRepository extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository) + YumRepositoryOrBuilder { + private static final long serialVersionUID = 0L; + // Use YumRepository.newBuilder() to construct. + private YumRepository(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private YumRepository() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new YumRepository(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_YumRepository_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_YumRepository_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.class, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.Builder + .class); + } + + public interface PublicRepositoryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * A common public repository base for Yum.
+       * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository.RepositoryBase repository_base = 1; + * + * + * @return The enum numeric value on the wire for repositoryBase. + */ + int getRepositoryBaseValue(); + /** + * + * + *
+       * A common public repository base for Yum.
+       * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository.RepositoryBase repository_base = 1; + * + * + * @return The repositoryBase. + */ + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository + .RepositoryBase + getRepositoryBase(); + + /** + * + * + *
+       * A custom field to define a path to a specific repository from the base.
+       * 
+ * + * string repository_path = 2; + * + * @return The repositoryPath. + */ + java.lang.String getRepositoryPath(); + /** + * + * + *
+       * A custom field to define a path to a specific repository from the base.
+       * 
+ * + * string repository_path = 2; + * + * @return The bytes for repositoryPath. + */ + com.google.protobuf.ByteString getRepositoryPathBytes(); + } + /** + * + * + *
+     * Publicly available Yum repositories constructed from a common repository
+     * base and a custom repository path.
+     * 
+ * + * Protobuf type {@code + * google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository} + */ + public static final class PublicRepository extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository) + PublicRepositoryOrBuilder { + private static final long serialVersionUID = 0L; + // Use PublicRepository.newBuilder() to construct. + private PublicRepository(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PublicRepository() { + repositoryBase_ = 0; + repositoryPath_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PublicRepository(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_YumRepository_PublicRepository_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_YumRepository_PublicRepository_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + .PublicRepository.class, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + .PublicRepository.Builder.class); + } + + /** + * + * + *
+       * Predefined list of publicly available repository bases for Yum.
+       * 
+ * + * Protobuf enum {@code + * google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository.RepositoryBase} + */ + public enum RepositoryBase implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+         * Unspecified repository base.
+         * 
+ * + * REPOSITORY_BASE_UNSPECIFIED = 0; + */ + REPOSITORY_BASE_UNSPECIFIED(0), + /** + * + * + *
+         * CentOS.
+         * 
+ * + * CENTOS = 1; + */ + CENTOS(1), + /** + * + * + *
+         * CentOS Debug.
+         * 
+ * + * CENTOS_DEBUG = 2; + */ + CENTOS_DEBUG(2), + /** + * + * + *
+         * CentOS Vault.
+         * 
+ * + * CENTOS_VAULT = 3; + */ + CENTOS_VAULT(3), + /** + * + * + *
+         * CentOS Stream.
+         * 
+ * + * CENTOS_STREAM = 4; + */ + CENTOS_STREAM(4), + /** + * + * + *
+         * Rocky.
+         * 
+ * + * ROCKY = 5; + */ + ROCKY(5), + /** + * + * + *
+         * Fedora Extra Packages for Enterprise Linux (EPEL).
+         * 
+ * + * EPEL = 6; + */ + EPEL(6), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+         * Unspecified repository base.
+         * 
+ * + * REPOSITORY_BASE_UNSPECIFIED = 0; + */ + public static final int REPOSITORY_BASE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+         * CentOS.
+         * 
+ * + * CENTOS = 1; + */ + public static final int CENTOS_VALUE = 1; + /** + * + * + *
+         * CentOS Debug.
+         * 
+ * + * CENTOS_DEBUG = 2; + */ + public static final int CENTOS_DEBUG_VALUE = 2; + /** + * + * + *
+         * CentOS Vault.
+         * 
+ * + * CENTOS_VAULT = 3; + */ + public static final int CENTOS_VAULT_VALUE = 3; + /** + * + * + *
+         * CentOS Stream.
+         * 
+ * + * CENTOS_STREAM = 4; + */ + public static final int CENTOS_STREAM_VALUE = 4; + /** + * + * + *
+         * Rocky.
+         * 
+ * + * ROCKY = 5; + */ + public static final int ROCKY_VALUE = 5; + /** + * + * + *
+         * Fedora Extra Packages for Enterprise Linux (EPEL).
+         * 
+ * + * EPEL = 6; + */ + public static final int EPEL_VALUE = 6; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static RepositoryBase 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 RepositoryBase forNumber(int value) { + switch (value) { + case 0: + return REPOSITORY_BASE_UNSPECIFIED; + case 1: + return CENTOS; + case 2: + return CENTOS_DEBUG; + case 3: + return CENTOS_VAULT; + case 4: + return CENTOS_STREAM; + case 5: + return ROCKY; + case 6: + return EPEL; + 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 RepositoryBase findValueByNumber(int number) { + return RepositoryBase.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.RemoteRepositoryConfig.YumRepository + .PublicRepository.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final RepositoryBase[] VALUES = values(); + + public static RepositoryBase 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 RepositoryBase(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository.RepositoryBase) + } + + public static final int REPOSITORY_BASE_FIELD_NUMBER = 1; + private int repositoryBase_ = 0; + /** + * + * + *
+       * A common public repository base for Yum.
+       * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository.RepositoryBase repository_base = 1; + * + * + * @return The enum numeric value on the wire for repositoryBase. + */ + @java.lang.Override + public int getRepositoryBaseValue() { + return repositoryBase_; + } + /** + * + * + *
+       * A common public repository base for Yum.
+       * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository.RepositoryBase repository_base = 1; + * + * + * @return The repositoryBase. + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + .PublicRepository.RepositoryBase + getRepositoryBase() { + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + .PublicRepository.RepositoryBase + result = + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + .PublicRepository.RepositoryBase.forNumber(repositoryBase_); + return result == null + ? com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + .PublicRepository.RepositoryBase.UNRECOGNIZED + : result; + } + + public static final int REPOSITORY_PATH_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object repositoryPath_ = ""; + /** + * + * + *
+       * A custom field to define a path to a specific repository from the base.
+       * 
+ * + * string repository_path = 2; + * + * @return The repositoryPath. + */ + @java.lang.Override + public java.lang.String getRepositoryPath() { + java.lang.Object ref = repositoryPath_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + repositoryPath_ = s; + return s; + } + } + /** + * + * + *
+       * A custom field to define a path to a specific repository from the base.
+       * 
+ * + * string repository_path = 2; + * + * @return The bytes for repositoryPath. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRepositoryPathBytes() { + java.lang.Object ref = repositoryPath_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + repositoryPath_ = 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 (repositoryBase_ + != com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + .PublicRepository.RepositoryBase.REPOSITORY_BASE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, repositoryBase_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(repositoryPath_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, repositoryPath_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (repositoryBase_ + != com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + .PublicRepository.RepositoryBase.REPOSITORY_BASE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, repositoryBase_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(repositoryPath_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, repositoryPath_); + } + 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.RemoteRepositoryConfig.YumRepository + .PublicRepository)) { + return super.equals(obj); + } + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + .PublicRepository + other = + (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + .PublicRepository) + obj; + + if (repositoryBase_ != other.repositoryBase_) return false; + if (!getRepositoryPath().equals(other.getRepositoryPath())) 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) + REPOSITORY_BASE_FIELD_NUMBER; + hash = (53 * hash) + repositoryBase_; + hash = (37 * hash) + REPOSITORY_PATH_FIELD_NUMBER; + hash = (53 * hash) + getRepositoryPath().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + .PublicRepository + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + .PublicRepository + 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.RemoteRepositoryConfig.YumRepository + .PublicRepository + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + .PublicRepository + 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.RemoteRepositoryConfig.YumRepository + .PublicRepository + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + .PublicRepository + 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.RemoteRepositoryConfig.YumRepository + .PublicRepository + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + .PublicRepository + 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.RemoteRepositoryConfig.YumRepository + .PublicRepository + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + .PublicRepository + 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.RemoteRepositoryConfig.YumRepository + .PublicRepository + 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.RemoteRepositoryConfig.YumRepository + .PublicRepository + 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.RemoteRepositoryConfig.YumRepository + .PublicRepository + 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; + } + /** + * + * + *
+       * Publicly available Yum repositories constructed from a common repository
+       * base and a custom repository path.
+       * 
+ * + * Protobuf type {@code + * google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository) + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + .PublicRepositoryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_YumRepository_PublicRepository_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_YumRepository_PublicRepository_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + .PublicRepository.class, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + .PublicRepository.Builder.class); + } + + // Construct using + // com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + repositoryBase_ = 0; + repositoryPath_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_YumRepository_PublicRepository_descriptor; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + .PublicRepository + getDefaultInstanceForType() { + return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + .PublicRepository.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + .PublicRepository + build() { + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + .PublicRepository + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + .PublicRepository + buildPartial() { + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + .PublicRepository + result = + new com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + .PublicRepository(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + .PublicRepository + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.repositoryBase_ = repositoryBase_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.repositoryPath_ = repositoryPath_; + } + } + + @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.RemoteRepositoryConfig.YumRepository + .PublicRepository) { + return mergeFrom( + (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + .PublicRepository) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + .PublicRepository + other) { + if (other + == com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + .PublicRepository.getDefaultInstance()) return this; + if (other.repositoryBase_ != 0) { + setRepositoryBaseValue(other.getRepositoryBaseValue()); + } + if (!other.getRepositoryPath().isEmpty()) { + repositoryPath_ = other.repositoryPath_; + 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 8: + { + repositoryBase_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + repositoryPath_ = 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 int repositoryBase_ = 0; + /** + * + * + *
+         * A common public repository base for Yum.
+         * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository.RepositoryBase repository_base = 1; + * + * + * @return The enum numeric value on the wire for repositoryBase. + */ + @java.lang.Override + public int getRepositoryBaseValue() { + return repositoryBase_; + } + /** + * + * + *
+         * A common public repository base for Yum.
+         * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository.RepositoryBase repository_base = 1; + * + * + * @param value The enum numeric value on the wire for repositoryBase to set. + * @return This builder for chaining. + */ + public Builder setRepositoryBaseValue(int value) { + repositoryBase_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * A common public repository base for Yum.
+         * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository.RepositoryBase repository_base = 1; + * + * + * @return The repositoryBase. + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + .PublicRepository.RepositoryBase + getRepositoryBase() { + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + .PublicRepository.RepositoryBase + result = + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + .PublicRepository.RepositoryBase.forNumber(repositoryBase_); + return result == null + ? com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + .PublicRepository.RepositoryBase.UNRECOGNIZED + : result; + } + /** + * + * + *
+         * A common public repository base for Yum.
+         * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository.RepositoryBase repository_base = 1; + * + * + * @param value The repositoryBase to set. + * @return This builder for chaining. + */ + public Builder setRepositoryBase( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + .PublicRepository.RepositoryBase + value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + repositoryBase_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+         * A common public repository base for Yum.
+         * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository.RepositoryBase repository_base = 1; + * + * + * @return This builder for chaining. + */ + public Builder clearRepositoryBase() { + bitField0_ = (bitField0_ & ~0x00000001); + repositoryBase_ = 0; + onChanged(); + return this; + } + + private java.lang.Object repositoryPath_ = ""; + /** + * + * + *
+         * A custom field to define a path to a specific repository from the base.
+         * 
+ * + * string repository_path = 2; + * + * @return The repositoryPath. + */ + public java.lang.String getRepositoryPath() { + java.lang.Object ref = repositoryPath_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + repositoryPath_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * A custom field to define a path to a specific repository from the base.
+         * 
+ * + * string repository_path = 2; + * + * @return The bytes for repositoryPath. + */ + public com.google.protobuf.ByteString getRepositoryPathBytes() { + java.lang.Object ref = repositoryPath_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + repositoryPath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * A custom field to define a path to a specific repository from the base.
+         * 
+ * + * string repository_path = 2; + * + * @param value The repositoryPath to set. + * @return This builder for chaining. + */ + public Builder setRepositoryPath(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + repositoryPath_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * A custom field to define a path to a specific repository from the base.
+         * 
+ * + * string repository_path = 2; + * + * @return This builder for chaining. + */ + public Builder clearRepositoryPath() { + repositoryPath_ = getDefaultInstance().getRepositoryPath(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+         * A custom field to define a path to a specific repository from the base.
+         * 
+ * + * string repository_path = 2; + * + * @param value The bytes for repositoryPath to set. + * @return This builder for chaining. + */ + public Builder setRepositoryPathBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + repositoryPath_ = 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.RemoteRepositoryConfig.YumRepository.PublicRepository) + } + + // @@protoc_insertion_point(class_scope:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository) + private static final com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig + .YumRepository.PublicRepository + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + .PublicRepository(); + } + + public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + .PublicRepository + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PublicRepository 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.RemoteRepositoryConfig.YumRepository + .PublicRepository + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int upstreamCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object upstream_; + + public enum UpstreamCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + PUBLIC_REPOSITORY(1), + UPSTREAM_NOT_SET(0); + private final int value; + + private UpstreamCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static UpstreamCase valueOf(int value) { + return forNumber(value); + } + + public static UpstreamCase forNumber(int value) { + switch (value) { + case 1: + return PUBLIC_REPOSITORY; + case 0: + return UPSTREAM_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public UpstreamCase getUpstreamCase() { + return UpstreamCase.forNumber(upstreamCase_); + } + + public static final int PUBLIC_REPOSITORY_FIELD_NUMBER = 1; + /** + * + * + *
+     * One of the publicly available Yum repositories supported by Artifact
+     * Registry.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository public_repository = 1; + * + * + * @return Whether the publicRepository field is set. + */ + @java.lang.Override + public boolean hasPublicRepository() { + return upstreamCase_ == 1; + } + /** + * + * + *
+     * One of the publicly available Yum repositories supported by Artifact
+     * Registry.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository public_repository = 1; + * + * + * @return The publicRepository. + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + .PublicRepository + getPublicRepository() { + if (upstreamCase_ == 1) { + return (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + .PublicRepository) + upstream_; + } + return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + .PublicRepository.getDefaultInstance(); + } + /** + * + * + *
+     * One of the publicly available Yum repositories supported by Artifact
+     * Registry.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository public_repository = 1; + * + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + .PublicRepositoryOrBuilder + getPublicRepositoryOrBuilder() { + if (upstreamCase_ == 1) { + return (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + .PublicRepository) + upstream_; + } + return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + .PublicRepository.getDefaultInstance(); + } + + 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 (upstreamCase_ == 1) { + output.writeMessage( + 1, + (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + .PublicRepository) + upstream_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (upstreamCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, + (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + .PublicRepository) + upstream_); + } + 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.RemoteRepositoryConfig.YumRepository)) { + return super.equals(obj); + } + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository other = + (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository) obj; + + if (!getUpstreamCase().equals(other.getUpstreamCase())) return false; + switch (upstreamCase_) { + case 1: + if (!getPublicRepository().equals(other.getPublicRepository())) return false; + break; + case 0: + default: + } + 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(); + switch (upstreamCase_) { + case 1: + hash = (37 * hash) + PUBLIC_REPOSITORY_FIELD_NUMBER; + hash = (53 * hash) + getPublicRepository().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + 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.RemoteRepositoryConfig.YumRepository + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + 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.RemoteRepositoryConfig.YumRepository + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + 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.RemoteRepositoryConfig.YumRepository + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + 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.RemoteRepositoryConfig.YumRepository + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + 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.RemoteRepositoryConfig.YumRepository + 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.RemoteRepositoryConfig.YumRepository + 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.RemoteRepositoryConfig.YumRepository 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; + } + /** + * + * + *
+     * Configuration for a Yum remote repository.
+     * 
+ * + * Protobuf type {@code + * google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository) + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepositoryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_YumRepository_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_YumRepository_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.class, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.Builder + .class); + } + + // Construct using + // com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (publicRepositoryBuilder_ != null) { + publicRepositoryBuilder_.clear(); + } + upstreamCase_ = 0; + upstream_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_YumRepository_descriptor; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + getDefaultInstanceForType() { + return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository build() { + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + buildPartial() { + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository result = + new com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository result) { + result.upstreamCase_ = upstreamCase_; + result.upstream_ = this.upstream_; + if (upstreamCase_ == 1 && publicRepositoryBuilder_ != null) { + result.upstream_ = publicRepositoryBuilder_.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.RemoteRepositoryConfig.YumRepository) { + return mergeFrom( + (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository other) { + if (other + == com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + .getDefaultInstance()) return this; + switch (other.getUpstreamCase()) { + case PUBLIC_REPOSITORY: + { + mergePublicRepository(other.getPublicRepository()); + break; + } + case UPSTREAM_NOT_SET: + { + break; + } + } + 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( + getPublicRepositoryFieldBuilder().getBuilder(), extensionRegistry); + upstreamCase_ = 1; + 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 upstreamCase_ = 0; + private java.lang.Object upstream_; + + public UpstreamCase getUpstreamCase() { + return UpstreamCase.forNumber(upstreamCase_); + } + + public Builder clearUpstream() { + upstreamCase_ = 0; + upstream_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + .PublicRepository, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + .PublicRepository.Builder, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + .PublicRepositoryOrBuilder> + publicRepositoryBuilder_; + /** + * + * + *
+       * One of the publicly available Yum repositories supported by Artifact
+       * Registry.
+       * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository public_repository = 1; + * + * + * @return Whether the publicRepository field is set. + */ + @java.lang.Override + public boolean hasPublicRepository() { + return upstreamCase_ == 1; + } + /** + * + * + *
+       * One of the publicly available Yum repositories supported by Artifact
+       * Registry.
+       * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository public_repository = 1; + * + * + * @return The publicRepository. + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + .PublicRepository + getPublicRepository() { + if (publicRepositoryBuilder_ == null) { + if (upstreamCase_ == 1) { + return (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + .PublicRepository) + upstream_; + } + return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + .PublicRepository.getDefaultInstance(); + } else { + if (upstreamCase_ == 1) { + return publicRepositoryBuilder_.getMessage(); + } + return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + .PublicRepository.getDefaultInstance(); + } + } + /** + * + * + *
+       * One of the publicly available Yum repositories supported by Artifact
+       * Registry.
+       * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository public_repository = 1; + * + */ + public Builder setPublicRepository( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + .PublicRepository + value) { + if (publicRepositoryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + upstream_ = value; + onChanged(); + } else { + publicRepositoryBuilder_.setMessage(value); + } + upstreamCase_ = 1; + return this; + } + /** + * + * + *
+       * One of the publicly available Yum repositories supported by Artifact
+       * Registry.
+       * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository public_repository = 1; + * + */ + public Builder setPublicRepository( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + .PublicRepository.Builder + builderForValue) { + if (publicRepositoryBuilder_ == null) { + upstream_ = builderForValue.build(); + onChanged(); + } else { + publicRepositoryBuilder_.setMessage(builderForValue.build()); + } + upstreamCase_ = 1; + return this; + } + /** + * + * + *
+       * One of the publicly available Yum repositories supported by Artifact
+       * Registry.
+       * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository public_repository = 1; + * + */ + public Builder mergePublicRepository( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + .PublicRepository + value) { + if (publicRepositoryBuilder_ == null) { + if (upstreamCase_ == 1 + && upstream_ + != com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + .PublicRepository.getDefaultInstance()) { + upstream_ = + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + .PublicRepository.newBuilder( + (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig + .YumRepository.PublicRepository) + upstream_) + .mergeFrom(value) + .buildPartial(); + } else { + upstream_ = value; + } + onChanged(); + } else { + if (upstreamCase_ == 1) { + publicRepositoryBuilder_.mergeFrom(value); + } else { + publicRepositoryBuilder_.setMessage(value); + } + } + upstreamCase_ = 1; + return this; + } + /** + * + * + *
+       * One of the publicly available Yum repositories supported by Artifact
+       * Registry.
+       * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository public_repository = 1; + * + */ + public Builder clearPublicRepository() { + if (publicRepositoryBuilder_ == null) { + if (upstreamCase_ == 1) { + upstreamCase_ = 0; + upstream_ = null; + onChanged(); + } + } else { + if (upstreamCase_ == 1) { + upstreamCase_ = 0; + upstream_ = null; + } + publicRepositoryBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * One of the publicly available Yum repositories supported by Artifact
+       * Registry.
+       * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository public_repository = 1; + * + */ + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + .PublicRepository.Builder + getPublicRepositoryBuilder() { + return getPublicRepositoryFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * One of the publicly available Yum repositories supported by Artifact
+       * Registry.
+       * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository public_repository = 1; + * + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + .PublicRepositoryOrBuilder + getPublicRepositoryOrBuilder() { + if ((upstreamCase_ == 1) && (publicRepositoryBuilder_ != null)) { + return publicRepositoryBuilder_.getMessageOrBuilder(); + } else { + if (upstreamCase_ == 1) { + return (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + .PublicRepository) + upstream_; + } + return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + .PublicRepository.getDefaultInstance(); + } + } + /** + * + * + *
+       * One of the publicly available Yum repositories supported by Artifact
+       * Registry.
+       * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository public_repository = 1; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + .PublicRepository, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + .PublicRepository.Builder, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + .PublicRepositoryOrBuilder> + getPublicRepositoryFieldBuilder() { + if (publicRepositoryBuilder_ == null) { + if (!(upstreamCase_ == 1)) { + upstream_ = + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + .PublicRepository.getDefaultInstance(); + } + publicRepositoryBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + .PublicRepository, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + .PublicRepository.Builder, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + .PublicRepositoryOrBuilder>( + (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + .PublicRepository) + upstream_, + getParentForChildren(), + isClean()); + upstream_ = null; + } + upstreamCase_ = 1; + onChanged(); + return publicRepositoryBuilder_; + } + + @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.RemoteRepositoryConfig.YumRepository) + } + + // @@protoc_insertion_point(class_scope:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository) + private static final com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig + .YumRepository + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository(); + } + + public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public YumRepository 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.RemoteRepositoryConfig.YumRepository + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int remoteSourceCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object remoteSource_; + + public enum RemoteSourceCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + DOCKER_REPOSITORY(2), + MAVEN_REPOSITORY(3), + NPM_REPOSITORY(4), + PYTHON_REPOSITORY(5), + APT_REPOSITORY(6), + YUM_REPOSITORY(7), + REMOTESOURCE_NOT_SET(0); + private final int value; + + private RemoteSourceCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static RemoteSourceCase valueOf(int value) { + return forNumber(value); + } + + public static RemoteSourceCase forNumber(int value) { + switch (value) { + case 2: + return DOCKER_REPOSITORY; + case 3: + return MAVEN_REPOSITORY; + case 4: + return NPM_REPOSITORY; + case 5: + return PYTHON_REPOSITORY; + case 6: + return APT_REPOSITORY; + case 7: + return YUM_REPOSITORY; + case 0: + return REMOTESOURCE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public RemoteSourceCase getRemoteSourceCase() { + return RemoteSourceCase.forNumber(remoteSourceCase_); + } + + public static final int DOCKER_REPOSITORY_FIELD_NUMBER = 2; + /** + * + * + *
+   * Specific settings for a Docker remote repository.
+   * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository docker_repository = 2; + * + * + * @return Whether the dockerRepository field is set. + */ + @java.lang.Override + public boolean hasDockerRepository() { + return remoteSourceCase_ == 2; + } + /** + * + * + *
+   * Specific settings for a Docker remote repository.
+   * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository docker_repository = 2; + * + * + * @return The dockerRepository. + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository + getDockerRepository() { + if (remoteSourceCase_ == 2) { + return (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository) + remoteSource_; + } + return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository + .getDefaultInstance(); + } + /** + * + * + *
+   * Specific settings for a Docker remote repository.
+   * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository docker_repository = 2; + * + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepositoryOrBuilder + getDockerRepositoryOrBuilder() { + if (remoteSourceCase_ == 2) { + return (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository) + remoteSource_; + } + return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository + .getDefaultInstance(); + } + + public static final int MAVEN_REPOSITORY_FIELD_NUMBER = 3; + /** + * + * + *
+   * Specific settings for a Maven remote repository.
+   * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository maven_repository = 3; + * + * + * @return Whether the mavenRepository field is set. + */ + @java.lang.Override + public boolean hasMavenRepository() { + return remoteSourceCase_ == 3; + } + /** + * + * + *
+   * Specific settings for a Maven remote repository.
+   * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository maven_repository = 3; + * + * + * @return The mavenRepository. + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository + getMavenRepository() { + if (remoteSourceCase_ == 3) { + return (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository) + remoteSource_; + } + return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository + .getDefaultInstance(); + } + /** + * + * + *
+   * Specific settings for a Maven remote repository.
+   * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository maven_repository = 3; + * + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepositoryOrBuilder + getMavenRepositoryOrBuilder() { + if (remoteSourceCase_ == 3) { + return (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository) + remoteSource_; + } + return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository + .getDefaultInstance(); + } + + public static final int NPM_REPOSITORY_FIELD_NUMBER = 4; + /** + * + * + *
+   * Specific settings for an Npm remote repository.
+   * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository npm_repository = 4; + * + * + * @return Whether the npmRepository field is set. + */ + @java.lang.Override + public boolean hasNpmRepository() { + return remoteSourceCase_ == 4; + } + /** + * + * + *
+   * Specific settings for an Npm remote repository.
+   * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository npm_repository = 4; + * + * + * @return The npmRepository. + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository + getNpmRepository() { + if (remoteSourceCase_ == 4) { + return (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository) + remoteSource_; + } + return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository + .getDefaultInstance(); + } + /** + * + * + *
+   * Specific settings for an Npm remote repository.
+   * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository npm_repository = 4; + * + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepositoryOrBuilder + getNpmRepositoryOrBuilder() { + if (remoteSourceCase_ == 4) { + return (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository) + remoteSource_; + } + return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository + .getDefaultInstance(); + } + + public static final int PYTHON_REPOSITORY_FIELD_NUMBER = 5; + /** + * + * + *
+   * Specific settings for a Python remote repository.
+   * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository python_repository = 5; + * + * + * @return Whether the pythonRepository field is set. + */ + @java.lang.Override + public boolean hasPythonRepository() { + return remoteSourceCase_ == 5; + } + /** + * + * + *
+   * Specific settings for a Python remote repository.
+   * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository python_repository = 5; + * + * + * @return The pythonRepository. + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository + getPythonRepository() { + if (remoteSourceCase_ == 5) { + return (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository) + remoteSource_; + } + return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository + .getDefaultInstance(); + } + /** + * + * + *
+   * Specific settings for a Python remote repository.
+   * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository python_repository = 5; + * + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepositoryOrBuilder + getPythonRepositoryOrBuilder() { + if (remoteSourceCase_ == 5) { + return (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository) + remoteSource_; + } + return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository + .getDefaultInstance(); + } + + public static final int APT_REPOSITORY_FIELD_NUMBER = 6; + /** + * + * + *
+   * Specific settings for an Apt remote repository.
+   * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository apt_repository = 6; + * + * + * @return Whether the aptRepository field is set. + */ + @java.lang.Override + public boolean hasAptRepository() { + return remoteSourceCase_ == 6; + } + /** + * + * + *
+   * Specific settings for an Apt remote repository.
+   * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository apt_repository = 6; + * + * + * @return The aptRepository. + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + getAptRepository() { + if (remoteSourceCase_ == 6) { + return (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository) + remoteSource_; + } + return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + .getDefaultInstance(); + } + /** + * + * + *
+   * Specific settings for an Apt remote repository.
+   * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository apt_repository = 6; + * + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepositoryOrBuilder + getAptRepositoryOrBuilder() { + if (remoteSourceCase_ == 6) { + return (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository) + remoteSource_; + } + return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + .getDefaultInstance(); + } + + public static final int YUM_REPOSITORY_FIELD_NUMBER = 7; + /** + * + * + *
+   * Specific settings for a Yum remote repository.
+   * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository yum_repository = 7; + * + * + * @return Whether the yumRepository field is set. + */ + @java.lang.Override + public boolean hasYumRepository() { + return remoteSourceCase_ == 7; + } + /** + * + * + *
+   * Specific settings for a Yum remote repository.
+   * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository yum_repository = 7; + * + * + * @return The yumRepository. + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + getYumRepository() { + if (remoteSourceCase_ == 7) { + return (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository) + remoteSource_; + } + return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + .getDefaultInstance(); + } + /** + * + * + *
+   * Specific settings for a Yum remote repository.
+   * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository yum_repository = 7; + * + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepositoryOrBuilder + getYumRepositoryOrBuilder() { + if (remoteSourceCase_ == 7) { + return (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository) + remoteSource_; + } + return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + .getDefaultInstance(); + } + + public static final int DESCRIPTION_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + * + * + *
+   * The description of the remote source.
+   * 
+ * + * string description = 1; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * The description of the remote source.
+   * 
+ * + * string description = 1; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UPSTREAM_CREDENTIALS_FIELD_NUMBER = 9; + private com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + upstreamCredentials_; + /** + * + * + *
+   * Optional. The credentials used to access the remote repository.
+   * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials upstream_credentials = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the upstreamCredentials field is set. + */ + @java.lang.Override + public boolean hasUpstreamCredentials() { + return upstreamCredentials_ != null; + } + /** + * + * + *
+   * Optional. The credentials used to access the remote repository.
+   * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials upstream_credentials = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The upstreamCredentials. + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + getUpstreamCredentials() { + return upstreamCredentials_ == null + ? com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + .getDefaultInstance() + : upstreamCredentials_; + } + /** + * + * + *
+   * Optional. The credentials used to access the remote repository.
+   * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials upstream_credentials = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentialsOrBuilder + getUpstreamCredentialsOrBuilder() { + return upstreamCredentials_ == null + ? com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + .getDefaultInstance() + : upstreamCredentials_; + } + + 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(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, description_); + } + if (remoteSourceCase_ == 2) { + output.writeMessage( + 2, + (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository) + remoteSource_); + } + if (remoteSourceCase_ == 3) { + output.writeMessage( + 3, + (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository) + remoteSource_); + } + if (remoteSourceCase_ == 4) { + output.writeMessage( + 4, + (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository) + remoteSource_); + } + if (remoteSourceCase_ == 5) { + output.writeMessage( + 5, + (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository) + remoteSource_); + } + if (remoteSourceCase_ == 6) { + output.writeMessage( + 6, + (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository) + remoteSource_); + } + if (remoteSourceCase_ == 7) { + output.writeMessage( + 7, + (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository) + remoteSource_); + } + if (upstreamCredentials_ != null) { + output.writeMessage(9, getUpstreamCredentials()); + } + 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(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, description_); + } + if (remoteSourceCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, + (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository) + remoteSource_); + } + if (remoteSourceCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, + (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository) + remoteSource_); + } + if (remoteSourceCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, + (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository) + remoteSource_); + } + if (remoteSourceCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, + (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository) + remoteSource_); + } + if (remoteSourceCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, + (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository) + remoteSource_); + } + if (remoteSourceCase_ == 7) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 7, + (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository) + remoteSource_); + } + if (upstreamCredentials_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getUpstreamCredentials()); + } + 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.RemoteRepositoryConfig)) { + return super.equals(obj); + } + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig other = + (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig) obj; + + if (!getDescription().equals(other.getDescription())) return false; + if (hasUpstreamCredentials() != other.hasUpstreamCredentials()) return false; + if (hasUpstreamCredentials()) { + if (!getUpstreamCredentials().equals(other.getUpstreamCredentials())) return false; + } + if (!getRemoteSourceCase().equals(other.getRemoteSourceCase())) return false; + switch (remoteSourceCase_) { + case 2: + if (!getDockerRepository().equals(other.getDockerRepository())) return false; + break; + case 3: + if (!getMavenRepository().equals(other.getMavenRepository())) return false; + break; + case 4: + if (!getNpmRepository().equals(other.getNpmRepository())) return false; + break; + case 5: + if (!getPythonRepository().equals(other.getPythonRepository())) return false; + break; + case 6: + if (!getAptRepository().equals(other.getAptRepository())) return false; + break; + case 7: + if (!getYumRepository().equals(other.getYumRepository())) return false; + break; + case 0: + default: + } + 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) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (hasUpstreamCredentials()) { + hash = (37 * hash) + UPSTREAM_CREDENTIALS_FIELD_NUMBER; + hash = (53 * hash) + getUpstreamCredentials().hashCode(); + } + switch (remoteSourceCase_) { + case 2: + hash = (37 * hash) + DOCKER_REPOSITORY_FIELD_NUMBER; + hash = (53 * hash) + getDockerRepository().hashCode(); + break; + case 3: + hash = (37 * hash) + MAVEN_REPOSITORY_FIELD_NUMBER; + hash = (53 * hash) + getMavenRepository().hashCode(); + break; + case 4: + hash = (37 * hash) + NPM_REPOSITORY_FIELD_NUMBER; + hash = (53 * hash) + getNpmRepository().hashCode(); + break; + case 5: + hash = (37 * hash) + PYTHON_REPOSITORY_FIELD_NUMBER; + hash = (53 * hash) + getPythonRepository().hashCode(); + break; + case 6: + hash = (37 * hash) + APT_REPOSITORY_FIELD_NUMBER; + hash = (53 * hash) + getAptRepository().hashCode(); + break; + case 7: + hash = (37 * hash) + YUM_REPOSITORY_FIELD_NUMBER; + hash = (53 * hash) + getYumRepository().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig 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.RemoteRepositoryConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig 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.RemoteRepositoryConfig parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig 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.RemoteRepositoryConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig 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.RemoteRepositoryConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig 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.RemoteRepositoryConfig 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.RemoteRepositoryConfig 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.RemoteRepositoryConfig 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; + } + /** + * + * + *
+   * Remote repository configuration.
+   * 
+ * + * Protobuf type {@code google.devtools.artifactregistry.v1.RemoteRepositoryConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devtools.artifactregistry.v1.RemoteRepositoryConfig) + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.class, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.Builder.class); + } + + // Construct using com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (dockerRepositoryBuilder_ != null) { + dockerRepositoryBuilder_.clear(); + } + if (mavenRepositoryBuilder_ != null) { + mavenRepositoryBuilder_.clear(); + } + if (npmRepositoryBuilder_ != null) { + npmRepositoryBuilder_.clear(); + } + if (pythonRepositoryBuilder_ != null) { + pythonRepositoryBuilder_.clear(); + } + if (aptRepositoryBuilder_ != null) { + aptRepositoryBuilder_.clear(); + } + if (yumRepositoryBuilder_ != null) { + yumRepositoryBuilder_.clear(); + } + description_ = ""; + upstreamCredentials_ = null; + if (upstreamCredentialsBuilder_ != null) { + upstreamCredentialsBuilder_.dispose(); + upstreamCredentialsBuilder_ = null; + } + remoteSourceCase_ = 0; + remoteSource_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_descriptor; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig + getDefaultInstanceForType() { + return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig build() { + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig buildPartial() { + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig result = + new com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000040) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.upstreamCredentials_ = + upstreamCredentialsBuilder_ == null + ? upstreamCredentials_ + : upstreamCredentialsBuilder_.build(); + } + } + + private void buildPartialOneofs( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig result) { + result.remoteSourceCase_ = remoteSourceCase_; + result.remoteSource_ = this.remoteSource_; + if (remoteSourceCase_ == 2 && dockerRepositoryBuilder_ != null) { + result.remoteSource_ = dockerRepositoryBuilder_.build(); + } + if (remoteSourceCase_ == 3 && mavenRepositoryBuilder_ != null) { + result.remoteSource_ = mavenRepositoryBuilder_.build(); + } + if (remoteSourceCase_ == 4 && npmRepositoryBuilder_ != null) { + result.remoteSource_ = npmRepositoryBuilder_.build(); + } + if (remoteSourceCase_ == 5 && pythonRepositoryBuilder_ != null) { + result.remoteSource_ = pythonRepositoryBuilder_.build(); + } + if (remoteSourceCase_ == 6 && aptRepositoryBuilder_ != null) { + result.remoteSource_ = aptRepositoryBuilder_.build(); + } + if (remoteSourceCase_ == 7 && yumRepositoryBuilder_ != null) { + result.remoteSource_ = yumRepositoryBuilder_.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.RemoteRepositoryConfig) { + return mergeFrom((com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig other) { + if (other + == com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.getDefaultInstance()) + return this; + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000040; + onChanged(); + } + if (other.hasUpstreamCredentials()) { + mergeUpstreamCredentials(other.getUpstreamCredentials()); + } + switch (other.getRemoteSourceCase()) { + case DOCKER_REPOSITORY: + { + mergeDockerRepository(other.getDockerRepository()); + break; + } + case MAVEN_REPOSITORY: + { + mergeMavenRepository(other.getMavenRepository()); + break; + } + case NPM_REPOSITORY: + { + mergeNpmRepository(other.getNpmRepository()); + break; + } + case PYTHON_REPOSITORY: + { + mergePythonRepository(other.getPythonRepository()); + break; + } + case APT_REPOSITORY: + { + mergeAptRepository(other.getAptRepository()); + break; + } + case YUM_REPOSITORY: + { + mergeYumRepository(other.getYumRepository()); + break; + } + case REMOTESOURCE_NOT_SET: + { + break; + } + } + 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: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 10 + case 18: + { + input.readMessage( + getDockerRepositoryFieldBuilder().getBuilder(), extensionRegistry); + remoteSourceCase_ = 2; + break; + } // case 18 + case 26: + { + input.readMessage(getMavenRepositoryFieldBuilder().getBuilder(), extensionRegistry); + remoteSourceCase_ = 3; + break; + } // case 26 + case 34: + { + input.readMessage(getNpmRepositoryFieldBuilder().getBuilder(), extensionRegistry); + remoteSourceCase_ = 4; + break; + } // case 34 + case 42: + { + input.readMessage( + getPythonRepositoryFieldBuilder().getBuilder(), extensionRegistry); + remoteSourceCase_ = 5; + break; + } // case 42 + case 50: + { + input.readMessage(getAptRepositoryFieldBuilder().getBuilder(), extensionRegistry); + remoteSourceCase_ = 6; + break; + } // case 50 + case 58: + { + input.readMessage(getYumRepositoryFieldBuilder().getBuilder(), extensionRegistry); + remoteSourceCase_ = 7; + break; + } // case 58 + case 74: + { + input.readMessage( + getUpstreamCredentialsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 74 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int remoteSourceCase_ = 0; + private java.lang.Object remoteSource_; + + public RemoteSourceCase getRemoteSourceCase() { + return RemoteSourceCase.forNumber(remoteSourceCase_); + } + + public Builder clearRemoteSource() { + remoteSourceCase_ = 0; + remoteSource_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.Builder, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig + .DockerRepositoryOrBuilder> + dockerRepositoryBuilder_; + /** + * + * + *
+     * Specific settings for a Docker remote repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository docker_repository = 2; + * + * + * @return Whether the dockerRepository field is set. + */ + @java.lang.Override + public boolean hasDockerRepository() { + return remoteSourceCase_ == 2; + } + /** + * + * + *
+     * Specific settings for a Docker remote repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository docker_repository = 2; + * + * + * @return The dockerRepository. + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository + getDockerRepository() { + if (dockerRepositoryBuilder_ == null) { + if (remoteSourceCase_ == 2) { + return (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository) + remoteSource_; + } + return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository + .getDefaultInstance(); + } else { + if (remoteSourceCase_ == 2) { + return dockerRepositoryBuilder_.getMessage(); + } + return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Specific settings for a Docker remote repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository docker_repository = 2; + * + */ + public Builder setDockerRepository( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository value) { + if (dockerRepositoryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + remoteSource_ = value; + onChanged(); + } else { + dockerRepositoryBuilder_.setMessage(value); + } + remoteSourceCase_ = 2; + return this; + } + /** + * + * + *
+     * Specific settings for a Docker remote repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository docker_repository = 2; + * + */ + public Builder setDockerRepository( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.Builder + builderForValue) { + if (dockerRepositoryBuilder_ == null) { + remoteSource_ = builderForValue.build(); + onChanged(); + } else { + dockerRepositoryBuilder_.setMessage(builderForValue.build()); + } + remoteSourceCase_ = 2; + return this; + } + /** + * + * + *
+     * Specific settings for a Docker remote repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository docker_repository = 2; + * + */ + public Builder mergeDockerRepository( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository value) { + if (dockerRepositoryBuilder_ == null) { + if (remoteSourceCase_ == 2 + && remoteSource_ + != com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository + .getDefaultInstance()) { + remoteSource_ = + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository + .newBuilder( + (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig + .DockerRepository) + remoteSource_) + .mergeFrom(value) + .buildPartial(); + } else { + remoteSource_ = value; + } + onChanged(); + } else { + if (remoteSourceCase_ == 2) { + dockerRepositoryBuilder_.mergeFrom(value); + } else { + dockerRepositoryBuilder_.setMessage(value); + } + } + remoteSourceCase_ = 2; + return this; + } + /** + * + * + *
+     * Specific settings for a Docker remote repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository docker_repository = 2; + * + */ + public Builder clearDockerRepository() { + if (dockerRepositoryBuilder_ == null) { + if (remoteSourceCase_ == 2) { + remoteSourceCase_ = 0; + remoteSource_ = null; + onChanged(); + } + } else { + if (remoteSourceCase_ == 2) { + remoteSourceCase_ = 0; + remoteSource_ = null; + } + dockerRepositoryBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Specific settings for a Docker remote repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository docker_repository = 2; + * + */ + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.Builder + getDockerRepositoryBuilder() { + return getDockerRepositoryFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Specific settings for a Docker remote repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository docker_repository = 2; + * + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepositoryOrBuilder + getDockerRepositoryOrBuilder() { + if ((remoteSourceCase_ == 2) && (dockerRepositoryBuilder_ != null)) { + return dockerRepositoryBuilder_.getMessageOrBuilder(); + } else { + if (remoteSourceCase_ == 2) { + return (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository) + remoteSource_; + } + return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Specific settings for a Docker remote repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository docker_repository = 2; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.Builder, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig + .DockerRepositoryOrBuilder> + getDockerRepositoryFieldBuilder() { + if (dockerRepositoryBuilder_ == null) { + if (!(remoteSourceCase_ == 2)) { + remoteSource_ = + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository + .getDefaultInstance(); + } + dockerRepositoryBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository + .Builder, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig + .DockerRepositoryOrBuilder>( + (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository) + remoteSource_, + getParentForChildren(), + isClean()); + remoteSource_ = null; + } + remoteSourceCase_ = 2; + onChanged(); + return dockerRepositoryBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.Builder, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepositoryOrBuilder> + mavenRepositoryBuilder_; + /** + * + * + *
+     * Specific settings for a Maven remote repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository maven_repository = 3; + * + * + * @return Whether the mavenRepository field is set. + */ + @java.lang.Override + public boolean hasMavenRepository() { + return remoteSourceCase_ == 3; + } + /** + * + * + *
+     * Specific settings for a Maven remote repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository maven_repository = 3; + * + * + * @return The mavenRepository. + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository + getMavenRepository() { + if (mavenRepositoryBuilder_ == null) { + if (remoteSourceCase_ == 3) { + return (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository) + remoteSource_; + } + return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository + .getDefaultInstance(); + } else { + if (remoteSourceCase_ == 3) { + return mavenRepositoryBuilder_.getMessage(); + } + return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Specific settings for a Maven remote repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository maven_repository = 3; + * + */ + public Builder setMavenRepository( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository value) { + if (mavenRepositoryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + remoteSource_ = value; + onChanged(); + } else { + mavenRepositoryBuilder_.setMessage(value); + } + remoteSourceCase_ = 3; + return this; + } + /** + * + * + *
+     * Specific settings for a Maven remote repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository maven_repository = 3; + * + */ + public Builder setMavenRepository( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.Builder + builderForValue) { + if (mavenRepositoryBuilder_ == null) { + remoteSource_ = builderForValue.build(); + onChanged(); + } else { + mavenRepositoryBuilder_.setMessage(builderForValue.build()); + } + remoteSourceCase_ = 3; + return this; + } + /** + * + * + *
+     * Specific settings for a Maven remote repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository maven_repository = 3; + * + */ + public Builder mergeMavenRepository( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository value) { + if (mavenRepositoryBuilder_ == null) { + if (remoteSourceCase_ == 3 + && remoteSource_ + != com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository + .getDefaultInstance()) { + remoteSource_ = + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository + .newBuilder( + (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig + .MavenRepository) + remoteSource_) + .mergeFrom(value) + .buildPartial(); + } else { + remoteSource_ = value; + } + onChanged(); + } else { + if (remoteSourceCase_ == 3) { + mavenRepositoryBuilder_.mergeFrom(value); + } else { + mavenRepositoryBuilder_.setMessage(value); + } + } + remoteSourceCase_ = 3; + return this; + } + /** + * + * + *
+     * Specific settings for a Maven remote repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository maven_repository = 3; + * + */ + public Builder clearMavenRepository() { + if (mavenRepositoryBuilder_ == null) { + if (remoteSourceCase_ == 3) { + remoteSourceCase_ = 0; + remoteSource_ = null; + onChanged(); + } + } else { + if (remoteSourceCase_ == 3) { + remoteSourceCase_ = 0; + remoteSource_ = null; + } + mavenRepositoryBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Specific settings for a Maven remote repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository maven_repository = 3; + * + */ + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.Builder + getMavenRepositoryBuilder() { + return getMavenRepositoryFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Specific settings for a Maven remote repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository maven_repository = 3; + * + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepositoryOrBuilder + getMavenRepositoryOrBuilder() { + if ((remoteSourceCase_ == 3) && (mavenRepositoryBuilder_ != null)) { + return mavenRepositoryBuilder_.getMessageOrBuilder(); + } else { + if (remoteSourceCase_ == 3) { + return (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository) + remoteSource_; + } + return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Specific settings for a Maven remote repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository maven_repository = 3; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.Builder, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepositoryOrBuilder> + getMavenRepositoryFieldBuilder() { + if (mavenRepositoryBuilder_ == null) { + if (!(remoteSourceCase_ == 3)) { + remoteSource_ = + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository + .getDefaultInstance(); + } + mavenRepositoryBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository + .Builder, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig + .MavenRepositoryOrBuilder>( + (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository) + remoteSource_, + getParentForChildren(), + isClean()); + remoteSource_ = null; + } + remoteSourceCase_ = 3; + onChanged(); + return mavenRepositoryBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.Builder, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepositoryOrBuilder> + npmRepositoryBuilder_; + /** + * + * + *
+     * Specific settings for an Npm remote repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository npm_repository = 4; + * + * + * @return Whether the npmRepository field is set. + */ + @java.lang.Override + public boolean hasNpmRepository() { + return remoteSourceCase_ == 4; + } + /** + * + * + *
+     * Specific settings for an Npm remote repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository npm_repository = 4; + * + * + * @return The npmRepository. + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository + getNpmRepository() { + if (npmRepositoryBuilder_ == null) { + if (remoteSourceCase_ == 4) { + return (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository) + remoteSource_; + } + return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository + .getDefaultInstance(); + } else { + if (remoteSourceCase_ == 4) { + return npmRepositoryBuilder_.getMessage(); + } + return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Specific settings for an Npm remote repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository npm_repository = 4; + * + */ + public Builder setNpmRepository( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository value) { + if (npmRepositoryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + remoteSource_ = value; + onChanged(); + } else { + npmRepositoryBuilder_.setMessage(value); + } + remoteSourceCase_ = 4; + return this; + } + /** + * + * + *
+     * Specific settings for an Npm remote repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository npm_repository = 4; + * + */ + public Builder setNpmRepository( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.Builder + builderForValue) { + if (npmRepositoryBuilder_ == null) { + remoteSource_ = builderForValue.build(); + onChanged(); + } else { + npmRepositoryBuilder_.setMessage(builderForValue.build()); + } + remoteSourceCase_ = 4; + return this; + } + /** + * + * + *
+     * Specific settings for an Npm remote repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository npm_repository = 4; + * + */ + public Builder mergeNpmRepository( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository value) { + if (npmRepositoryBuilder_ == null) { + if (remoteSourceCase_ == 4 + && remoteSource_ + != com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository + .getDefaultInstance()) { + remoteSource_ = + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository + .newBuilder( + (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository) + remoteSource_) + .mergeFrom(value) + .buildPartial(); + } else { + remoteSource_ = value; + } + onChanged(); + } else { + if (remoteSourceCase_ == 4) { + npmRepositoryBuilder_.mergeFrom(value); + } else { + npmRepositoryBuilder_.setMessage(value); + } + } + remoteSourceCase_ = 4; + return this; + } + /** + * + * + *
+     * Specific settings for an Npm remote repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository npm_repository = 4; + * + */ + public Builder clearNpmRepository() { + if (npmRepositoryBuilder_ == null) { + if (remoteSourceCase_ == 4) { + remoteSourceCase_ = 0; + remoteSource_ = null; + onChanged(); + } + } else { + if (remoteSourceCase_ == 4) { + remoteSourceCase_ = 0; + remoteSource_ = null; + } + npmRepositoryBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Specific settings for an Npm remote repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository npm_repository = 4; + * + */ + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.Builder + getNpmRepositoryBuilder() { + return getNpmRepositoryFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Specific settings for an Npm remote repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository npm_repository = 4; + * + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepositoryOrBuilder + getNpmRepositoryOrBuilder() { + if ((remoteSourceCase_ == 4) && (npmRepositoryBuilder_ != null)) { + return npmRepositoryBuilder_.getMessageOrBuilder(); + } else { + if (remoteSourceCase_ == 4) { + return (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository) + remoteSource_; + } + return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Specific settings for an Npm remote repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository npm_repository = 4; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.Builder, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepositoryOrBuilder> + getNpmRepositoryFieldBuilder() { + if (npmRepositoryBuilder_ == null) { + if (!(remoteSourceCase_ == 4)) { + remoteSource_ = + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository + .getDefaultInstance(); + } + npmRepositoryBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository + .Builder, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig + .NpmRepositoryOrBuilder>( + (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository) + remoteSource_, + getParentForChildren(), + isClean()); + remoteSource_ = null; + } + remoteSourceCase_ = 4; + onChanged(); + return npmRepositoryBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.Builder, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig + .PythonRepositoryOrBuilder> + pythonRepositoryBuilder_; + /** + * + * + *
+     * Specific settings for a Python remote repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository python_repository = 5; + * + * + * @return Whether the pythonRepository field is set. + */ + @java.lang.Override + public boolean hasPythonRepository() { + return remoteSourceCase_ == 5; + } + /** + * + * + *
+     * Specific settings for a Python remote repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository python_repository = 5; + * + * + * @return The pythonRepository. + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository + getPythonRepository() { + if (pythonRepositoryBuilder_ == null) { + if (remoteSourceCase_ == 5) { + return (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository) + remoteSource_; + } + return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository + .getDefaultInstance(); + } else { + if (remoteSourceCase_ == 5) { + return pythonRepositoryBuilder_.getMessage(); + } + return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Specific settings for a Python remote repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository python_repository = 5; + * + */ + public Builder setPythonRepository( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository value) { + if (pythonRepositoryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + remoteSource_ = value; + onChanged(); + } else { + pythonRepositoryBuilder_.setMessage(value); + } + remoteSourceCase_ = 5; + return this; + } + /** + * + * + *
+     * Specific settings for a Python remote repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository python_repository = 5; + * + */ + public Builder setPythonRepository( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.Builder + builderForValue) { + if (pythonRepositoryBuilder_ == null) { + remoteSource_ = builderForValue.build(); + onChanged(); + } else { + pythonRepositoryBuilder_.setMessage(builderForValue.build()); + } + remoteSourceCase_ = 5; + return this; + } + /** + * + * + *
+     * Specific settings for a Python remote repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository python_repository = 5; + * + */ + public Builder mergePythonRepository( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository value) { + if (pythonRepositoryBuilder_ == null) { + if (remoteSourceCase_ == 5 + && remoteSource_ + != com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository + .getDefaultInstance()) { + remoteSource_ = + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository + .newBuilder( + (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig + .PythonRepository) + remoteSource_) + .mergeFrom(value) + .buildPartial(); + } else { + remoteSource_ = value; + } + onChanged(); + } else { + if (remoteSourceCase_ == 5) { + pythonRepositoryBuilder_.mergeFrom(value); + } else { + pythonRepositoryBuilder_.setMessage(value); + } + } + remoteSourceCase_ = 5; + return this; + } + /** + * + * + *
+     * Specific settings for a Python remote repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository python_repository = 5; + * + */ + public Builder clearPythonRepository() { + if (pythonRepositoryBuilder_ == null) { + if (remoteSourceCase_ == 5) { + remoteSourceCase_ = 0; + remoteSource_ = null; + onChanged(); + } + } else { + if (remoteSourceCase_ == 5) { + remoteSourceCase_ = 0; + remoteSource_ = null; + } + pythonRepositoryBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Specific settings for a Python remote repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository python_repository = 5; + * + */ + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.Builder + getPythonRepositoryBuilder() { + return getPythonRepositoryFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Specific settings for a Python remote repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository python_repository = 5; + * + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepositoryOrBuilder + getPythonRepositoryOrBuilder() { + if ((remoteSourceCase_ == 5) && (pythonRepositoryBuilder_ != null)) { + return pythonRepositoryBuilder_.getMessageOrBuilder(); + } else { + if (remoteSourceCase_ == 5) { + return (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository) + remoteSource_; + } + return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Specific settings for a Python remote repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository python_repository = 5; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.Builder, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig + .PythonRepositoryOrBuilder> + getPythonRepositoryFieldBuilder() { + if (pythonRepositoryBuilder_ == null) { + if (!(remoteSourceCase_ == 5)) { + remoteSource_ = + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository + .getDefaultInstance(); + } + pythonRepositoryBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository + .Builder, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig + .PythonRepositoryOrBuilder>( + (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository) + remoteSource_, + getParentForChildren(), + isClean()); + remoteSource_ = null; + } + remoteSourceCase_ = 5; + onChanged(); + return pythonRepositoryBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.Builder, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepositoryOrBuilder> + aptRepositoryBuilder_; + /** + * + * + *
+     * Specific settings for an Apt remote repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository apt_repository = 6; + * + * + * @return Whether the aptRepository field is set. + */ + @java.lang.Override + public boolean hasAptRepository() { + return remoteSourceCase_ == 6; + } + /** + * + * + *
+     * Specific settings for an Apt remote repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository apt_repository = 6; + * + * + * @return The aptRepository. + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + getAptRepository() { + if (aptRepositoryBuilder_ == null) { + if (remoteSourceCase_ == 6) { + return (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository) + remoteSource_; + } + return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + .getDefaultInstance(); + } else { + if (remoteSourceCase_ == 6) { + return aptRepositoryBuilder_.getMessage(); + } + return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Specific settings for an Apt remote repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository apt_repository = 6; + * + */ + public Builder setAptRepository( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository value) { + if (aptRepositoryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + remoteSource_ = value; + onChanged(); + } else { + aptRepositoryBuilder_.setMessage(value); + } + remoteSourceCase_ = 6; + return this; + } + /** + * + * + *
+     * Specific settings for an Apt remote repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository apt_repository = 6; + * + */ + public Builder setAptRepository( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.Builder + builderForValue) { + if (aptRepositoryBuilder_ == null) { + remoteSource_ = builderForValue.build(); + onChanged(); + } else { + aptRepositoryBuilder_.setMessage(builderForValue.build()); + } + remoteSourceCase_ = 6; + return this; + } + /** + * + * + *
+     * Specific settings for an Apt remote repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository apt_repository = 6; + * + */ + public Builder mergeAptRepository( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository value) { + if (aptRepositoryBuilder_ == null) { + if (remoteSourceCase_ == 6 + && remoteSource_ + != com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + .getDefaultInstance()) { + remoteSource_ = + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + .newBuilder( + (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository) + remoteSource_) + .mergeFrom(value) + .buildPartial(); + } else { + remoteSource_ = value; + } + onChanged(); + } else { + if (remoteSourceCase_ == 6) { + aptRepositoryBuilder_.mergeFrom(value); + } else { + aptRepositoryBuilder_.setMessage(value); + } + } + remoteSourceCase_ = 6; + return this; + } + /** + * + * + *
+     * Specific settings for an Apt remote repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository apt_repository = 6; + * + */ + public Builder clearAptRepository() { + if (aptRepositoryBuilder_ == null) { + if (remoteSourceCase_ == 6) { + remoteSourceCase_ = 0; + remoteSource_ = null; + onChanged(); + } + } else { + if (remoteSourceCase_ == 6) { + remoteSourceCase_ = 0; + remoteSource_ = null; + } + aptRepositoryBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Specific settings for an Apt remote repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository apt_repository = 6; + * + */ + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.Builder + getAptRepositoryBuilder() { + return getAptRepositoryFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Specific settings for an Apt remote repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository apt_repository = 6; + * + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepositoryOrBuilder + getAptRepositoryOrBuilder() { + if ((remoteSourceCase_ == 6) && (aptRepositoryBuilder_ != null)) { + return aptRepositoryBuilder_.getMessageOrBuilder(); + } else { + if (remoteSourceCase_ == 6) { + return (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository) + remoteSource_; + } + return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Specific settings for an Apt remote repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository apt_repository = 6; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.Builder, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepositoryOrBuilder> + getAptRepositoryFieldBuilder() { + if (aptRepositoryBuilder_ == null) { + if (!(remoteSourceCase_ == 6)) { + remoteSource_ = + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + .getDefaultInstance(); + } + aptRepositoryBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository + .Builder, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig + .AptRepositoryOrBuilder>( + (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository) + remoteSource_, + getParentForChildren(), + isClean()); + remoteSource_ = null; + } + remoteSourceCase_ = 6; + onChanged(); + return aptRepositoryBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.Builder, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepositoryOrBuilder> + yumRepositoryBuilder_; + /** + * + * + *
+     * Specific settings for a Yum remote repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository yum_repository = 7; + * + * + * @return Whether the yumRepository field is set. + */ + @java.lang.Override + public boolean hasYumRepository() { + return remoteSourceCase_ == 7; + } + /** + * + * + *
+     * Specific settings for a Yum remote repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository yum_repository = 7; + * + * + * @return The yumRepository. + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + getYumRepository() { + if (yumRepositoryBuilder_ == null) { + if (remoteSourceCase_ == 7) { + return (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository) + remoteSource_; + } + return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + .getDefaultInstance(); + } else { + if (remoteSourceCase_ == 7) { + return yumRepositoryBuilder_.getMessage(); + } + return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Specific settings for a Yum remote repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository yum_repository = 7; + * + */ + public Builder setYumRepository( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository value) { + if (yumRepositoryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + remoteSource_ = value; + onChanged(); + } else { + yumRepositoryBuilder_.setMessage(value); + } + remoteSourceCase_ = 7; + return this; + } + /** + * + * + *
+     * Specific settings for a Yum remote repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository yum_repository = 7; + * + */ + public Builder setYumRepository( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.Builder + builderForValue) { + if (yumRepositoryBuilder_ == null) { + remoteSource_ = builderForValue.build(); + onChanged(); + } else { + yumRepositoryBuilder_.setMessage(builderForValue.build()); + } + remoteSourceCase_ = 7; + return this; + } + /** + * + * + *
+     * Specific settings for a Yum remote repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository yum_repository = 7; + * + */ + public Builder mergeYumRepository( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository value) { + if (yumRepositoryBuilder_ == null) { + if (remoteSourceCase_ == 7 + && remoteSource_ + != com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + .getDefaultInstance()) { + remoteSource_ = + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + .newBuilder( + (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository) + remoteSource_) + .mergeFrom(value) + .buildPartial(); + } else { + remoteSource_ = value; + } + onChanged(); + } else { + if (remoteSourceCase_ == 7) { + yumRepositoryBuilder_.mergeFrom(value); + } else { + yumRepositoryBuilder_.setMessage(value); + } + } + remoteSourceCase_ = 7; + return this; + } + /** + * + * + *
+     * Specific settings for a Yum remote repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository yum_repository = 7; + * + */ + public Builder clearYumRepository() { + if (yumRepositoryBuilder_ == null) { + if (remoteSourceCase_ == 7) { + remoteSourceCase_ = 0; + remoteSource_ = null; + onChanged(); + } + } else { + if (remoteSourceCase_ == 7) { + remoteSourceCase_ = 0; + remoteSource_ = null; + } + yumRepositoryBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Specific settings for a Yum remote repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository yum_repository = 7; + * + */ + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.Builder + getYumRepositoryBuilder() { + return getYumRepositoryFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Specific settings for a Yum remote repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository yum_repository = 7; + * + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepositoryOrBuilder + getYumRepositoryOrBuilder() { + if ((remoteSourceCase_ == 7) && (yumRepositoryBuilder_ != null)) { + return yumRepositoryBuilder_.getMessageOrBuilder(); + } else { + if (remoteSourceCase_ == 7) { + return (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository) + remoteSource_; + } + return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Specific settings for a Yum remote repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository yum_repository = 7; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.Builder, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepositoryOrBuilder> + getYumRepositoryFieldBuilder() { + if (yumRepositoryBuilder_ == null) { + if (!(remoteSourceCase_ == 7)) { + remoteSource_ = + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + .getDefaultInstance(); + } + yumRepositoryBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository + .Builder, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig + .YumRepositoryOrBuilder>( + (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository) + remoteSource_, + getParentForChildren(), + isClean()); + remoteSource_ = null; + } + remoteSourceCase_ = 7; + onChanged(); + return yumRepositoryBuilder_; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * The description of the remote source.
+     * 
+ * + * string description = 1; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The description of the remote source.
+     * 
+ * + * string description = 1; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The description of the remote source.
+     * 
+ * + * string description = 1; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * The description of the remote source.
+     * 
+ * + * string description = 1; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + * + * + *
+     * The description of the remote source.
+     * 
+ * + * string description = 1; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + private com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + upstreamCredentials_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + .Builder, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig + .UpstreamCredentialsOrBuilder> + upstreamCredentialsBuilder_; + /** + * + * + *
+     * Optional. The credentials used to access the remote repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials upstream_credentials = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the upstreamCredentials field is set. + */ + public boolean hasUpstreamCredentials() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * + * + *
+     * Optional. The credentials used to access the remote repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials upstream_credentials = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The upstreamCredentials. + */ + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + getUpstreamCredentials() { + if (upstreamCredentialsBuilder_ == null) { + return upstreamCredentials_ == null + ? com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + .getDefaultInstance() + : upstreamCredentials_; + } else { + return upstreamCredentialsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. The credentials used to access the remote repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials upstream_credentials = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpstreamCredentials( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials value) { + if (upstreamCredentialsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + upstreamCredentials_ = value; + } else { + upstreamCredentialsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The credentials used to access the remote repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials upstream_credentials = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpstreamCredentials( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.Builder + builderForValue) { + if (upstreamCredentialsBuilder_ == null) { + upstreamCredentials_ = builderForValue.build(); + } else { + upstreamCredentialsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The credentials used to access the remote repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials upstream_credentials = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeUpstreamCredentials( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials value) { + if (upstreamCredentialsBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && upstreamCredentials_ != null + && upstreamCredentials_ + != com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig + .UpstreamCredentials.getDefaultInstance()) { + getUpstreamCredentialsBuilder().mergeFrom(value); + } else { + upstreamCredentials_ = value; + } + } else { + upstreamCredentialsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The credentials used to access the remote repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials upstream_credentials = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearUpstreamCredentials() { + bitField0_ = (bitField0_ & ~0x00000080); + upstreamCredentials_ = null; + if (upstreamCredentialsBuilder_ != null) { + upstreamCredentialsBuilder_.dispose(); + upstreamCredentialsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The credentials used to access the remote repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials upstream_credentials = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + .Builder + getUpstreamCredentialsBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getUpstreamCredentialsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. The credentials used to access the remote repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials upstream_credentials = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig + .UpstreamCredentialsOrBuilder + getUpstreamCredentialsOrBuilder() { + if (upstreamCredentialsBuilder_ != null) { + return upstreamCredentialsBuilder_.getMessageOrBuilder(); + } else { + return upstreamCredentials_ == null + ? com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + .getDefaultInstance() + : upstreamCredentials_; + } + } + /** + * + * + *
+     * Optional. The credentials used to access the remote repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials upstream_credentials = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + .Builder, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig + .UpstreamCredentialsOrBuilder> + getUpstreamCredentialsFieldBuilder() { + if (upstreamCredentialsBuilder_ == null) { + upstreamCredentialsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + .Builder, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig + .UpstreamCredentialsOrBuilder>( + getUpstreamCredentials(), getParentForChildren(), isClean()); + upstreamCredentials_ = null; + } + return upstreamCredentialsBuilder_; + } + + @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.RemoteRepositoryConfig) + } + + // @@protoc_insertion_point(class_scope:google.devtools.artifactregistry.v1.RemoteRepositoryConfig) + private static final com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig(); + } + + public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RemoteRepositoryConfig 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.RemoteRepositoryConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/RemoteRepositoryConfigOrBuilder.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/RemoteRepositoryConfigOrBuilder.java new file mode 100644 index 000000000000..c084f40ef42a --- /dev/null +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/RemoteRepositoryConfigOrBuilder.java @@ -0,0 +1,351 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/repository.proto + +package com.google.devtools.artifactregistry.v1; + +public interface RemoteRepositoryConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devtools.artifactregistry.v1.RemoteRepositoryConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Specific settings for a Docker remote repository.
+   * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository docker_repository = 2; + * + * + * @return Whether the dockerRepository field is set. + */ + boolean hasDockerRepository(); + /** + * + * + *
+   * Specific settings for a Docker remote repository.
+   * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository docker_repository = 2; + * + * + * @return The dockerRepository. + */ + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository + getDockerRepository(); + /** + * + * + *
+   * Specific settings for a Docker remote repository.
+   * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository docker_repository = 2; + * + */ + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepositoryOrBuilder + getDockerRepositoryOrBuilder(); + + /** + * + * + *
+   * Specific settings for a Maven remote repository.
+   * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository maven_repository = 3; + * + * + * @return Whether the mavenRepository field is set. + */ + boolean hasMavenRepository(); + /** + * + * + *
+   * Specific settings for a Maven remote repository.
+   * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository maven_repository = 3; + * + * + * @return The mavenRepository. + */ + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository + getMavenRepository(); + /** + * + * + *
+   * Specific settings for a Maven remote repository.
+   * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository maven_repository = 3; + * + */ + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepositoryOrBuilder + getMavenRepositoryOrBuilder(); + + /** + * + * + *
+   * Specific settings for an Npm remote repository.
+   * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository npm_repository = 4; + * + * + * @return Whether the npmRepository field is set. + */ + boolean hasNpmRepository(); + /** + * + * + *
+   * Specific settings for an Npm remote repository.
+   * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository npm_repository = 4; + * + * + * @return The npmRepository. + */ + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository getNpmRepository(); + /** + * + * + *
+   * Specific settings for an Npm remote repository.
+   * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository npm_repository = 4; + * + */ + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepositoryOrBuilder + getNpmRepositoryOrBuilder(); + + /** + * + * + *
+   * Specific settings for a Python remote repository.
+   * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository python_repository = 5; + * + * + * @return Whether the pythonRepository field is set. + */ + boolean hasPythonRepository(); + /** + * + * + *
+   * Specific settings for a Python remote repository.
+   * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository python_repository = 5; + * + * + * @return The pythonRepository. + */ + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository + getPythonRepository(); + /** + * + * + *
+   * Specific settings for a Python remote repository.
+   * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository python_repository = 5; + * + */ + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepositoryOrBuilder + getPythonRepositoryOrBuilder(); + + /** + * + * + *
+   * Specific settings for an Apt remote repository.
+   * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository apt_repository = 6; + * + * + * @return Whether the aptRepository field is set. + */ + boolean hasAptRepository(); + /** + * + * + *
+   * Specific settings for an Apt remote repository.
+   * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository apt_repository = 6; + * + * + * @return The aptRepository. + */ + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository getAptRepository(); + /** + * + * + *
+   * Specific settings for an Apt remote repository.
+   * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository apt_repository = 6; + * + */ + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepositoryOrBuilder + getAptRepositoryOrBuilder(); + + /** + * + * + *
+   * Specific settings for a Yum remote repository.
+   * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository yum_repository = 7; + * + * + * @return Whether the yumRepository field is set. + */ + boolean hasYumRepository(); + /** + * + * + *
+   * Specific settings for a Yum remote repository.
+   * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository yum_repository = 7; + * + * + * @return The yumRepository. + */ + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository getYumRepository(); + /** + * + * + *
+   * Specific settings for a Yum remote repository.
+   * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository yum_repository = 7; + * + */ + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepositoryOrBuilder + getYumRepositoryOrBuilder(); + + /** + * + * + *
+   * The description of the remote source.
+   * 
+ * + * string description = 1; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * The description of the remote source.
+   * 
+ * + * string description = 1; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Optional. The credentials used to access the remote repository.
+   * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials upstream_credentials = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the upstreamCredentials field is set. + */ + boolean hasUpstreamCredentials(); + /** + * + * + *
+   * Optional. The credentials used to access the remote repository.
+   * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials upstream_credentials = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The upstreamCredentials. + */ + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials + getUpstreamCredentials(); + /** + * + * + *
+   * Optional. The credentials used to access the remote repository.
+   * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials upstream_credentials = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentialsOrBuilder + getUpstreamCredentialsOrBuilder(); + + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.RemoteSourceCase + getRemoteSourceCase(); +} diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/Repository.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/Repository.java index 8846072fa6d5..7a5c8bf3d7c6 100644 --- a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/Repository.java +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/Repository.java @@ -42,6 +42,7 @@ private Repository() { format_ = 0; description_ = ""; kmsKeyName_ = ""; + mode_ = 0; } @java.lang.Override @@ -61,6 +62,8 @@ protected com.google.protobuf.MapField internalGetMapField(int number) { switch (number) { case 4: return internalGetLabels(); + case 12: + return internalGetCleanupPolicies(); default: throw new RuntimeException("Invalid map field number: " + number); } @@ -156,6 +159,26 @@ public enum Format implements com.google.protobuf.ProtocolMessageEnum { * PYTHON = 8; */ PYTHON(8), + /** + * + * + *
+     * Kubeflow Pipelines package format.
+     * 
+ * + * KFP = 9; + */ + KFP(9), + /** + * + * + *
+     * Go package format.
+     * 
+ * + * GO = 10; + */ + GO(10), UNRECOGNIZED(-1), ; @@ -229,6 +252,26 @@ public enum Format implements com.google.protobuf.ProtocolMessageEnum { * PYTHON = 8; */ public static final int PYTHON_VALUE = 8; + /** + * + * + *
+     * Kubeflow Pipelines package format.
+     * 
+ * + * KFP = 9; + */ + public static final int KFP_VALUE = 9; + /** + * + * + *
+     * Go package format.
+     * 
+ * + * GO = 10; + */ + public static final int GO_VALUE = 10; public final int getNumber() { if (this == UNRECOGNIZED) { @@ -268,6 +311,10 @@ public static Format forNumber(int value) { return YUM; case 8: return PYTHON; + case 9: + return KFP; + case 10: + return GO; default: return null; } @@ -323,6 +370,188 @@ private Format(int value) { // @@protoc_insertion_point(enum_scope:google.devtools.artifactregistry.v1.Repository.Format) } + /** + * + * + *
+   * The mode configures the repository to serve artifacts from different
+   * sources.
+   * 
+ * + * Protobuf enum {@code google.devtools.artifactregistry.v1.Repository.Mode} + */ + public enum Mode implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified mode.
+     * 
+ * + * MODE_UNSPECIFIED = 0; + */ + MODE_UNSPECIFIED(0), + /** + * + * + *
+     * A standard repository storing artifacts.
+     * 
+ * + * STANDARD_REPOSITORY = 1; + */ + STANDARD_REPOSITORY(1), + /** + * + * + *
+     * A virtual repository to serve artifacts from one or more sources.
+     * 
+ * + * VIRTUAL_REPOSITORY = 2; + */ + VIRTUAL_REPOSITORY(2), + /** + * + * + *
+     * A remote repository to serve artifacts from a remote source.
+     * 
+ * + * REMOTE_REPOSITORY = 3; + */ + REMOTE_REPOSITORY(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecified mode.
+     * 
+ * + * MODE_UNSPECIFIED = 0; + */ + public static final int MODE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * A standard repository storing artifacts.
+     * 
+ * + * STANDARD_REPOSITORY = 1; + */ + public static final int STANDARD_REPOSITORY_VALUE = 1; + /** + * + * + *
+     * A virtual repository to serve artifacts from one or more sources.
+     * 
+ * + * VIRTUAL_REPOSITORY = 2; + */ + public static final int VIRTUAL_REPOSITORY_VALUE = 2; + /** + * + * + *
+     * A remote repository to serve artifacts from a remote source.
+     * 
+ * + * REMOTE_REPOSITORY = 3; + */ + public static final int REMOTE_REPOSITORY_VALUE = 3; + + 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 Mode 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 Mode forNumber(int value) { + switch (value) { + case 0: + return MODE_UNSPECIFIED; + case 1: + return STANDARD_REPOSITORY; + case 2: + return VIRTUAL_REPOSITORY; + case 3: + return REMOTE_REPOSITORY; + 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 Mode findValueByNumber(int number) { + return Mode.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.Repository.getDescriptor() + .getEnumTypes() + .get(1); + } + + private static final Mode[] VALUES = values(); + + public static Mode 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 Mode(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.devtools.artifactregistry.v1.Repository.Mode) + } + public interface MavenRepositoryConfigOrBuilder extends // @@protoc_insertion_point(interface_extends:google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig) @@ -1275,1439 +1504,4002 @@ public com.google.protobuf.Parser getParserForType() { } } - private int formatConfigCase_ = 0; - - @SuppressWarnings("serial") - private java.lang.Object formatConfig_; - - public enum FormatConfigCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - MAVEN_CONFIG(9), - FORMATCONFIG_NOT_SET(0); - private final int value; + public interface DockerRepositoryConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig) + com.google.protobuf.MessageOrBuilder { - private FormatConfigCase(int value) { - this.value = value; - } /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. + * + * + *
+     * The repository which enabled this flag prevents all tags from being
+     * modified, moved or deleted. This does not prevent tags from being
+     * created.
+     * 
+ * + * bool immutable_tags = 1; + * + * @return The immutableTags. */ - @java.lang.Deprecated - public static FormatConfigCase valueOf(int value) { - return forNumber(value); - } - - public static FormatConfigCase forNumber(int value) { - switch (value) { - case 9: - return MAVEN_CONFIG; - case 0: - return FORMATCONFIG_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public FormatConfigCase getFormatConfigCase() { - return FormatConfigCase.forNumber(formatConfigCase_); - } - - public static final int MAVEN_CONFIG_FIELD_NUMBER = 9; - /** - * - * - *
-   * Maven repository config contains repository level configuration
-   * for the repositories of maven type.
-   * 
- * - * .google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig maven_config = 9; - * - * - * @return Whether the mavenConfig field is set. - */ - @java.lang.Override - public boolean hasMavenConfig() { - return formatConfigCase_ == 9; + boolean getImmutableTags(); } /** * * *
-   * Maven repository config contains repository level configuration
-   * for the repositories of maven type.
+   * DockerRepositoryConfig is docker related repository details.
+   * Provides additional configuration details for repositories of the docker
+   * format type.
    * 
* - * .google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig maven_config = 9; - * - * - * @return The mavenConfig. + * Protobuf type {@code google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig} */ - @java.lang.Override - public com.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig getMavenConfig() { - if (formatConfigCase_ == 9) { - return (com.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig) - formatConfig_; + public static final class DockerRepositoryConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig) + DockerRepositoryConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use DockerRepositoryConfig.newBuilder() to construct. + private DockerRepositoryConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); } - return com.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig - .getDefaultInstance(); - } - /** - * - * - *
-   * Maven repository config contains repository level configuration
-   * for the repositories of maven type.
-   * 
- * - * .google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig maven_config = 9; - * - */ - @java.lang.Override - public com.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfigOrBuilder - getMavenConfigOrBuilder() { - if (formatConfigCase_ == 9) { - return (com.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig) - formatConfig_; + + private DockerRepositoryConfig() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DockerRepositoryConfig(); } - return com.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig - .getDefaultInstance(); - } - public static final int NAME_FIELD_NUMBER = 1; + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_Repository_DockerRepositoryConfig_descriptor; + } - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - * - * - *
-   * The name of the repository, for example:
-   * "projects/p1/locations/us-central1/repositories/repo1".
-   * 
- * - * 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; + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_Repository_DockerRepositoryConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig.class, + com.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig.Builder + .class); } - } - /** - * - * - *
-   * The name of the repository, for example:
-   * "projects/p1/locations/us-central1/repositories/repo1".
-   * 
- * - * 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 IMMUTABLE_TAGS_FIELD_NUMBER = 1; + private boolean immutableTags_ = false; + /** + * + * + *
+     * The repository which enabled this flag prevents all tags from being
+     * modified, moved or deleted. This does not prevent tags from being
+     * created.
+     * 
+ * + * bool immutable_tags = 1; + * + * @return The immutableTags. + */ + @java.lang.Override + public boolean getImmutableTags() { + return immutableTags_; } - } - public static final int FORMAT_FIELD_NUMBER = 2; - private int format_ = 0; - /** - * - * - *
-   * The format of packages that are stored in the repository.
-   * 
- * - * .google.devtools.artifactregistry.v1.Repository.Format format = 2; - * - * @return The enum numeric value on the wire for format. - */ - @java.lang.Override - public int getFormatValue() { - return format_; - } - /** - * - * - *
-   * The format of packages that are stored in the repository.
-   * 
- * - * .google.devtools.artifactregistry.v1.Repository.Format format = 2; - * - * @return The format. - */ - @java.lang.Override - public com.google.devtools.artifactregistry.v1.Repository.Format getFormat() { - com.google.devtools.artifactregistry.v1.Repository.Format result = - com.google.devtools.artifactregistry.v1.Repository.Format.forNumber(format_); - return result == null - ? com.google.devtools.artifactregistry.v1.Repository.Format.UNRECOGNIZED - : result; - } + private byte memoizedIsInitialized = -1; - public static final int DESCRIPTION_FIELD_NUMBER = 3; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; - @SuppressWarnings("serial") - private volatile java.lang.Object description_ = ""; - /** - * - * - *
-   * The user-provided description of the repository.
-   * 
- * - * string description = 3; - * - * @return The description. - */ - @java.lang.Override - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; + memoizedIsInitialized = 1; + return true; } - } - /** - * - * - *
-   * The user-provided description of the repository.
-   * 
- * - * string description = 3; - * - * @return The bytes for description. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (immutableTags_ != false) { + output.writeBool(1, immutableTags_); + } + getUnknownFields().writeTo(output); } - } - public static final int LABELS_FIELD_NUMBER = 4; + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; - private static final class LabelsDefaultEntryHolder { - static final com.google.protobuf.MapEntry defaultEntry = - com.google.protobuf.MapEntry.newDefaultInstance( - com.google.devtools.artifactregistry.v1.RepositoryProto - .internal_static_google_devtools_artifactregistry_v1_Repository_LabelsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } + size = 0; + if (immutableTags_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, immutableTags_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } - @SuppressWarnings("serial") - private com.google.protobuf.MapField labels_; + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig)) { + return super.equals(obj); + } + com.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig other = + (com.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig) obj; - private com.google.protobuf.MapField internalGetLabels() { - if (labels_ == null) { - return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + if (getImmutableTags() != other.getImmutableTags()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; } - return labels_; - } - public int getLabelsCount() { - return internalGetLabels().getMap().size(); - } - /** - * - * - *
-   * Labels with user-defined metadata.
-   * This field may contain up to 64 entries. Label keys and values may be no
-   * longer than 63 characters. Label keys must begin with a lowercase letter
-   * and may only contain lowercase letters, numeric characters, underscores,
-   * and dashes.
-   * 
- * - * map<string, string> labels = 4; - */ - @java.lang.Override - public boolean containsLabels(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + IMMUTABLE_TAGS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getImmutableTags()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; } - return internalGetLabels().getMap().containsKey(key); - } - /** Use {@link #getLabelsMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getLabels() { - return getLabelsMap(); - } - /** - * - * - *
-   * Labels with user-defined metadata.
-   * This field may contain up to 64 entries. Label keys and values may be no
-   * longer than 63 characters. Label keys must begin with a lowercase letter
-   * and may only contain lowercase letters, numeric characters, underscores,
-   * and dashes.
-   * 
- * - * map<string, string> labels = 4; - */ - @java.lang.Override - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - /** - * - * - *
-   * Labels with user-defined metadata.
-   * This field may contain up to 64 entries. Label keys and values may be no
-   * longer than 63 characters. Label keys must begin with a lowercase letter
-   * and may only contain lowercase letters, numeric characters, underscores,
-   * and dashes.
-   * 
- * - * map<string, string> labels = 4; - */ - @java.lang.Override - public /* nullable */ java.lang.String getLabelsOrDefault( - java.lang.String key, - /* nullable */ - java.lang.String defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetLabels().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-   * Labels with user-defined metadata.
-   * This field may contain up to 64 entries. Label keys and values may be no
-   * longer than 63 characters. Label keys must begin with a lowercase letter
-   * and may only contain lowercase letters, numeric characters, underscores,
-   * and dashes.
-   * 
- * - * map<string, string> labels = 4; - */ - @java.lang.Override - public java.lang.String getLabelsOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); + + public static com.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); } - java.util.Map map = internalGetLabels().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); + + public static com.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); } - return map.get(key); - } - public static final int CREATE_TIME_FIELD_NUMBER = 5; - private com.google.protobuf.Timestamp createTime_; - /** - * - * - *
-   * The time when the repository was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 5; - * - * @return Whether the createTime field is set. - */ - @java.lang.Override - public boolean hasCreateTime() { - return createTime_ != null; - } - /** - * - * - *
-   * The time when the repository was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 5; - * - * @return The createTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getCreateTime() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - /** - * - * - *
-   * The time when the repository was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 5; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } + public static com.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - public static final int UPDATE_TIME_FIELD_NUMBER = 6; - private com.google.protobuf.Timestamp updateTime_; - /** - * - * - *
-   * The time when the repository was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 6; - * - * @return Whether the updateTime field is set. - */ - @java.lang.Override - public boolean hasUpdateTime() { - return updateTime_ != null; - } - /** - * - * - *
-   * The time when the repository was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 6; - * - * @return The updateTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getUpdateTime() { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } - /** - * - * - *
-   * The time when the repository was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 6; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } + public static com.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - public static final int KMS_KEY_NAME_FIELD_NUMBER = 8; + public static com.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @SuppressWarnings("serial") - private volatile java.lang.Object kmsKeyName_ = ""; - /** - * - * - *
-   * The Cloud KMS resource name of the customer managed encryption key that's
-   * used to encrypt the contents of the Repository. Has the form:
-   * `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`.
-   * This value may not be changed after the Repository has been created.
-   * 
- * - * string kms_key_name = 8; - * - * @return The kmsKeyName. - */ - @java.lang.Override - public java.lang.String getKmsKeyName() { - java.lang.Object ref = kmsKeyName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - kmsKeyName_ = s; - return s; + public static com.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); } - } - /** - * - * - *
-   * The Cloud KMS resource name of the customer managed encryption key that's
-   * used to encrypt the contents of the Repository. Has the form:
-   * `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`.
-   * This value may not be changed after the Repository has been created.
-   * 
- * - * string kms_key_name = 8; - * - * @return The bytes for kmsKeyName. - */ - @java.lang.Override - public com.google.protobuf.ByteString getKmsKeyNameBytes() { - java.lang.Object ref = kmsKeyName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - kmsKeyName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + + public static com.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - } - private byte memoizedIsInitialized = -1; + public static com.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + public static com.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } - memoizedIsInitialized = 1; - return true; - } + public static com.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } - @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_); + public static com.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - if (format_ - != com.google.devtools.artifactregistry.v1.Repository.Format.FORMAT_UNSPECIFIED - .getNumber()) { - output.writeEnum(2, format_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); - } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 4); - if (createTime_ != null) { - output.writeMessage(5, getCreateTime()); - } - if (updateTime_ != null) { - output.writeMessage(6, getUpdateTime()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKeyName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 8, kmsKeyName_); - } - if (formatConfigCase_ == 9) { - output.writeMessage( - 9, - (com.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig) formatConfig_); - } - 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 (format_ - != com.google.devtools.artifactregistry.v1.Repository.Format.FORMAT_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, format_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); - } - for (java.util.Map.Entry entry : - internalGetLabels().getMap().entrySet()) { - com.google.protobuf.MapEntry labels__ = - LabelsDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, labels__); - } - if (createTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getCreateTime()); - } - if (updateTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getUpdateTime()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKeyName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, kmsKeyName_); - } - if (formatConfigCase_ == 9) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 9, - (com.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig) - formatConfig_); + public static com.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); } - 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.Repository)) { - return super.equals(obj); + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); } - com.google.devtools.artifactregistry.v1.Repository other = - (com.google.devtools.artifactregistry.v1.Repository) obj; - if (!getName().equals(other.getName())) return false; - if (format_ != other.format_) return false; - if (!getDescription().equals(other.getDescription())) return false; - if (!internalGetLabels().equals(other.internalGetLabels())) 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 (!getKmsKeyName().equals(other.getKmsKeyName())) return false; - if (!getFormatConfigCase().equals(other.getFormatConfigCase())) return false; - switch (formatConfigCase_) { - case 9: - if (!getMavenConfig().equals(other.getMavenConfig())) return false; - break; - case 0: - default: + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); } - 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) + FORMAT_FIELD_NUMBER; - hash = (53 * hash) + format_; - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().hashCode(); - if (!internalGetLabels().getMap().isEmpty()) { - hash = (37 * hash) + LABELS_FIELD_NUMBER; - hash = (53 * hash) + internalGetLabels().hashCode(); - } - if (hasCreateTime()) { - hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getCreateTime().hashCode(); + public static Builder newBuilder( + com.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - if (hasUpdateTime()) { - hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getUpdateTime().hashCode(); + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } - hash = (37 * hash) + KMS_KEY_NAME_FIELD_NUMBER; - hash = (53 * hash) + getKmsKeyName().hashCode(); - switch (formatConfigCase_) { - case 9: - hash = (37 * hash) + MAVEN_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getMavenConfig().hashCode(); - break; - case 0: - default: + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } + /** + * + * + *
+     * DockerRepositoryConfig is docker related repository details.
+     * Provides additional configuration details for repositories of the docker
+     * format type.
+     * 
+ * + * Protobuf type {@code google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig) + com.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_Repository_DockerRepositoryConfig_descriptor; + } - public static com.google.devtools.artifactregistry.v1.Repository parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_Repository_DockerRepositoryConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig.class, + com.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig.Builder + .class); + } - public static com.google.devtools.artifactregistry.v1.Repository parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + // Construct using + // com.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig.newBuilder() + private Builder() {} - public static com.google.devtools.artifactregistry.v1.Repository parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } - public static com.google.devtools.artifactregistry.v1.Repository parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + immutableTags_ = false; + return this; + } - public static com.google.devtools.artifactregistry.v1.Repository parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_Repository_DockerRepositoryConfig_descriptor; + } - public static com.google.devtools.artifactregistry.v1.Repository parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + @java.lang.Override + public com.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig + getDefaultInstanceForType() { + return com.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig + .getDefaultInstance(); + } - public static com.google.devtools.artifactregistry.v1.Repository parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } + @java.lang.Override + public com.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig build() { + com.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } - public static com.google.devtools.artifactregistry.v1.Repository parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } + @java.lang.Override + public com.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig + buildPartial() { + com.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig result = + new com.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } - public static com.google.devtools.artifactregistry.v1.Repository parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } + private void buildPartial0( + com.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.immutableTags_ = immutableTags_; + } + } - public static com.google.devtools.artifactregistry.v1.Repository parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } + @java.lang.Override + public Builder clone() { + return super.clone(); + } - public static com.google.devtools.artifactregistry.v1.Repository parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } - public static com.google.devtools.artifactregistry.v1.Repository 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 clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } - public static Builder newBuilder(com.google.devtools.artifactregistry.v1.Repository prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } + @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 toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig) { + return mergeFrom( + (com.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; + public Builder mergeFrom( + com.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig other) { + if (other + == com.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig + .getDefaultInstance()) return this; + if (other.getImmutableTags() != false) { + setImmutableTags(other.getImmutableTags()); + } + 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 8: + { + immutableTags_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + 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 boolean immutableTags_; + /** + * + * + *
+       * The repository which enabled this flag prevents all tags from being
+       * modified, moved or deleted. This does not prevent tags from being
+       * created.
+       * 
+ * + * bool immutable_tags = 1; + * + * @return The immutableTags. + */ + @java.lang.Override + public boolean getImmutableTags() { + return immutableTags_; + } + /** + * + * + *
+       * The repository which enabled this flag prevents all tags from being
+       * modified, moved or deleted. This does not prevent tags from being
+       * created.
+       * 
+ * + * bool immutable_tags = 1; + * + * @param value The immutableTags to set. + * @return This builder for chaining. + */ + public Builder setImmutableTags(boolean value) { + + immutableTags_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The repository which enabled this flag prevents all tags from being
+       * modified, moved or deleted. This does not prevent tags from being
+       * created.
+       * 
+ * + * bool immutable_tags = 1; + * + * @return This builder for chaining. + */ + public Builder clearImmutableTags() { + bitField0_ = (bitField0_ & ~0x00000001); + immutableTags_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig) + } + + // @@protoc_insertion_point(class_scope:google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig) + private static final com.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig(); + } + + public static com.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DockerRepositoryConfig 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.Repository.DockerRepositoryConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } } - /** - * - * - *
-   * A Repository for storing artifacts with a specific format.
-   * 
- * - * Protobuf type {@code google.devtools.artifactregistry.v1.Repository} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + + private int formatConfigCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object formatConfig_; + + public enum FormatConfigCase implements - // @@protoc_insertion_point(builder_implements:google.devtools.artifactregistry.v1.Repository) - com.google.devtools.artifactregistry.v1.RepositoryOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.devtools.artifactregistry.v1.RepositoryProto - .internal_static_google_devtools_artifactregistry_v1_Repository_descriptor; + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + MAVEN_CONFIG(9), + DOCKER_CONFIG(17), + FORMATCONFIG_NOT_SET(0); + private final int value; + + private FormatConfigCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static FormatConfigCase valueOf(int value) { + return forNumber(value); + } + + public static FormatConfigCase forNumber(int value) { + switch (value) { + case 9: + return MAVEN_CONFIG; + case 17: + return DOCKER_CONFIG; + case 0: + return FORMATCONFIG_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public FormatConfigCase getFormatConfigCase() { + return FormatConfigCase.forNumber(formatConfigCase_); + } + + private int modeConfigCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object modeConfig_; + + public enum ModeConfigCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + VIRTUAL_REPOSITORY_CONFIG(14), + REMOTE_REPOSITORY_CONFIG(15), + MODECONFIG_NOT_SET(0); + private final int value; + + private ModeConfigCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ModeConfigCase valueOf(int value) { + return forNumber(value); + } + + public static ModeConfigCase forNumber(int value) { + switch (value) { + case 14: + return VIRTUAL_REPOSITORY_CONFIG; + case 15: + return REMOTE_REPOSITORY_CONFIG; + case 0: + return MODECONFIG_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ModeConfigCase getModeConfigCase() { + return ModeConfigCase.forNumber(modeConfigCase_); + } + + public static final int MAVEN_CONFIG_FIELD_NUMBER = 9; + /** + * + * + *
+   * Maven repository config contains repository level configuration
+   * for the repositories of maven type.
+   * 
+ * + * .google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig maven_config = 9; + * + * + * @return Whether the mavenConfig field is set. + */ + @java.lang.Override + public boolean hasMavenConfig() { + return formatConfigCase_ == 9; + } + /** + * + * + *
+   * Maven repository config contains repository level configuration
+   * for the repositories of maven type.
+   * 
+ * + * .google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig maven_config = 9; + * + * + * @return The mavenConfig. + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig getMavenConfig() { + if (formatConfigCase_ == 9) { + return (com.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig) + formatConfig_; + } + return com.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig + .getDefaultInstance(); + } + /** + * + * + *
+   * Maven repository config contains repository level configuration
+   * for the repositories of maven type.
+   * 
+ * + * .google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig maven_config = 9; + * + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfigOrBuilder + getMavenConfigOrBuilder() { + if (formatConfigCase_ == 9) { + return (com.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig) + formatConfig_; + } + return com.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig + .getDefaultInstance(); + } + + public static final int DOCKER_CONFIG_FIELD_NUMBER = 17; + /** + * + * + *
+   * Docker repository config contains repository level configuration
+   * for the repositories of docker type.
+   * 
+ * + * + * .google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig docker_config = 17; + * + * + * @return Whether the dockerConfig field is set. + */ + @java.lang.Override + public boolean hasDockerConfig() { + return formatConfigCase_ == 17; + } + /** + * + * + *
+   * Docker repository config contains repository level configuration
+   * for the repositories of docker type.
+   * 
+ * + * + * .google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig docker_config = 17; + * + * + * @return The dockerConfig. + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig + getDockerConfig() { + if (formatConfigCase_ == 17) { + return (com.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig) + formatConfig_; + } + return com.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig + .getDefaultInstance(); + } + /** + * + * + *
+   * Docker repository config contains repository level configuration
+   * for the repositories of docker type.
+   * 
+ * + * + * .google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig docker_config = 17; + * + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfigOrBuilder + getDockerConfigOrBuilder() { + if (formatConfigCase_ == 17) { + return (com.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig) + formatConfig_; + } + return com.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig + .getDefaultInstance(); + } + + public static final int VIRTUAL_REPOSITORY_CONFIG_FIELD_NUMBER = 14; + /** + * + * + *
+   * Configuration specific for a Virtual Repository.
+   * 
+ * + * + * .google.devtools.artifactregistry.v1.VirtualRepositoryConfig virtual_repository_config = 14; + * + * + * @return Whether the virtualRepositoryConfig field is set. + */ + @java.lang.Override + public boolean hasVirtualRepositoryConfig() { + return modeConfigCase_ == 14; + } + /** + * + * + *
+   * Configuration specific for a Virtual Repository.
+   * 
+ * + * + * .google.devtools.artifactregistry.v1.VirtualRepositoryConfig virtual_repository_config = 14; + * + * + * @return The virtualRepositoryConfig. + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.VirtualRepositoryConfig + getVirtualRepositoryConfig() { + if (modeConfigCase_ == 14) { + return (com.google.devtools.artifactregistry.v1.VirtualRepositoryConfig) modeConfig_; + } + return com.google.devtools.artifactregistry.v1.VirtualRepositoryConfig.getDefaultInstance(); + } + /** + * + * + *
+   * Configuration specific for a Virtual Repository.
+   * 
+ * + * + * .google.devtools.artifactregistry.v1.VirtualRepositoryConfig virtual_repository_config = 14; + * + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.VirtualRepositoryConfigOrBuilder + getVirtualRepositoryConfigOrBuilder() { + if (modeConfigCase_ == 14) { + return (com.google.devtools.artifactregistry.v1.VirtualRepositoryConfig) modeConfig_; + } + return com.google.devtools.artifactregistry.v1.VirtualRepositoryConfig.getDefaultInstance(); + } + + public static final int REMOTE_REPOSITORY_CONFIG_FIELD_NUMBER = 15; + /** + * + * + *
+   * Configuration specific for a Remote Repository.
+   * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig remote_repository_config = 15; + * + * + * @return Whether the remoteRepositoryConfig field is set. + */ + @java.lang.Override + public boolean hasRemoteRepositoryConfig() { + return modeConfigCase_ == 15; + } + /** + * + * + *
+   * Configuration specific for a Remote Repository.
+   * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig remote_repository_config = 15; + * + * + * @return The remoteRepositoryConfig. + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig + getRemoteRepositoryConfig() { + if (modeConfigCase_ == 15) { + return (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig) modeConfig_; + } + return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.getDefaultInstance(); + } + /** + * + * + *
+   * Configuration specific for a Remote Repository.
+   * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig remote_repository_config = 15; + * + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfigOrBuilder + getRemoteRepositoryConfigOrBuilder() { + if (modeConfigCase_ == 15) { + return (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig) modeConfig_; + } + return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.getDefaultInstance(); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * The name of the repository, for example:
+   * `projects/p1/locations/us-central1/repositories/repo1`.
+   * 
+ * + * 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 repository, for example:
+   * `projects/p1/locations/us-central1/repositories/repo1`.
+   * 
+ * + * 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 FORMAT_FIELD_NUMBER = 2; + private int format_ = 0; + /** + * + * + *
+   * Optional. The format of packages that are stored in the repository.
+   * 
+ * + * + * .google.devtools.artifactregistry.v1.Repository.Format format = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for format. + */ + @java.lang.Override + public int getFormatValue() { + return format_; + } + /** + * + * + *
+   * Optional. The format of packages that are stored in the repository.
+   * 
+ * + * + * .google.devtools.artifactregistry.v1.Repository.Format format = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The format. + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.Repository.Format getFormat() { + com.google.devtools.artifactregistry.v1.Repository.Format result = + com.google.devtools.artifactregistry.v1.Repository.Format.forNumber(format_); + return result == null + ? com.google.devtools.artifactregistry.v1.Repository.Format.UNRECOGNIZED + : result; + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + * + * + *
+   * The user-provided description of the repository.
+   * 
+ * + * string description = 3; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * The user-provided description of the repository.
+   * 
+ * + * string description = 3; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LABELS_FIELD_NUMBER = 4; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_Repository_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * Labels with user-defined metadata.
+   * This field may contain up to 64 entries. Label keys and values may be no
+   * longer than 63 characters. Label keys must begin with a lowercase letter
+   * and may only contain lowercase letters, numeric characters, underscores,
+   * and dashes.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * Labels with user-defined metadata.
+   * This field may contain up to 64 entries. Label keys and values may be no
+   * longer than 63 characters. Label keys must begin with a lowercase letter
+   * and may only contain lowercase letters, numeric characters, underscores,
+   * and dashes.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Labels with user-defined metadata.
+   * This field may contain up to 64 entries. Label keys and values may be no
+   * longer than 63 characters. Label keys must begin with a lowercase letter
+   * and may only contain lowercase letters, numeric characters, underscores,
+   * and dashes.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Labels with user-defined metadata.
+   * This field may contain up to 64 entries. Label keys and values may be no
+   * longer than 63 characters. Label keys must begin with a lowercase letter
+   * and may only contain lowercase letters, numeric characters, underscores,
+   * and dashes.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. The time when the repository was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. The time when the repository was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. The time when the repository was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.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 = 6; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. The time when the repository was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. The time when the repository was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. The time when the repository was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int KMS_KEY_NAME_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private volatile java.lang.Object kmsKeyName_ = ""; + /** + * + * + *
+   * The Cloud KMS resource name of the customer managed encryption key that's
+   * used to encrypt the contents of the Repository. Has the form:
+   * `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`.
+   * This value may not be changed after the Repository has been created.
+   * 
+ * + * string kms_key_name = 8; + * + * @return The kmsKeyName. + */ + @java.lang.Override + public java.lang.String getKmsKeyName() { + java.lang.Object ref = kmsKeyName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kmsKeyName_ = s; + return s; + } + } + /** + * + * + *
+   * The Cloud KMS resource name of the customer managed encryption key that's
+   * used to encrypt the contents of the Repository. Has the form:
+   * `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`.
+   * This value may not be changed after the Repository has been created.
+   * 
+ * + * string kms_key_name = 8; + * + * @return The bytes for kmsKeyName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKmsKeyNameBytes() { + java.lang.Object ref = kmsKeyName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kmsKeyName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MODE_FIELD_NUMBER = 10; + private int mode_ = 0; + /** + * + * + *
+   * Optional. The mode of the repository.
+   * 
+ * + * + * .google.devtools.artifactregistry.v1.Repository.Mode mode = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for mode. + */ + @java.lang.Override + public int getModeValue() { + return mode_; + } + /** + * + * + *
+   * Optional. The mode of the repository.
+   * 
+ * + * + * .google.devtools.artifactregistry.v1.Repository.Mode mode = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The mode. + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.Repository.Mode getMode() { + com.google.devtools.artifactregistry.v1.Repository.Mode result = + com.google.devtools.artifactregistry.v1.Repository.Mode.forNumber(mode_); + return result == null + ? com.google.devtools.artifactregistry.v1.Repository.Mode.UNRECOGNIZED + : result; + } + + public static final int CLEANUP_POLICIES_FIELD_NUMBER = 12; + + private static final class CleanupPoliciesDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, com.google.devtools.artifactregistry.v1.CleanupPolicy> + defaultEntry = + com.google.protobuf.MapEntry + . + newDefaultInstance( + com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_Repository_CleanupPoliciesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.devtools.artifactregistry.v1.CleanupPolicy.getDefaultInstance()); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, com.google.devtools.artifactregistry.v1.CleanupPolicy> + cleanupPolicies_; + + private com.google.protobuf.MapField< + java.lang.String, com.google.devtools.artifactregistry.v1.CleanupPolicy> + internalGetCleanupPolicies() { + if (cleanupPolicies_ == null) { + return com.google.protobuf.MapField.emptyMapField( + CleanupPoliciesDefaultEntryHolder.defaultEntry); + } + return cleanupPolicies_; + } + + public int getCleanupPoliciesCount() { + return internalGetCleanupPolicies().getMap().size(); + } + /** + * + * + *
+   * Optional. Cleanup policies for this repository. Cleanup policies indicate
+   * when certain package versions can be automatically deleted. Map keys are
+   * policy IDs supplied by users during policy creation. They must unique
+   * within a repository and be under 128 characters in length.
+   * 
+ * + * + * map<string, .google.devtools.artifactregistry.v1.CleanupPolicy> cleanup_policies = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsCleanupPolicies(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetCleanupPolicies().getMap().containsKey(key); + } + /** Use {@link #getCleanupPoliciesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map + getCleanupPolicies() { + return getCleanupPoliciesMap(); + } + /** + * + * + *
+   * Optional. Cleanup policies for this repository. Cleanup policies indicate
+   * when certain package versions can be automatically deleted. Map keys are
+   * policy IDs supplied by users during policy creation. They must unique
+   * within a repository and be under 128 characters in length.
+   * 
+ * + * + * map<string, .google.devtools.artifactregistry.v1.CleanupPolicy> cleanup_policies = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map + getCleanupPoliciesMap() { + return internalGetCleanupPolicies().getMap(); + } + /** + * + * + *
+   * Optional. Cleanup policies for this repository. Cleanup policies indicate
+   * when certain package versions can be automatically deleted. Map keys are
+   * policy IDs supplied by users during policy creation. They must unique
+   * within a repository and be under 128 characters in length.
+   * 
+ * + * + * map<string, .google.devtools.artifactregistry.v1.CleanupPolicy> cleanup_policies = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public /* nullable */ com.google.devtools.artifactregistry.v1.CleanupPolicy + getCleanupPoliciesOrDefault( + java.lang.String key, + /* nullable */ + com.google.devtools.artifactregistry.v1.CleanupPolicy defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetCleanupPolicies().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Optional. Cleanup policies for this repository. Cleanup policies indicate
+   * when certain package versions can be automatically deleted. Map keys are
+   * policy IDs supplied by users during policy creation. They must unique
+   * within a repository and be under 128 characters in length.
+   * 
+ * + * + * map<string, .google.devtools.artifactregistry.v1.CleanupPolicy> cleanup_policies = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.CleanupPolicy getCleanupPoliciesOrThrow( + java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetCleanupPolicies().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int SIZE_BYTES_FIELD_NUMBER = 13; + private long sizeBytes_ = 0L; + /** + * + * + *
+   * Output only. The size, in bytes, of all artifact storage in this
+   * repository. Repositories that are generally available or in public preview
+   *  use this to calculate storage costs.
+   * 
+ * + * int64 size_bytes = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The sizeBytes. + */ + @java.lang.Override + public long getSizeBytes() { + return sizeBytes_; + } + + public static final int SATISFIES_PZS_FIELD_NUMBER = 16; + private boolean satisfiesPzs_ = false; + /** + * + * + *
+   * Output only. If set, the repository satisfies physical zone separation.
+   * 
+ * + * bool satisfies_pzs = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The satisfiesPzs. + */ + @java.lang.Override + public boolean getSatisfiesPzs() { + return satisfiesPzs_; + } + + public static final int CLEANUP_POLICY_DRY_RUN_FIELD_NUMBER = 18; + private boolean cleanupPolicyDryRun_ = false; + /** + * + * + *
+   * Optional. If true, the cleanup pipeline is prevented from deleting versions
+   * in this repository.
+   * 
+ * + * bool cleanup_policy_dry_run = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The cleanupPolicyDryRun. + */ + @java.lang.Override + public boolean getCleanupPolicyDryRun() { + return cleanupPolicyDryRun_; + } + + 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 (format_ + != com.google.devtools.artifactregistry.v1.Repository.Format.FORMAT_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, format_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 4); + if (createTime_ != null) { + output.writeMessage(5, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(6, getUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKeyName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, kmsKeyName_); + } + if (formatConfigCase_ == 9) { + output.writeMessage( + 9, + (com.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig) formatConfig_); + } + if (mode_ + != com.google.devtools.artifactregistry.v1.Repository.Mode.MODE_UNSPECIFIED.getNumber()) { + output.writeEnum(10, mode_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetCleanupPolicies(), CleanupPoliciesDefaultEntryHolder.defaultEntry, 12); + if (sizeBytes_ != 0L) { + output.writeInt64(13, sizeBytes_); + } + if (modeConfigCase_ == 14) { + output.writeMessage( + 14, (com.google.devtools.artifactregistry.v1.VirtualRepositoryConfig) modeConfig_); + } + if (modeConfigCase_ == 15) { + output.writeMessage( + 15, (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig) modeConfig_); + } + if (satisfiesPzs_ != false) { + output.writeBool(16, satisfiesPzs_); + } + if (formatConfigCase_ == 17) { + output.writeMessage( + 17, + (com.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig) + formatConfig_); + } + if (cleanupPolicyDryRun_ != false) { + output.writeBool(18, cleanupPolicyDryRun_); + } + 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 (format_ + != com.google.devtools.artifactregistry.v1.Repository.Format.FORMAT_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, format_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, labels__); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKeyName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, kmsKeyName_); + } + if (formatConfigCase_ == 9) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 9, + (com.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig) + formatConfig_); + } + if (mode_ + != com.google.devtools.artifactregistry.v1.Repository.Mode.MODE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(10, mode_); + } + for (java.util.Map.Entry< + java.lang.String, com.google.devtools.artifactregistry.v1.CleanupPolicy> + entry : internalGetCleanupPolicies().getMap().entrySet()) { + com.google.protobuf.MapEntry< + java.lang.String, com.google.devtools.artifactregistry.v1.CleanupPolicy> + cleanupPolicies__ = + CleanupPoliciesDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, cleanupPolicies__); + } + if (sizeBytes_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(13, sizeBytes_); + } + if (modeConfigCase_ == 14) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 14, (com.google.devtools.artifactregistry.v1.VirtualRepositoryConfig) modeConfig_); + } + if (modeConfigCase_ == 15) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 15, (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig) modeConfig_); + } + if (satisfiesPzs_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(16, satisfiesPzs_); + } + if (formatConfigCase_ == 17) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 17, + (com.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig) + formatConfig_); + } + if (cleanupPolicyDryRun_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(18, cleanupPolicyDryRun_); + } + 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.Repository)) { + return super.equals(obj); + } + com.google.devtools.artifactregistry.v1.Repository other = + (com.google.devtools.artifactregistry.v1.Repository) obj; + + if (!getName().equals(other.getName())) return false; + if (format_ != other.format_) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!internalGetLabels().equals(other.internalGetLabels())) 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 (!getKmsKeyName().equals(other.getKmsKeyName())) return false; + if (mode_ != other.mode_) return false; + if (!internalGetCleanupPolicies().equals(other.internalGetCleanupPolicies())) return false; + if (getSizeBytes() != other.getSizeBytes()) return false; + if (getSatisfiesPzs() != other.getSatisfiesPzs()) return false; + if (getCleanupPolicyDryRun() != other.getCleanupPolicyDryRun()) return false; + if (!getFormatConfigCase().equals(other.getFormatConfigCase())) return false; + switch (formatConfigCase_) { + case 9: + if (!getMavenConfig().equals(other.getMavenConfig())) return false; + break; + case 17: + if (!getDockerConfig().equals(other.getDockerConfig())) return false; + break; + case 0: + default: + } + if (!getModeConfigCase().equals(other.getModeConfigCase())) return false; + switch (modeConfigCase_) { + case 14: + if (!getVirtualRepositoryConfig().equals(other.getVirtualRepositoryConfig())) return false; + break; + case 15: + if (!getRemoteRepositoryConfig().equals(other.getRemoteRepositoryConfig())) return false; + break; + case 0: + default: + } + 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) + FORMAT_FIELD_NUMBER; + hash = (53 * hash) + format_; + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (37 * hash) + KMS_KEY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getKmsKeyName().hashCode(); + hash = (37 * hash) + MODE_FIELD_NUMBER; + hash = (53 * hash) + mode_; + if (!internalGetCleanupPolicies().getMap().isEmpty()) { + hash = (37 * hash) + CLEANUP_POLICIES_FIELD_NUMBER; + hash = (53 * hash) + internalGetCleanupPolicies().hashCode(); + } + hash = (37 * hash) + SIZE_BYTES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getSizeBytes()); + hash = (37 * hash) + SATISFIES_PZS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSatisfiesPzs()); + hash = (37 * hash) + CLEANUP_POLICY_DRY_RUN_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getCleanupPolicyDryRun()); + switch (formatConfigCase_) { + case 9: + hash = (37 * hash) + MAVEN_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getMavenConfig().hashCode(); + break; + case 17: + hash = (37 * hash) + DOCKER_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getDockerConfig().hashCode(); + break; + case 0: + default: + } + switch (modeConfigCase_) { + case 14: + hash = (37 * hash) + VIRTUAL_REPOSITORY_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getVirtualRepositoryConfig().hashCode(); + break; + case 15: + hash = (37 * hash) + REMOTE_REPOSITORY_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getRemoteRepositoryConfig().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devtools.artifactregistry.v1.Repository parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.Repository 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.Repository parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.Repository 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.Repository parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.Repository 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.Repository parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.Repository 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.Repository parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.Repository 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.Repository 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.Repository 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.Repository prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A Repository for storing artifacts with a specific format.
+   * 
+ * + * Protobuf type {@code google.devtools.artifactregistry.v1.Repository} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devtools.artifactregistry.v1.Repository) + com.google.devtools.artifactregistry.v1.RepositoryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_Repository_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 4: + return internalGetLabels(); + case 12: + return internalGetCleanupPolicies(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 4: + return internalGetMutableLabels(); + case 12: + return internalGetMutableCleanupPolicies(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_Repository_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devtools.artifactregistry.v1.Repository.class, + com.google.devtools.artifactregistry.v1.Repository.Builder.class); + } + + // Construct using com.google.devtools.artifactregistry.v1.Repository.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (mavenConfigBuilder_ != null) { + mavenConfigBuilder_.clear(); + } + if (dockerConfigBuilder_ != null) { + dockerConfigBuilder_.clear(); + } + if (virtualRepositoryConfigBuilder_ != null) { + virtualRepositoryConfigBuilder_.clear(); + } + if (remoteRepositoryConfigBuilder_ != null) { + remoteRepositoryConfigBuilder_.clear(); + } + name_ = ""; + format_ = 0; + description_ = ""; + internalGetMutableLabels().clear(); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + kmsKeyName_ = ""; + mode_ = 0; + internalGetMutableCleanupPolicies().clear(); + sizeBytes_ = 0L; + satisfiesPzs_ = false; + cleanupPolicyDryRun_ = false; + formatConfigCase_ = 0; + formatConfig_ = null; + modeConfigCase_ = 0; + modeConfig_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_Repository_descriptor; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.Repository getDefaultInstanceForType() { + return com.google.devtools.artifactregistry.v1.Repository.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.Repository build() { + com.google.devtools.artifactregistry.v1.Repository result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.Repository buildPartial() { + com.google.devtools.artifactregistry.v1.Repository result = + new com.google.devtools.artifactregistry.v1.Repository(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.devtools.artifactregistry.v1.Repository result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000010) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.format_ = format_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.kmsKeyName_ = kmsKeyName_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.mode_ = mode_; + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.cleanupPolicies_ = internalGetCleanupPolicies(); + result.cleanupPolicies_.makeImmutable(); + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.sizeBytes_ = sizeBytes_; + } + if (((from_bitField0_ & 0x00004000) != 0)) { + result.satisfiesPzs_ = satisfiesPzs_; + } + if (((from_bitField0_ & 0x00008000) != 0)) { + result.cleanupPolicyDryRun_ = cleanupPolicyDryRun_; + } + } + + private void buildPartialOneofs(com.google.devtools.artifactregistry.v1.Repository result) { + result.formatConfigCase_ = formatConfigCase_; + result.formatConfig_ = this.formatConfig_; + if (formatConfigCase_ == 9 && mavenConfigBuilder_ != null) { + result.formatConfig_ = mavenConfigBuilder_.build(); + } + if (formatConfigCase_ == 17 && dockerConfigBuilder_ != null) { + result.formatConfig_ = dockerConfigBuilder_.build(); + } + result.modeConfigCase_ = modeConfigCase_; + result.modeConfig_ = this.modeConfig_; + if (modeConfigCase_ == 14 && virtualRepositoryConfigBuilder_ != null) { + result.modeConfig_ = virtualRepositoryConfigBuilder_.build(); + } + if (modeConfigCase_ == 15 && remoteRepositoryConfigBuilder_ != null) { + result.modeConfig_ = remoteRepositoryConfigBuilder_.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.Repository) { + return mergeFrom((com.google.devtools.artifactregistry.v1.Repository) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.devtools.artifactregistry.v1.Repository other) { + if (other == com.google.devtools.artifactregistry.v1.Repository.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.format_ != 0) { + setFormatValue(other.getFormatValue()); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000040; + onChanged(); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000080; + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (!other.getKmsKeyName().isEmpty()) { + kmsKeyName_ = other.kmsKeyName_; + bitField0_ |= 0x00000400; + onChanged(); + } + if (other.mode_ != 0) { + setModeValue(other.getModeValue()); + } + internalGetMutableCleanupPolicies().mergeFrom(other.internalGetCleanupPolicies()); + bitField0_ |= 0x00001000; + if (other.getSizeBytes() != 0L) { + setSizeBytes(other.getSizeBytes()); + } + if (other.getSatisfiesPzs() != false) { + setSatisfiesPzs(other.getSatisfiesPzs()); + } + if (other.getCleanupPolicyDryRun() != false) { + setCleanupPolicyDryRun(other.getCleanupPolicyDryRun()); + } + switch (other.getFormatConfigCase()) { + case MAVEN_CONFIG: + { + mergeMavenConfig(other.getMavenConfig()); + break; + } + case DOCKER_CONFIG: + { + mergeDockerConfig(other.getDockerConfig()); + break; + } + case FORMATCONFIG_NOT_SET: + { + break; + } + } + switch (other.getModeConfigCase()) { + case VIRTUAL_REPOSITORY_CONFIG: + { + mergeVirtualRepositoryConfig(other.getVirtualRepositoryConfig()); + break; + } + case REMOTE_REPOSITORY_CONFIG: + { + mergeRemoteRepositoryConfig(other.getRemoteRepositoryConfig()); + break; + } + case MODECONFIG_NOT_SET: + { + break; + } + } + 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_ |= 0x00000010; + break; + } // case 10 + case 16: + { + format_ = input.readEnum(); + bitField0_ |= 0x00000020; + break; + } // case 16 + case 26: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 26 + case 34: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000080; + break; + } // case 34 + case 42: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000100; + break; + } // case 42 + case 50: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000200; + break; + } // case 50 + case 66: + { + kmsKeyName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case 66 + case 74: + { + input.readMessage(getMavenConfigFieldBuilder().getBuilder(), extensionRegistry); + formatConfigCase_ = 9; + break; + } // case 74 + case 80: + { + mode_ = input.readEnum(); + bitField0_ |= 0x00000800; + break; + } // case 80 + case 98: + { + com.google.protobuf.MapEntry< + java.lang.String, com.google.devtools.artifactregistry.v1.CleanupPolicy> + cleanupPolicies__ = + input.readMessage( + CleanupPoliciesDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableCleanupPolicies() + .getMutableMap() + .put(cleanupPolicies__.getKey(), cleanupPolicies__.getValue()); + bitField0_ |= 0x00001000; + break; + } // case 98 + case 104: + { + sizeBytes_ = input.readInt64(); + bitField0_ |= 0x00002000; + break; + } // case 104 + case 114: + { + input.readMessage( + getVirtualRepositoryConfigFieldBuilder().getBuilder(), extensionRegistry); + modeConfigCase_ = 14; + break; + } // case 114 + case 122: + { + input.readMessage( + getRemoteRepositoryConfigFieldBuilder().getBuilder(), extensionRegistry); + modeConfigCase_ = 15; + break; + } // case 122 + case 128: + { + satisfiesPzs_ = input.readBool(); + bitField0_ |= 0x00004000; + break; + } // case 128 + case 138: + { + input.readMessage(getDockerConfigFieldBuilder().getBuilder(), extensionRegistry); + formatConfigCase_ = 17; + break; + } // case 138 + case 144: + { + cleanupPolicyDryRun_ = input.readBool(); + bitField0_ |= 0x00008000; + break; + } // case 144 + 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 formatConfigCase_ = 0; + private java.lang.Object formatConfig_; + + public FormatConfigCase getFormatConfigCase() { + return FormatConfigCase.forNumber(formatConfigCase_); + } + + public Builder clearFormatConfig() { + formatConfigCase_ = 0; + formatConfig_ = null; + onChanged(); + return this; + } + + private int modeConfigCase_ = 0; + private java.lang.Object modeConfig_; + + public ModeConfigCase getModeConfigCase() { + return ModeConfigCase.forNumber(modeConfigCase_); + } + + public Builder clearModeConfig() { + modeConfigCase_ = 0; + modeConfig_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig, + com.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig.Builder, + com.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfigOrBuilder> + mavenConfigBuilder_; + /** + * + * + *
+     * Maven repository config contains repository level configuration
+     * for the repositories of maven type.
+     * 
+ * + * .google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig maven_config = 9; + * + * + * @return Whether the mavenConfig field is set. + */ + @java.lang.Override + public boolean hasMavenConfig() { + return formatConfigCase_ == 9; + } + /** + * + * + *
+     * Maven repository config contains repository level configuration
+     * for the repositories of maven type.
+     * 
+ * + * .google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig maven_config = 9; + * + * + * @return The mavenConfig. + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig + getMavenConfig() { + if (mavenConfigBuilder_ == null) { + if (formatConfigCase_ == 9) { + return (com.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig) + formatConfig_; + } + return com.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig + .getDefaultInstance(); + } else { + if (formatConfigCase_ == 9) { + return mavenConfigBuilder_.getMessage(); + } + return com.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Maven repository config contains repository level configuration
+     * for the repositories of maven type.
+     * 
+ * + * .google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig maven_config = 9; + * + */ + public Builder setMavenConfig( + com.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig value) { + if (mavenConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + formatConfig_ = value; + onChanged(); + } else { + mavenConfigBuilder_.setMessage(value); + } + formatConfigCase_ = 9; + return this; + } + /** + * + * + *
+     * Maven repository config contains repository level configuration
+     * for the repositories of maven type.
+     * 
+ * + * .google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig maven_config = 9; + * + */ + public Builder setMavenConfig( + com.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig.Builder + builderForValue) { + if (mavenConfigBuilder_ == null) { + formatConfig_ = builderForValue.build(); + onChanged(); + } else { + mavenConfigBuilder_.setMessage(builderForValue.build()); + } + formatConfigCase_ = 9; + return this; + } + /** + * + * + *
+     * Maven repository config contains repository level configuration
+     * for the repositories of maven type.
+     * 
+ * + * .google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig maven_config = 9; + * + */ + public Builder mergeMavenConfig( + com.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig value) { + if (mavenConfigBuilder_ == null) { + if (formatConfigCase_ == 9 + && formatConfig_ + != com.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig + .getDefaultInstance()) { + formatConfig_ = + com.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig.newBuilder( + (com.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig) + formatConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + formatConfig_ = value; + } + onChanged(); + } else { + if (formatConfigCase_ == 9) { + mavenConfigBuilder_.mergeFrom(value); + } else { + mavenConfigBuilder_.setMessage(value); + } + } + formatConfigCase_ = 9; + return this; + } + /** + * + * + *
+     * Maven repository config contains repository level configuration
+     * for the repositories of maven type.
+     * 
+ * + * .google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig maven_config = 9; + * + */ + public Builder clearMavenConfig() { + if (mavenConfigBuilder_ == null) { + if (formatConfigCase_ == 9) { + formatConfigCase_ = 0; + formatConfig_ = null; + onChanged(); + } + } else { + if (formatConfigCase_ == 9) { + formatConfigCase_ = 0; + formatConfig_ = null; + } + mavenConfigBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Maven repository config contains repository level configuration
+     * for the repositories of maven type.
+     * 
+ * + * .google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig maven_config = 9; + * + */ + public com.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig.Builder + getMavenConfigBuilder() { + return getMavenConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Maven repository config contains repository level configuration
+     * for the repositories of maven type.
+     * 
+ * + * .google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig maven_config = 9; + * + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfigOrBuilder + getMavenConfigOrBuilder() { + if ((formatConfigCase_ == 9) && (mavenConfigBuilder_ != null)) { + return mavenConfigBuilder_.getMessageOrBuilder(); + } else { + if (formatConfigCase_ == 9) { + return (com.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig) + formatConfig_; + } + return com.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Maven repository config contains repository level configuration
+     * for the repositories of maven type.
+     * 
+ * + * .google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig maven_config = 9; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig, + com.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig.Builder, + com.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfigOrBuilder> + getMavenConfigFieldBuilder() { + if (mavenConfigBuilder_ == null) { + if (!(formatConfigCase_ == 9)) { + formatConfig_ = + com.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig + .getDefaultInstance(); + } + mavenConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig, + com.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig.Builder, + com.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfigOrBuilder>( + (com.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig) + formatConfig_, + getParentForChildren(), + isClean()); + formatConfig_ = null; + } + formatConfigCase_ = 9; + onChanged(); + return mavenConfigBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig, + com.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig.Builder, + com.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfigOrBuilder> + dockerConfigBuilder_; + /** + * + * + *
+     * Docker repository config contains repository level configuration
+     * for the repositories of docker type.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig docker_config = 17; + * + * + * @return Whether the dockerConfig field is set. + */ + @java.lang.Override + public boolean hasDockerConfig() { + return formatConfigCase_ == 17; + } + /** + * + * + *
+     * Docker repository config contains repository level configuration
+     * for the repositories of docker type.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig docker_config = 17; + * + * + * @return The dockerConfig. + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig + getDockerConfig() { + if (dockerConfigBuilder_ == null) { + if (formatConfigCase_ == 17) { + return (com.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig) + formatConfig_; + } + return com.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig + .getDefaultInstance(); + } else { + if (formatConfigCase_ == 17) { + return dockerConfigBuilder_.getMessage(); + } + return com.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Docker repository config contains repository level configuration
+     * for the repositories of docker type.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig docker_config = 17; + * + */ + public Builder setDockerConfig( + com.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig value) { + if (dockerConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + formatConfig_ = value; + onChanged(); + } else { + dockerConfigBuilder_.setMessage(value); + } + formatConfigCase_ = 17; + return this; } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 4: - return internalGetLabels(); - default: - throw new RuntimeException("Invalid map field number: " + number); + /** + * + * + *
+     * Docker repository config contains repository level configuration
+     * for the repositories of docker type.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig docker_config = 17; + * + */ + public Builder setDockerConfig( + com.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig.Builder + builderForValue) { + if (dockerConfigBuilder_ == null) { + formatConfig_ = builderForValue.build(); + onChanged(); + } else { + dockerConfigBuilder_.setMessage(builderForValue.build()); } + formatConfigCase_ = 17; + return this; } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField(int number) { - switch (number) { - case 4: - return internalGetMutableLabels(); - default: - throw new RuntimeException("Invalid map field number: " + number); + /** + * + * + *
+     * Docker repository config contains repository level configuration
+     * for the repositories of docker type.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig docker_config = 17; + * + */ + public Builder mergeDockerConfig( + com.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig value) { + if (dockerConfigBuilder_ == null) { + if (formatConfigCase_ == 17 + && formatConfig_ + != com.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig + .getDefaultInstance()) { + formatConfig_ = + com.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig.newBuilder( + (com.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig) + formatConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + formatConfig_ = value; + } + onChanged(); + } else { + if (formatConfigCase_ == 17) { + dockerConfigBuilder_.mergeFrom(value); + } else { + dockerConfigBuilder_.setMessage(value); + } } + formatConfigCase_ = 17; + return this; } - + /** + * + * + *
+     * Docker repository config contains repository level configuration
+     * for the repositories of docker type.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig docker_config = 17; + * + */ + public Builder clearDockerConfig() { + if (dockerConfigBuilder_ == null) { + if (formatConfigCase_ == 17) { + formatConfigCase_ = 0; + formatConfig_ = null; + onChanged(); + } + } else { + if (formatConfigCase_ == 17) { + formatConfigCase_ = 0; + formatConfig_ = null; + } + dockerConfigBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Docker repository config contains repository level configuration
+     * for the repositories of docker type.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig docker_config = 17; + * + */ + public com.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig.Builder + getDockerConfigBuilder() { + return getDockerConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Docker repository config contains repository level configuration
+     * for the repositories of docker type.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig docker_config = 17; + * + */ @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.devtools.artifactregistry.v1.RepositoryProto - .internal_static_google_devtools_artifactregistry_v1_Repository_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.devtools.artifactregistry.v1.Repository.class, - com.google.devtools.artifactregistry.v1.Repository.Builder.class); + public com.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfigOrBuilder + getDockerConfigOrBuilder() { + if ((formatConfigCase_ == 17) && (dockerConfigBuilder_ != null)) { + return dockerConfigBuilder_.getMessageOrBuilder(); + } else { + if (formatConfigCase_ == 17) { + return (com.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig) + formatConfig_; + } + return com.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig + .getDefaultInstance(); + } } - - // Construct using com.google.devtools.artifactregistry.v1.Repository.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); + /** + * + * + *
+     * Docker repository config contains repository level configuration
+     * for the repositories of docker type.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig docker_config = 17; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig, + com.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig.Builder, + com.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfigOrBuilder> + getDockerConfigFieldBuilder() { + if (dockerConfigBuilder_ == null) { + if (!(formatConfigCase_ == 17)) { + formatConfig_ = + com.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig + .getDefaultInstance(); + } + dockerConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig, + com.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig.Builder, + com.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfigOrBuilder>( + (com.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig) + formatConfig_, + getParentForChildren(), + isClean()); + formatConfig_ = null; + } + formatConfigCase_ = 17; + onChanged(); + return dockerConfigBuilder_; } + private com.google.protobuf.SingleFieldBuilderV3< + com.google.devtools.artifactregistry.v1.VirtualRepositoryConfig, + com.google.devtools.artifactregistry.v1.VirtualRepositoryConfig.Builder, + com.google.devtools.artifactregistry.v1.VirtualRepositoryConfigOrBuilder> + virtualRepositoryConfigBuilder_; + /** + * + * + *
+     * Configuration specific for a Virtual Repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.VirtualRepositoryConfig virtual_repository_config = 14; + * + * + * @return Whether the virtualRepositoryConfig field is set. + */ @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (mavenConfigBuilder_ != null) { - mavenConfigBuilder_.clear(); + public boolean hasVirtualRepositoryConfig() { + return modeConfigCase_ == 14; + } + /** + * + * + *
+     * Configuration specific for a Virtual Repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.VirtualRepositoryConfig virtual_repository_config = 14; + * + * + * @return The virtualRepositoryConfig. + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.VirtualRepositoryConfig + getVirtualRepositoryConfig() { + if (virtualRepositoryConfigBuilder_ == null) { + if (modeConfigCase_ == 14) { + return (com.google.devtools.artifactregistry.v1.VirtualRepositoryConfig) modeConfig_; + } + return com.google.devtools.artifactregistry.v1.VirtualRepositoryConfig.getDefaultInstance(); + } else { + if (modeConfigCase_ == 14) { + return virtualRepositoryConfigBuilder_.getMessage(); + } + return com.google.devtools.artifactregistry.v1.VirtualRepositoryConfig.getDefaultInstance(); } - name_ = ""; - format_ = 0; - description_ = ""; - internalGetMutableLabels().clear(); - createTime_ = null; - if (createTimeBuilder_ != null) { - createTimeBuilder_.dispose(); - createTimeBuilder_ = null; + } + /** + * + * + *
+     * Configuration specific for a Virtual Repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.VirtualRepositoryConfig virtual_repository_config = 14; + * + */ + public Builder setVirtualRepositoryConfig( + com.google.devtools.artifactregistry.v1.VirtualRepositoryConfig value) { + if (virtualRepositoryConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + modeConfig_ = value; + onChanged(); + } else { + virtualRepositoryConfigBuilder_.setMessage(value); } - updateTime_ = null; - if (updateTimeBuilder_ != null) { - updateTimeBuilder_.dispose(); - updateTimeBuilder_ = null; + modeConfigCase_ = 14; + return this; + } + /** + * + * + *
+     * Configuration specific for a Virtual Repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.VirtualRepositoryConfig virtual_repository_config = 14; + * + */ + public Builder setVirtualRepositoryConfig( + com.google.devtools.artifactregistry.v1.VirtualRepositoryConfig.Builder builderForValue) { + if (virtualRepositoryConfigBuilder_ == null) { + modeConfig_ = builderForValue.build(); + onChanged(); + } else { + virtualRepositoryConfigBuilder_.setMessage(builderForValue.build()); + } + modeConfigCase_ = 14; + return this; + } + /** + * + * + *
+     * Configuration specific for a Virtual Repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.VirtualRepositoryConfig virtual_repository_config = 14; + * + */ + public Builder mergeVirtualRepositoryConfig( + com.google.devtools.artifactregistry.v1.VirtualRepositoryConfig value) { + if (virtualRepositoryConfigBuilder_ == null) { + if (modeConfigCase_ == 14 + && modeConfig_ + != com.google.devtools.artifactregistry.v1.VirtualRepositoryConfig + .getDefaultInstance()) { + modeConfig_ = + com.google.devtools.artifactregistry.v1.VirtualRepositoryConfig.newBuilder( + (com.google.devtools.artifactregistry.v1.VirtualRepositoryConfig) modeConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + modeConfig_ = value; + } + onChanged(); + } else { + if (modeConfigCase_ == 14) { + virtualRepositoryConfigBuilder_.mergeFrom(value); + } else { + virtualRepositoryConfigBuilder_.setMessage(value); + } + } + modeConfigCase_ = 14; + return this; + } + /** + * + * + *
+     * Configuration specific for a Virtual Repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.VirtualRepositoryConfig virtual_repository_config = 14; + * + */ + public Builder clearVirtualRepositoryConfig() { + if (virtualRepositoryConfigBuilder_ == null) { + if (modeConfigCase_ == 14) { + modeConfigCase_ = 0; + modeConfig_ = null; + onChanged(); + } + } else { + if (modeConfigCase_ == 14) { + modeConfigCase_ = 0; + modeConfig_ = null; + } + virtualRepositoryConfigBuilder_.clear(); } - kmsKeyName_ = ""; - formatConfigCase_ = 0; - formatConfig_ = null; return this; } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.devtools.artifactregistry.v1.RepositoryProto - .internal_static_google_devtools_artifactregistry_v1_Repository_descriptor; + /** + * + * + *
+     * Configuration specific for a Virtual Repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.VirtualRepositoryConfig virtual_repository_config = 14; + * + */ + public com.google.devtools.artifactregistry.v1.VirtualRepositoryConfig.Builder + getVirtualRepositoryConfigBuilder() { + return getVirtualRepositoryConfigFieldBuilder().getBuilder(); } - + /** + * + * + *
+     * Configuration specific for a Virtual Repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.VirtualRepositoryConfig virtual_repository_config = 14; + * + */ @java.lang.Override - public com.google.devtools.artifactregistry.v1.Repository getDefaultInstanceForType() { - return com.google.devtools.artifactregistry.v1.Repository.getDefaultInstance(); + public com.google.devtools.artifactregistry.v1.VirtualRepositoryConfigOrBuilder + getVirtualRepositoryConfigOrBuilder() { + if ((modeConfigCase_ == 14) && (virtualRepositoryConfigBuilder_ != null)) { + return virtualRepositoryConfigBuilder_.getMessageOrBuilder(); + } else { + if (modeConfigCase_ == 14) { + return (com.google.devtools.artifactregistry.v1.VirtualRepositoryConfig) modeConfig_; + } + return com.google.devtools.artifactregistry.v1.VirtualRepositoryConfig.getDefaultInstance(); + } } - - @java.lang.Override - public com.google.devtools.artifactregistry.v1.Repository build() { - com.google.devtools.artifactregistry.v1.Repository result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); + /** + * + * + *
+     * Configuration specific for a Virtual Repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.VirtualRepositoryConfig virtual_repository_config = 14; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.devtools.artifactregistry.v1.VirtualRepositoryConfig, + com.google.devtools.artifactregistry.v1.VirtualRepositoryConfig.Builder, + com.google.devtools.artifactregistry.v1.VirtualRepositoryConfigOrBuilder> + getVirtualRepositoryConfigFieldBuilder() { + if (virtualRepositoryConfigBuilder_ == null) { + if (!(modeConfigCase_ == 14)) { + modeConfig_ = + com.google.devtools.artifactregistry.v1.VirtualRepositoryConfig.getDefaultInstance(); + } + virtualRepositoryConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.devtools.artifactregistry.v1.VirtualRepositoryConfig, + com.google.devtools.artifactregistry.v1.VirtualRepositoryConfig.Builder, + com.google.devtools.artifactregistry.v1.VirtualRepositoryConfigOrBuilder>( + (com.google.devtools.artifactregistry.v1.VirtualRepositoryConfig) modeConfig_, + getParentForChildren(), + isClean()); + modeConfig_ = null; } - return result; + modeConfigCase_ = 14; + onChanged(); + return virtualRepositoryConfigBuilder_; } + private com.google.protobuf.SingleFieldBuilderV3< + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.Builder, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfigOrBuilder> + remoteRepositoryConfigBuilder_; + /** + * + * + *
+     * Configuration specific for a Remote Repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig remote_repository_config = 15; + * + * + * @return Whether the remoteRepositoryConfig field is set. + */ @java.lang.Override - public com.google.devtools.artifactregistry.v1.Repository buildPartial() { - com.google.devtools.artifactregistry.v1.Repository result = - new com.google.devtools.artifactregistry.v1.Repository(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - buildPartialOneofs(result); - onBuilt(); - return result; + public boolean hasRemoteRepositoryConfig() { + return modeConfigCase_ == 15; } - - private void buildPartial0(com.google.devtools.artifactregistry.v1.Repository result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.name_ = name_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.format_ = format_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.description_ = description_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.labels_ = internalGetLabels(); - result.labels_.makeImmutable(); - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); - } - if (((from_bitField0_ & 0x00000040) != 0)) { - result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); - } - if (((from_bitField0_ & 0x00000080) != 0)) { - result.kmsKeyName_ = kmsKeyName_; + /** + * + * + *
+     * Configuration specific for a Remote Repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig remote_repository_config = 15; + * + * + * @return The remoteRepositoryConfig. + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig + getRemoteRepositoryConfig() { + if (remoteRepositoryConfigBuilder_ == null) { + if (modeConfigCase_ == 15) { + return (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig) modeConfig_; + } + return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.getDefaultInstance(); + } else { + if (modeConfigCase_ == 15) { + return remoteRepositoryConfigBuilder_.getMessage(); + } + return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.getDefaultInstance(); } } - - private void buildPartialOneofs(com.google.devtools.artifactregistry.v1.Repository result) { - result.formatConfigCase_ = formatConfigCase_; - result.formatConfig_ = this.formatConfig_; - if (formatConfigCase_ == 9 && mavenConfigBuilder_ != null) { - result.formatConfig_ = mavenConfigBuilder_.build(); + /** + * + * + *
+     * Configuration specific for a Remote Repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig remote_repository_config = 15; + * + */ + public Builder setRemoteRepositoryConfig( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig value) { + if (remoteRepositoryConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + modeConfig_ = value; + onChanged(); + } else { + remoteRepositoryConfigBuilder_.setMessage(value); } + modeConfigCase_ = 15; + return this; } - - @java.lang.Override - public Builder clone() { - return super.clone(); + /** + * + * + *
+     * Configuration specific for a Remote Repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig remote_repository_config = 15; + * + */ + public Builder setRemoteRepositoryConfig( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.Builder builderForValue) { + if (remoteRepositoryConfigBuilder_ == null) { + modeConfig_ = builderForValue.build(); + onChanged(); + } else { + remoteRepositoryConfigBuilder_.setMessage(builderForValue.build()); + } + modeConfigCase_ = 15; + return this; } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); + /** + * + * + *
+     * Configuration specific for a Remote Repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig remote_repository_config = 15; + * + */ + public Builder mergeRemoteRepositoryConfig( + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig value) { + if (remoteRepositoryConfigBuilder_ == null) { + if (modeConfigCase_ == 15 + && modeConfig_ + != com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig + .getDefaultInstance()) { + modeConfig_ = + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.newBuilder( + (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig) modeConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + modeConfig_ = value; + } + onChanged(); + } else { + if (modeConfigCase_ == 15) { + remoteRepositoryConfigBuilder_.mergeFrom(value); + } else { + remoteRepositoryConfigBuilder_.setMessage(value); + } + } + modeConfigCase_ = 15; + return this; } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); + /** + * + * + *
+     * Configuration specific for a Remote Repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig remote_repository_config = 15; + * + */ + public Builder clearRemoteRepositoryConfig() { + if (remoteRepositoryConfigBuilder_ == null) { + if (modeConfigCase_ == 15) { + modeConfigCase_ = 0; + modeConfig_ = null; + onChanged(); + } + } else { + if (modeConfigCase_ == 15) { + modeConfigCase_ = 0; + modeConfig_ = null; + } + remoteRepositoryConfigBuilder_.clear(); + } + return this; } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); + /** + * + * + *
+     * Configuration specific for a Remote Repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig remote_repository_config = 15; + * + */ + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.Builder + getRemoteRepositoryConfigBuilder() { + return getRemoteRepositoryConfigFieldBuilder().getBuilder(); } - + /** + * + * + *
+     * Configuration specific for a Remote Repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig remote_repository_config = 15; + * + */ @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); + public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfigOrBuilder + getRemoteRepositoryConfigOrBuilder() { + if ((modeConfigCase_ == 15) && (remoteRepositoryConfigBuilder_ != null)) { + return remoteRepositoryConfigBuilder_.getMessageOrBuilder(); + } else { + if (modeConfigCase_ == 15) { + return (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig) modeConfig_; + } + return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.getDefaultInstance(); + } } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + /** + * + * + *
+     * Configuration specific for a Remote Repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig remote_repository_config = 15; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.Builder, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfigOrBuilder> + getRemoteRepositoryConfigFieldBuilder() { + if (remoteRepositoryConfigBuilder_ == null) { + if (!(modeConfigCase_ == 15)) { + modeConfig_ = + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.getDefaultInstance(); + } + remoteRepositoryConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.Builder, + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfigOrBuilder>( + (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig) modeConfig_, + getParentForChildren(), + isClean()); + modeConfig_ = null; + } + modeConfigCase_ = 15; + onChanged(); + return remoteRepositoryConfigBuilder_; } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.devtools.artifactregistry.v1.Repository) { - return mergeFrom((com.google.devtools.artifactregistry.v1.Repository) other); + private java.lang.Object name_ = ""; + /** + * + * + *
+     * The name of the repository, for example:
+     * `projects/p1/locations/us-central1/repositories/repo1`.
+     * 
+ * + * 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 { - super.mergeFrom(other); - return this; + return (java.lang.String) ref; } } - - public Builder mergeFrom(com.google.devtools.artifactregistry.v1.Repository other) { - if (other == com.google.devtools.artifactregistry.v1.Repository.getDefaultInstance()) - return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (other.format_ != 0) { - setFormatValue(other.getFormatValue()); + /** + * + * + *
+     * The name of the repository, for example:
+     * `projects/p1/locations/us-central1/repositories/repo1`.
+     * 
+ * + * 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; } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - bitField0_ |= 0x00000008; - onChanged(); + } + /** + * + * + *
+     * The name of the repository, for example:
+     * `projects/p1/locations/us-central1/repositories/repo1`.
+     * 
+ * + * 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(); } - internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + name_ = value; bitField0_ |= 0x00000010; - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - if (other.hasUpdateTime()) { - mergeUpdateTime(other.getUpdateTime()); - } - if (!other.getKmsKeyName().isEmpty()) { - kmsKeyName_ = other.kmsKeyName_; - bitField0_ |= 0x00000080; - onChanged(); - } - switch (other.getFormatConfigCase()) { - case MAVEN_CONFIG: - { - mergeMavenConfig(other.getMavenConfig()); - break; - } - case FORMATCONFIG_NOT_SET: - { - break; - } + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the repository, for example:
+     * `projects/p1/locations/us-central1/repositories/repo1`.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the repository, for example:
+     * `projects/p1/locations/us-central1/repositories/repo1`.
+     * 
+ * + * 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(); } - this.mergeUnknownFields(other.getUnknownFields()); + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000010; onChanged(); return this; } + private int format_ = 0; + /** + * + * + *
+     * Optional. The format of packages that are stored in the repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.Repository.Format format = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for format. + */ @java.lang.Override - public final boolean isInitialized() { - return true; + public int getFormatValue() { + return format_; } - - @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_ |= 0x00000002; - break; - } // case 10 - case 16: - { - format_ = input.readEnum(); - bitField0_ |= 0x00000004; - break; - } // case 16 - case 26: - { - description_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 26 - case 34: - { - com.google.protobuf.MapEntry labels__ = - input.readMessage( - LabelsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - internalGetMutableLabels() - .getMutableMap() - .put(labels__.getKey(), labels__.getValue()); - bitField0_ |= 0x00000010; - break; - } // case 34 - case 42: - { - input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000020; - break; - } // case 42 - case 50: - { - input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000040; - break; - } // case 50 - case 66: - { - kmsKeyName_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; - break; - } // case 66 - case 74: - { - input.readMessage(getMavenConfigFieldBuilder().getBuilder(), extensionRegistry); - formatConfigCase_ = 9; - break; - } // case 74 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally + /** + * + * + *
+     * Optional. The format of packages that are stored in the repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.Repository.Format format = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for format to set. + * @return This builder for chaining. + */ + public Builder setFormatValue(int value) { + format_ = value; + bitField0_ |= 0x00000020; + onChanged(); return this; } - - private int formatConfigCase_ = 0; - private java.lang.Object formatConfig_; - - public FormatConfigCase getFormatConfigCase() { - return FormatConfigCase.forNumber(formatConfigCase_); + /** + * + * + *
+     * Optional. The format of packages that are stored in the repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.Repository.Format format = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The format. + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.Repository.Format getFormat() { + com.google.devtools.artifactregistry.v1.Repository.Format result = + com.google.devtools.artifactregistry.v1.Repository.Format.forNumber(format_); + return result == null + ? com.google.devtools.artifactregistry.v1.Repository.Format.UNRECOGNIZED + : result; } - - public Builder clearFormatConfig() { - formatConfigCase_ = 0; - formatConfig_ = null; + /** + * + * + *
+     * Optional. The format of packages that are stored in the repository.
+     * 
+ * + * + * .google.devtools.artifactregistry.v1.Repository.Format format = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The format to set. + * @return This builder for chaining. + */ + public Builder setFormat(com.google.devtools.artifactregistry.v1.Repository.Format value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000020; + format_ = value.getNumber(); onChanged(); return this; } - - private int bitField0_; - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig, - com.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig.Builder, - com.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfigOrBuilder> - mavenConfigBuilder_; /** * * *
-     * Maven repository config contains repository level configuration
-     * for the repositories of maven type.
+     * Optional. The format of packages that are stored in the repository.
      * 
* - * .google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig maven_config = 9; + * + * .google.devtools.artifactregistry.v1.Repository.Format format = 2 [(.google.api.field_behavior) = OPTIONAL]; * * - * @return Whether the mavenConfig field is set. + * @return This builder for chaining. */ - @java.lang.Override - public boolean hasMavenConfig() { - return formatConfigCase_ == 9; + public Builder clearFormat() { + bitField0_ = (bitField0_ & ~0x00000020); + format_ = 0; + onChanged(); + return this; } + + private java.lang.Object description_ = ""; /** * * *
-     * Maven repository config contains repository level configuration
-     * for the repositories of maven type.
+     * The user-provided description of the repository.
      * 
* - * .google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig maven_config = 9; - * + * string description = 3; * - * @return The mavenConfig. + * @return The description. */ - @java.lang.Override - public com.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig - getMavenConfig() { - if (mavenConfigBuilder_ == null) { - if (formatConfigCase_ == 9) { - return (com.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig) - formatConfig_; - } - return com.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig - .getDefaultInstance(); + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; } else { - if (formatConfigCase_ == 9) { - return mavenConfigBuilder_.getMessage(); - } - return com.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig - .getDefaultInstance(); + return (java.lang.String) ref; } } /** * * *
-     * Maven repository config contains repository level configuration
-     * for the repositories of maven type.
+     * The user-provided description of the repository.
      * 
* - * .google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig maven_config = 9; - * + * string description = 3; + * + * @return The bytes for description. */ - public Builder setMavenConfig( - com.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig value) { - if (mavenConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - formatConfig_ = value; - onChanged(); + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; } else { - mavenConfigBuilder_.setMessage(value); + return (com.google.protobuf.ByteString) ref; } - formatConfigCase_ = 9; + } + /** + * + * + *
+     * The user-provided description of the repository.
+     * 
+ * + * string description = 3; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000040; + onChanged(); return this; } /** * * *
-     * Maven repository config contains repository level configuration
-     * for the repositories of maven type.
+     * The user-provided description of the repository.
      * 
* - * .google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig maven_config = 9; - * + * string description = 3; + * + * @return This builder for chaining. */ - public Builder setMavenConfig( - com.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig.Builder - builderForValue) { - if (mavenConfigBuilder_ == null) { - formatConfig_ = builderForValue.build(); - onChanged(); - } else { - mavenConfigBuilder_.setMessage(builderForValue.build()); + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + * + * + *
+     * The user-provided description of the repository.
+     * 
+ * + * string description = 3; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); } - formatConfigCase_ = 9; + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000040; + onChanged(); return this; } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00000080; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } /** * * *
-     * Maven repository config contains repository level configuration
-     * for the repositories of maven type.
+     * Labels with user-defined metadata.
+     * This field may contain up to 64 entries. Label keys and values may be no
+     * longer than 63 characters. Label keys must begin with a lowercase letter
+     * and may only contain lowercase letters, numeric characters, underscores,
+     * and dashes.
      * 
* - * .google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig maven_config = 9; - * + * map<string, string> labels = 4; */ - public Builder mergeMavenConfig( - com.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig value) { - if (mavenConfigBuilder_ == null) { - if (formatConfigCase_ == 9 - && formatConfig_ - != com.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig - .getDefaultInstance()) { - formatConfig_ = - com.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig.newBuilder( - (com.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig) - formatConfig_) - .mergeFrom(value) - .buildPartial(); - } else { - formatConfig_ = value; - } - onChanged(); - } else { - if (formatConfigCase_ == 9) { - mavenConfigBuilder_.mergeFrom(value); - } else { - mavenConfigBuilder_.setMessage(value); - } + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * Labels with user-defined metadata.
+     * This field may contain up to 64 entries. Label keys and values may be no
+     * longer than 63 characters. Label keys must begin with a lowercase letter
+     * and may only contain lowercase letters, numeric characters, underscores,
+     * and dashes.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Labels with user-defined metadata.
+     * This field may contain up to 64 entries. Label keys and values may be no
+     * longer than 63 characters. Label keys must begin with a lowercase letter
+     * and may only contain lowercase letters, numeric characters, underscores,
+     * and dashes.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); } - formatConfigCase_ = 9; - return this; + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; } /** * * *
-     * Maven repository config contains repository level configuration
-     * for the repositories of maven type.
+     * Labels with user-defined metadata.
+     * This field may contain up to 64 entries. Label keys and values may be no
+     * longer than 63 characters. Label keys must begin with a lowercase letter
+     * and may only contain lowercase letters, numeric characters, underscores,
+     * and dashes.
      * 
* - * .google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig maven_config = 9; - * + * map<string, string> labels = 4; */ - public Builder clearMavenConfig() { - if (mavenConfigBuilder_ == null) { - if (formatConfigCase_ == 9) { - formatConfigCase_ = 0; - formatConfig_ = null; - onChanged(); - } - } else { - if (formatConfigCase_ == 9) { - formatConfigCase_ = 0; - formatConfig_ = null; - } - mavenConfigBuilder_.clear(); + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); } + return map.get(key); + } + + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00000080); + internalGetMutableLabels().getMutableMap().clear(); return this; } /** * * *
-     * Maven repository config contains repository level configuration
-     * for the repositories of maven type.
+     * Labels with user-defined metadata.
+     * This field may contain up to 64 entries. Label keys and values may be no
+     * longer than 63 characters. Label keys must begin with a lowercase letter
+     * and may only contain lowercase letters, numeric characters, underscores,
+     * and dashes.
      * 
* - * .google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig maven_config = 9; - * + * map<string, string> labels = 4; */ - public com.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig.Builder - getMavenConfigBuilder() { - return getMavenConfigFieldBuilder().getBuilder(); + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + bitField0_ |= 0x00000080; + return internalGetMutableLabels().getMutableMap(); } /** * * *
-     * Maven repository config contains repository level configuration
-     * for the repositories of maven type.
+     * Labels with user-defined metadata.
+     * This field may contain up to 64 entries. Label keys and values may be no
+     * longer than 63 characters. Label keys must begin with a lowercase letter
+     * and may only contain lowercase letters, numeric characters, underscores,
+     * and dashes.
      * 
* - * .google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig maven_config = 9; - * + * map<string, string> labels = 4; */ - @java.lang.Override - public com.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfigOrBuilder - getMavenConfigOrBuilder() { - if ((formatConfigCase_ == 9) && (mavenConfigBuilder_ != null)) { - return mavenConfigBuilder_.getMessageOrBuilder(); - } else { - if (formatConfigCase_ == 9) { - return (com.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig) - formatConfig_; - } - return com.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig - .getDefaultInstance(); + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableLabels().getMutableMap().put(key, value); + bitField0_ |= 0x00000080; + return this; } /** * * *
-     * Maven repository config contains repository level configuration
-     * for the repositories of maven type.
+     * Labels with user-defined metadata.
+     * This field may contain up to 64 entries. Label keys and values may be no
+     * longer than 63 characters. Label keys must begin with a lowercase letter
+     * and may only contain lowercase letters, numeric characters, underscores,
+     * and dashes.
      * 
* - * .google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig maven_config = 9; - * + * map<string, string> labels = 4; */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig, - com.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig.Builder, - com.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfigOrBuilder> - getMavenConfigFieldBuilder() { - if (mavenConfigBuilder_ == null) { - if (!(formatConfigCase_ == 9)) { - formatConfig_ = - com.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig - .getDefaultInstance(); - } - mavenConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig, - com.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig.Builder, - com.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfigOrBuilder>( - (com.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig) - formatConfig_, - getParentForChildren(), - isClean()); - formatConfig_ = null; - } - formatConfigCase_ = 9; - onChanged(); - return mavenConfigBuilder_; + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000080; + return this; } - private java.lang.Object name_ = ""; + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; /** * * *
-     * The name of the repository, for example:
-     * "projects/p1/locations/us-central1/repositories/repo1".
+     * Output only. The time when the repository was created.
      * 
* - * string name = 1; + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * - * @return The name. + * @return Whether the createTime field is set. */ - 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; - } + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000100) != 0); } /** * * *
-     * The name of the repository, for example:
-     * "projects/p1/locations/us-central1/repositories/repo1".
+     * Output only. The time when the repository was created.
      * 
* - * string name = 1; + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * - * @return The bytes for name. + * @return The createTime. */ - 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; + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; } else { - return (com.google.protobuf.ByteString) ref; + return createTimeBuilder_.getMessage(); } } /** * * *
-     * The name of the repository, for example:
-     * "projects/p1/locations/us-central1/repositories/repo1".
+     * Output only. The time when the repository was created.
      * 
* - * string name = 1; - * - * @param value The name to set. - * @return This builder for chaining. + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); } - name_ = value; - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000100; onChanged(); return this; } @@ -2715,17 +5507,20 @@ public Builder setName(java.lang.String value) { * * *
-     * The name of the repository, for example:
-     * "projects/p1/locations/us-central1/repositories/repo1".
+     * Output only. The time when the repository was created.
      * 
* - * string name = 1; - * - * @return This builder for chaining. + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000002); + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000100; onChanged(); return this; } @@ -2733,57 +5528,47 @@ public Builder clearName() { * * *
-     * The name of the repository, for example:
-     * "projects/p1/locations/us-central1/repositories/repo1".
+     * Output only. The time when the repository was created.
      * 
* - * string name = 1; - * - * @param value The bytes for name to set. - * @return This builder for chaining. + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000100; onChanged(); return this; } - - private int format_ = 0; - /** - * - * - *
-     * The format of packages that are stored in the repository.
-     * 
- * - * .google.devtools.artifactregistry.v1.Repository.Format format = 2; - * - * @return The enum numeric value on the wire for format. - */ - @java.lang.Override - public int getFormatValue() { - return format_; - } /** * * *
-     * The format of packages that are stored in the repository.
+     * Output only. The time when the repository was created.
      * 
* - * .google.devtools.artifactregistry.v1.Repository.Format format = 2; - * - * @param value The enum numeric value on the wire for format to set. - * @return This builder for chaining. + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public Builder setFormatValue(int value) { - format_ = value; - bitField0_ |= 0x00000004; + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000100); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } onChanged(); return this; } @@ -2791,123 +5576,131 @@ public Builder setFormatValue(int value) { * * *
-     * The format of packages that are stored in the repository.
+     * Output only. The time when the repository was created.
      * 
* - * .google.devtools.artifactregistry.v1.Repository.Format format = 2; - * - * @return The format. + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - @java.lang.Override - public com.google.devtools.artifactregistry.v1.Repository.Format getFormat() { - com.google.devtools.artifactregistry.v1.Repository.Format result = - com.google.devtools.artifactregistry.v1.Repository.Format.forNumber(format_); - return result == null - ? com.google.devtools.artifactregistry.v1.Repository.Format.UNRECOGNIZED - : result; + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000100; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); } /** * * *
-     * The format of packages that are stored in the repository.
+     * Output only. The time when the repository was created.
      * 
* - * .google.devtools.artifactregistry.v1.Repository.Format format = 2; - * - * @param value The format to set. - * @return This builder for chaining. + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public Builder setFormat(com.google.devtools.artifactregistry.v1.Repository.Format value) { - if (value == null) { - throw new NullPointerException(); + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; } - bitField0_ |= 0x00000004; - format_ = value.getNumber(); - onChanged(); - return this; } /** * * *
-     * The format of packages that are stored in the repository.
+     * Output only. The time when the repository was created.
      * 
* - * .google.devtools.artifactregistry.v1.Repository.Format format = 2; - * - * @return This builder for chaining. + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public Builder clearFormat() { - bitField0_ = (bitField0_ & ~0x00000004); - format_ = 0; - onChanged(); - return this; + 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 java.lang.Object description_ = ""; + 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_; /** * * *
-     * The user-provided description of the repository.
+     * Output only. The time when the repository was last updated.
      * 
* - * string description = 3; + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * - * @return The description. + * @return Whether the updateTime field is set. */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000200) != 0); } /** * * *
-     * The user-provided description of the repository.
+     * Output only. The time when the repository was last updated.
      * 
* - * string description = 3; + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * - * @return The bytes for description. + * @return The updateTime. */ - public com.google.protobuf.ByteString getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - description_ = b; - return b; + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; } else { - return (com.google.protobuf.ByteString) ref; + return updateTimeBuilder_.getMessage(); } } /** * * *
-     * The user-provided description of the repository.
+     * Output only. The time when the repository was last updated.
      * 
* - * string description = 3; - * - * @param value The description to set. - * @return This builder for chaining. + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public Builder setDescription(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); } - description_ = value; - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000200; onChanged(); return this; } @@ -2915,16 +5708,20 @@ public Builder setDescription(java.lang.String value) { * * *
-     * The user-provided description of the repository.
+     * Output only. The time when the repository was last updated.
      * 
* - * string description = 3; - * - * @return This builder for chaining. + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public Builder clearDescription() { - description_ = getDefaultInstance().getDescription(); - bitField0_ = (bitField0_ & ~0x00000008); + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000200; onChanged(); return this; } @@ -2932,294 +5729,270 @@ public Builder clearDescription() { * * *
-     * The user-provided description of the repository.
+     * Output only. The time when the repository was last updated.
      * 
* - * string description = 3; - * - * @param value The bytes for description to set. - * @return This builder for chaining. + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); } - checkByteStringIsUtf8(value); - description_ = value; - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000200; onChanged(); return this; } - - private com.google.protobuf.MapField labels_; - - private com.google.protobuf.MapField internalGetLabels() { - if (labels_ == null) { - return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); - } - return labels_; - } - - private com.google.protobuf.MapField - internalGetMutableLabels() { - if (labels_ == null) { - labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); - } - if (!labels_.isMutable()) { - labels_ = labels_.copy(); - } - bitField0_ |= 0x00000010; - onChanged(); - return labels_; - } - - public int getLabelsCount() { - return internalGetLabels().getMap().size(); - } /** * * *
-     * Labels with user-defined metadata.
-     * This field may contain up to 64 entries. Label keys and values may be no
-     * longer than 63 characters. Label keys must begin with a lowercase letter
-     * and may only contain lowercase letters, numeric characters, underscores,
-     * and dashes.
+     * Output only. The time when the repository was last updated.
      * 
* - * map<string, string> labels = 4; + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - @java.lang.Override - public boolean containsLabels(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000200); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; } - return internalGetLabels().getMap().containsKey(key); - } - /** Use {@link #getLabelsMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getLabels() { - return getLabelsMap(); + onChanged(); + return this; } /** * * *
-     * Labels with user-defined metadata.
-     * This field may contain up to 64 entries. Label keys and values may be no
-     * longer than 63 characters. Label keys must begin with a lowercase letter
-     * and may only contain lowercase letters, numeric characters, underscores,
-     * and dashes.
+     * Output only. The time when the repository was last updated.
      * 
* - * map<string, string> labels = 4; + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - @java.lang.Override - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000200; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); } /** - * - * - *
-     * Labels with user-defined metadata.
-     * This field may contain up to 64 entries. Label keys and values may be no
-     * longer than 63 characters. Label keys must begin with a lowercase letter
-     * and may only contain lowercase letters, numeric characters, underscores,
-     * and dashes.
+     *
+     *
+     * 
+     * Output only. The time when the repository was last updated.
      * 
* - * map<string, string> labels = 4; + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - @java.lang.Override - public /* nullable */ java.lang.String getLabelsOrDefault( - java.lang.String key, - /* nullable */ - java.lang.String defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; } - java.util.Map map = internalGetLabels().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; } /** * * *
-     * Labels with user-defined metadata.
-     * This field may contain up to 64 entries. Label keys and values may be no
-     * longer than 63 characters. Label keys must begin with a lowercase letter
-     * and may only contain lowercase letters, numeric characters, underscores,
-     * and dashes.
+     * Output only. The time when the repository was last updated.
      * 
* - * map<string, string> labels = 4; + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - @java.lang.Override - public java.lang.String getLabelsOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetLabels().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); + 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 map.get(key); + return updateTimeBuilder_; } - public Builder clearLabels() { - bitField0_ = (bitField0_ & ~0x00000010); - internalGetMutableLabels().getMutableMap().clear(); - return this; - } + private java.lang.Object kmsKeyName_ = ""; /** * * *
-     * Labels with user-defined metadata.
-     * This field may contain up to 64 entries. Label keys and values may be no
-     * longer than 63 characters. Label keys must begin with a lowercase letter
-     * and may only contain lowercase letters, numeric characters, underscores,
-     * and dashes.
+     * The Cloud KMS resource name of the customer managed encryption key that's
+     * used to encrypt the contents of the Repository. Has the form:
+     * `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`.
+     * This value may not be changed after the Repository has been created.
      * 
* - * map<string, string> labels = 4; + * string kms_key_name = 8; + * + * @return The kmsKeyName. */ - public Builder removeLabels(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); + public java.lang.String getKmsKeyName() { + java.lang.Object ref = kmsKeyName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kmsKeyName_ = s; + return s; + } else { + return (java.lang.String) ref; } - internalGetMutableLabels().getMutableMap().remove(key); - return this; - } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map getMutableLabels() { - bitField0_ |= 0x00000010; - return internalGetMutableLabels().getMutableMap(); } /** * * *
-     * Labels with user-defined metadata.
-     * This field may contain up to 64 entries. Label keys and values may be no
-     * longer than 63 characters. Label keys must begin with a lowercase letter
-     * and may only contain lowercase letters, numeric characters, underscores,
-     * and dashes.
+     * The Cloud KMS resource name of the customer managed encryption key that's
+     * used to encrypt the contents of the Repository. Has the form:
+     * `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`.
+     * This value may not be changed after the Repository has been created.
      * 
* - * map<string, string> labels = 4; + * string kms_key_name = 8; + * + * @return The bytes for kmsKeyName. */ - public Builder putLabels(java.lang.String key, java.lang.String value) { - if (key == null) { - throw new NullPointerException("map key"); - } - if (value == null) { - throw new NullPointerException("map value"); + public com.google.protobuf.ByteString getKmsKeyNameBytes() { + java.lang.Object ref = kmsKeyName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kmsKeyName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; } - internalGetMutableLabels().getMutableMap().put(key, value); - bitField0_ |= 0x00000010; - return this; } /** * * *
-     * Labels with user-defined metadata.
-     * This field may contain up to 64 entries. Label keys and values may be no
-     * longer than 63 characters. Label keys must begin with a lowercase letter
-     * and may only contain lowercase letters, numeric characters, underscores,
-     * and dashes.
+     * The Cloud KMS resource name of the customer managed encryption key that's
+     * used to encrypt the contents of the Repository. Has the form:
+     * `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`.
+     * This value may not be changed after the Repository has been created.
      * 
* - * map<string, string> labels = 4; + * string kms_key_name = 8; + * + * @param value The kmsKeyName to set. + * @return This builder for chaining. */ - public Builder putAllLabels(java.util.Map values) { - internalGetMutableLabels().getMutableMap().putAll(values); - bitField0_ |= 0x00000010; + public Builder setKmsKeyName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + kmsKeyName_ = value; + bitField0_ |= 0x00000400; + 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_; /** * * *
-     * The time when the repository was created.
+     * The Cloud KMS resource name of the customer managed encryption key that's
+     * used to encrypt the contents of the Repository. Has the form:
+     * `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`.
+     * This value may not be changed after the Repository has been created.
      * 
* - * .google.protobuf.Timestamp create_time = 5; + * string kms_key_name = 8; * - * @return Whether the createTime field is set. + * @return This builder for chaining. */ - public boolean hasCreateTime() { - return ((bitField0_ & 0x00000020) != 0); + public Builder clearKmsKeyName() { + kmsKeyName_ = getDefaultInstance().getKmsKeyName(); + bitField0_ = (bitField0_ & ~0x00000400); + onChanged(); + return this; } /** * * *
-     * The time when the repository was created.
+     * The Cloud KMS resource name of the customer managed encryption key that's
+     * used to encrypt the contents of the Repository. Has the form:
+     * `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`.
+     * This value may not be changed after the Repository has been created.
      * 
* - * .google.protobuf.Timestamp create_time = 5; + * string kms_key_name = 8; * - * @return The createTime. + * @param value The bytes for kmsKeyName to set. + * @return This builder for chaining. */ - public com.google.protobuf.Timestamp getCreateTime() { - if (createTimeBuilder_ == null) { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; - } else { - return createTimeBuilder_.getMessage(); + public Builder setKmsKeyNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); } + checkByteStringIsUtf8(value); + kmsKeyName_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; } + + private int mode_ = 0; /** * * *
-     * The time when the repository was created.
+     * Optional. The mode of the repository.
      * 
* - * .google.protobuf.Timestamp create_time = 5; + * + * .google.devtools.artifactregistry.v1.Repository.Mode mode = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for mode. */ - 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; + @java.lang.Override + public int getModeValue() { + return mode_; } /** * * *
-     * The time when the repository was created.
+     * Optional. The mode of the repository.
      * 
* - * .google.protobuf.Timestamp create_time = 5; + * + * .google.devtools.artifactregistry.v1.Repository.Mode mode = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for mode to set. + * @return This builder for chaining. */ - public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (createTimeBuilder_ == null) { - createTime_ = builderForValue.build(); - } else { - createTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000020; + public Builder setModeValue(int value) { + mode_ = value; + bitField0_ |= 0x00000800; onChanged(); return this; } @@ -3227,43 +6000,43 @@ public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForVal * * *
-     * The time when the repository was created.
+     * Optional. The mode of the repository.
      * 
* - * .google.protobuf.Timestamp create_time = 5; + * + * .google.devtools.artifactregistry.v1.Repository.Mode mode = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The mode. */ - 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; + @java.lang.Override + public com.google.devtools.artifactregistry.v1.Repository.Mode getMode() { + com.google.devtools.artifactregistry.v1.Repository.Mode result = + com.google.devtools.artifactregistry.v1.Repository.Mode.forNumber(mode_); + return result == null + ? com.google.devtools.artifactregistry.v1.Repository.Mode.UNRECOGNIZED + : result; } /** * * *
-     * The time when the repository was created.
+     * Optional. The mode of the repository.
      * 
* - * .google.protobuf.Timestamp create_time = 5; + * + * .google.devtools.artifactregistry.v1.Repository.Mode mode = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The mode to set. + * @return This builder for chaining. */ - public Builder clearCreateTime() { - bitField0_ = (bitField0_ & ~0x00000020); - createTime_ = null; - if (createTimeBuilder_ != null) { - createTimeBuilder_.dispose(); - createTimeBuilder_ = null; + public Builder setMode(com.google.devtools.artifactregistry.v1.Repository.Mode value) { + if (value == null) { + throw new NullPointerException(); } + bitField0_ |= 0x00000800; + mode_ = value.getNumber(); onChanged(); return this; } @@ -3271,335 +6044,384 @@ public Builder clearCreateTime() { * * *
-     * The time when the repository was created.
+     * Optional. The mode of the repository.
      * 
* - * .google.protobuf.Timestamp create_time = 5; + * + * .google.devtools.artifactregistry.v1.Repository.Mode mode = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - bitField0_ |= 0x00000020; + public Builder clearMode() { + bitField0_ = (bitField0_ & ~0x00000800); + mode_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, com.google.devtools.artifactregistry.v1.CleanupPolicy> + cleanupPolicies_; + + private com.google.protobuf.MapField< + java.lang.String, com.google.devtools.artifactregistry.v1.CleanupPolicy> + internalGetCleanupPolicies() { + if (cleanupPolicies_ == null) { + return com.google.protobuf.MapField.emptyMapField( + CleanupPoliciesDefaultEntryHolder.defaultEntry); + } + return cleanupPolicies_; + } + + private com.google.protobuf.MapField< + java.lang.String, com.google.devtools.artifactregistry.v1.CleanupPolicy> + internalGetMutableCleanupPolicies() { + if (cleanupPolicies_ == null) { + cleanupPolicies_ = + com.google.protobuf.MapField.newMapField( + CleanupPoliciesDefaultEntryHolder.defaultEntry); + } + if (!cleanupPolicies_.isMutable()) { + cleanupPolicies_ = cleanupPolicies_.copy(); + } + bitField0_ |= 0x00001000; onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); + return cleanupPolicies_; + } + + public int getCleanupPoliciesCount() { + return internalGetCleanupPolicies().getMap().size(); } /** * * *
-     * The time when the repository was created.
+     * Optional. Cleanup policies for this repository. Cleanup policies indicate
+     * when certain package versions can be automatically deleted. Map keys are
+     * policy IDs supplied by users during policy creation. They must unique
+     * within a repository and be under 128 characters in length.
      * 
* - * .google.protobuf.Timestamp create_time = 5; + * + * map<string, .google.devtools.artifactregistry.v1.CleanupPolicy> cleanup_policies = 12 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - if (createTimeBuilder_ != null) { - return createTimeBuilder_.getMessageOrBuilder(); - } else { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; + @java.lang.Override + public boolean containsCleanupPolicies(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); } + return internalGetCleanupPolicies().getMap().containsKey(key); + } + /** Use {@link #getCleanupPoliciesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map + getCleanupPolicies() { + return getCleanupPoliciesMap(); } /** * * *
-     * The time when the repository was created.
+     * Optional. Cleanup policies for this repository. Cleanup policies indicate
+     * when certain package versions can be automatically deleted. Map keys are
+     * policy IDs supplied by users during policy creation. They must unique
+     * within a repository and be under 128 characters in length.
      * 
* - * .google.protobuf.Timestamp create_time = 5; + * + * map<string, .google.devtools.artifactregistry.v1.CleanupPolicy> cleanup_policies = 12 [(.google.api.field_behavior) = OPTIONAL]; + * */ - 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_; + @java.lang.Override + public java.util.Map + getCleanupPoliciesMap() { + return internalGetCleanupPolicies().getMap(); } - - 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_; /** * * *
-     * The time when the repository was last updated.
+     * Optional. Cleanup policies for this repository. Cleanup policies indicate
+     * when certain package versions can be automatically deleted. Map keys are
+     * policy IDs supplied by users during policy creation. They must unique
+     * within a repository and be under 128 characters in length.
      * 
* - * .google.protobuf.Timestamp update_time = 6; - * - * @return Whether the updateTime field is set. + * + * map<string, .google.devtools.artifactregistry.v1.CleanupPolicy> cleanup_policies = 12 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public boolean hasUpdateTime() { - return ((bitField0_ & 0x00000040) != 0); + @java.lang.Override + public /* nullable */ com.google.devtools.artifactregistry.v1.CleanupPolicy + getCleanupPoliciesOrDefault( + java.lang.String key, + /* nullable */ + com.google.devtools.artifactregistry.v1.CleanupPolicy defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetCleanupPolicies().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; } /** * * *
-     * The time when the repository was last updated.
+     * Optional. Cleanup policies for this repository. Cleanup policies indicate
+     * when certain package versions can be automatically deleted. Map keys are
+     * policy IDs supplied by users during policy creation. They must unique
+     * within a repository and be under 128 characters in length.
      * 
* - * .google.protobuf.Timestamp update_time = 6; - * - * @return The updateTime. + * + * map<string, .google.devtools.artifactregistry.v1.CleanupPolicy> cleanup_policies = 12 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public com.google.protobuf.Timestamp getUpdateTime() { - if (updateTimeBuilder_ == null) { - return updateTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : updateTime_; - } else { - return updateTimeBuilder_.getMessage(); + @java.lang.Override + public com.google.devtools.artifactregistry.v1.CleanupPolicy getCleanupPoliciesOrThrow( + java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetCleanupPolicies().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); } + return map.get(key); + } + + public Builder clearCleanupPolicies() { + bitField0_ = (bitField0_ & ~0x00001000); + internalGetMutableCleanupPolicies().getMutableMap().clear(); + return this; } /** * * *
-     * The time when the repository was last updated.
+     * Optional. Cleanup policies for this repository. Cleanup policies indicate
+     * when certain package versions can be automatically deleted. Map keys are
+     * policy IDs supplied by users during policy creation. They must unique
+     * within a repository and be under 128 characters in length.
      * 
* - * .google.protobuf.Timestamp update_time = 6; + * + * map<string, .google.devtools.artifactregistry.v1.CleanupPolicy> cleanup_policies = 12 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public Builder setUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateTime_ = value; - } else { - updateTimeBuilder_.setMessage(value); + public Builder removeCleanupPolicies(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); } - bitField0_ |= 0x00000040; - onChanged(); + internalGetMutableCleanupPolicies().getMutableMap().remove(key); return this; } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map + getMutableCleanupPolicies() { + bitField0_ |= 0x00001000; + return internalGetMutableCleanupPolicies().getMutableMap(); + } /** * * *
-     * The time when the repository was last updated.
+     * Optional. Cleanup policies for this repository. Cleanup policies indicate
+     * when certain package versions can be automatically deleted. Map keys are
+     * policy IDs supplied by users during policy creation. They must unique
+     * within a repository and be under 128 characters in length.
      * 
* - * .google.protobuf.Timestamp update_time = 6; + * + * map<string, .google.devtools.artifactregistry.v1.CleanupPolicy> cleanup_policies = 12 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (updateTimeBuilder_ == null) { - updateTime_ = builderForValue.build(); - } else { - updateTimeBuilder_.setMessage(builderForValue.build()); + public Builder putCleanupPolicies( + java.lang.String key, com.google.devtools.artifactregistry.v1.CleanupPolicy value) { + if (key == null) { + throw new NullPointerException("map key"); } - bitField0_ |= 0x00000040; - onChanged(); + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableCleanupPolicies().getMutableMap().put(key, value); + bitField0_ |= 0x00001000; return this; } /** * * *
-     * The time when the repository was last updated.
+     * Optional. Cleanup policies for this repository. Cleanup policies indicate
+     * when certain package versions can be automatically deleted. Map keys are
+     * policy IDs supplied by users during policy creation. They must unique
+     * within a repository and be under 128 characters in length.
      * 
* - * .google.protobuf.Timestamp update_time = 6; + * + * map<string, .google.devtools.artifactregistry.v1.CleanupPolicy> cleanup_policies = 12 [(.google.api.field_behavior) = OPTIONAL]; + * */ - 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(); + public Builder putAllCleanupPolicies( + java.util.Map + values) { + internalGetMutableCleanupPolicies().getMutableMap().putAll(values); + bitField0_ |= 0x00001000; return this; } + + private long sizeBytes_; /** * * *
-     * The time when the repository was last updated.
+     * Output only. The size, in bytes, of all artifact storage in this
+     * repository. Repositories that are generally available or in public preview
+     *  use this to calculate storage costs.
      * 
* - * .google.protobuf.Timestamp update_time = 6; + * int64 size_bytes = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The sizeBytes. */ - public Builder clearUpdateTime() { - bitField0_ = (bitField0_ & ~0x00000040); - updateTime_ = null; - if (updateTimeBuilder_ != null) { - updateTimeBuilder_.dispose(); - updateTimeBuilder_ = null; - } - onChanged(); - return this; + @java.lang.Override + public long getSizeBytes() { + return sizeBytes_; } /** * * *
-     * The time when the repository was last updated.
+     * Output only. The size, in bytes, of all artifact storage in this
+     * repository. Repositories that are generally available or in public preview
+     *  use this to calculate storage costs.
      * 
* - * .google.protobuf.Timestamp update_time = 6; + * int64 size_bytes = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The sizeBytes to set. + * @return This builder for chaining. */ - public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { - bitField0_ |= 0x00000040; + public Builder setSizeBytes(long value) { + + sizeBytes_ = value; + bitField0_ |= 0x00002000; onChanged(); - return getUpdateTimeFieldBuilder().getBuilder(); + return this; } /** * * *
-     * The time when the repository was last updated.
+     * Output only. The size, in bytes, of all artifact storage in this
+     * repository. Repositories that are generally available or in public preview
+     *  use this to calculate storage costs.
      * 
* - * .google.protobuf.Timestamp update_time = 6; + * int64 size_bytes = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. */ - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - if (updateTimeBuilder_ != null) { - return updateTimeBuilder_.getMessageOrBuilder(); - } else { - return updateTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : updateTime_; - } + public Builder clearSizeBytes() { + bitField0_ = (bitField0_ & ~0x00002000); + sizeBytes_ = 0L; + onChanged(); + return this; } + + private boolean satisfiesPzs_; /** * * *
-     * The time when the repository was last updated.
+     * Output only. If set, the repository satisfies physical zone separation.
      * 
* - * .google.protobuf.Timestamp update_time = 6; + * bool satisfies_pzs = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The satisfiesPzs. */ - 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 boolean getSatisfiesPzs() { + return satisfiesPzs_; } - - private java.lang.Object kmsKeyName_ = ""; /** * * *
-     * The Cloud KMS resource name of the customer managed encryption key that's
-     * used to encrypt the contents of the Repository. Has the form:
-     * `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`.
-     * This value may not be changed after the Repository has been created.
+     * Output only. If set, the repository satisfies physical zone separation.
      * 
* - * string kms_key_name = 8; + * bool satisfies_pzs = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; * - * @return The kmsKeyName. + * @param value The satisfiesPzs to set. + * @return This builder for chaining. */ - public java.lang.String getKmsKeyName() { - java.lang.Object ref = kmsKeyName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - kmsKeyName_ = s; - return s; - } else { - return (java.lang.String) ref; - } + public Builder setSatisfiesPzs(boolean value) { + + satisfiesPzs_ = value; + bitField0_ |= 0x00004000; + onChanged(); + return this; } /** * * *
-     * The Cloud KMS resource name of the customer managed encryption key that's
-     * used to encrypt the contents of the Repository. Has the form:
-     * `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`.
-     * This value may not be changed after the Repository has been created.
+     * Output only. If set, the repository satisfies physical zone separation.
      * 
* - * string kms_key_name = 8; + * bool satisfies_pzs = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; * - * @return The bytes for kmsKeyName. + * @return This builder for chaining. */ - public com.google.protobuf.ByteString getKmsKeyNameBytes() { - java.lang.Object ref = kmsKeyName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - kmsKeyName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public Builder clearSatisfiesPzs() { + bitField0_ = (bitField0_ & ~0x00004000); + satisfiesPzs_ = false; + onChanged(); + return this; } + + private boolean cleanupPolicyDryRun_; /** * * *
-     * The Cloud KMS resource name of the customer managed encryption key that's
-     * used to encrypt the contents of the Repository. Has the form:
-     * `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`.
-     * This value may not be changed after the Repository has been created.
+     * Optional. If true, the cleanup pipeline is prevented from deleting versions
+     * in this repository.
      * 
* - * string kms_key_name = 8; + * bool cleanup_policy_dry_run = 18 [(.google.api.field_behavior) = OPTIONAL]; * - * @param value The kmsKeyName to set. - * @return This builder for chaining. + * @return The cleanupPolicyDryRun. */ - public Builder setKmsKeyName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - kmsKeyName_ = value; - bitField0_ |= 0x00000080; - onChanged(); - return this; + @java.lang.Override + public boolean getCleanupPolicyDryRun() { + return cleanupPolicyDryRun_; } /** * * *
-     * The Cloud KMS resource name of the customer managed encryption key that's
-     * used to encrypt the contents of the Repository. Has the form:
-     * `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`.
-     * This value may not be changed after the Repository has been created.
+     * Optional. If true, the cleanup pipeline is prevented from deleting versions
+     * in this repository.
      * 
* - * string kms_key_name = 8; + * bool cleanup_policy_dry_run = 18 [(.google.api.field_behavior) = OPTIONAL]; * + * @param value The cleanupPolicyDryRun to set. * @return This builder for chaining. */ - public Builder clearKmsKeyName() { - kmsKeyName_ = getDefaultInstance().getKmsKeyName(); - bitField0_ = (bitField0_ & ~0x00000080); + public Builder setCleanupPolicyDryRun(boolean value) { + + cleanupPolicyDryRun_ = value; + bitField0_ |= 0x00008000; onChanged(); return this; } @@ -3607,24 +6429,17 @@ public Builder clearKmsKeyName() { * * *
-     * The Cloud KMS resource name of the customer managed encryption key that's
-     * used to encrypt the contents of the Repository. Has the form:
-     * `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`.
-     * This value may not be changed after the Repository has been created.
+     * Optional. If true, the cleanup pipeline is prevented from deleting versions
+     * in this repository.
      * 
* - * string kms_key_name = 8; + * bool cleanup_policy_dry_run = 18 [(.google.api.field_behavior) = OPTIONAL]; * - * @param value The bytes for kmsKeyName to set. * @return This builder for chaining. */ - public Builder setKmsKeyNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - kmsKeyName_ = value; - bitField0_ |= 0x00000080; + public Builder clearCleanupPolicyDryRun() { + bitField0_ = (bitField0_ & ~0x00008000); + cleanupPolicyDryRun_ = false; onChanged(); return this; } diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/RepositoryOrBuilder.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/RepositoryOrBuilder.java index 16f8df65d9ec..5388ae41e9ef 100644 --- a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/RepositoryOrBuilder.java +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/RepositoryOrBuilder.java @@ -65,12 +65,141 @@ public interface RepositoryOrBuilder com.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfigOrBuilder getMavenConfigOrBuilder(); + /** + * + * + *
+   * Docker repository config contains repository level configuration
+   * for the repositories of docker type.
+   * 
+ * + * + * .google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig docker_config = 17; + * + * + * @return Whether the dockerConfig field is set. + */ + boolean hasDockerConfig(); + /** + * + * + *
+   * Docker repository config contains repository level configuration
+   * for the repositories of docker type.
+   * 
+ * + * + * .google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig docker_config = 17; + * + * + * @return The dockerConfig. + */ + com.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig getDockerConfig(); + /** + * + * + *
+   * Docker repository config contains repository level configuration
+   * for the repositories of docker type.
+   * 
+ * + * + * .google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig docker_config = 17; + * + */ + com.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfigOrBuilder + getDockerConfigOrBuilder(); + + /** + * + * + *
+   * Configuration specific for a Virtual Repository.
+   * 
+ * + * + * .google.devtools.artifactregistry.v1.VirtualRepositoryConfig virtual_repository_config = 14; + * + * + * @return Whether the virtualRepositoryConfig field is set. + */ + boolean hasVirtualRepositoryConfig(); + /** + * + * + *
+   * Configuration specific for a Virtual Repository.
+   * 
+ * + * + * .google.devtools.artifactregistry.v1.VirtualRepositoryConfig virtual_repository_config = 14; + * + * + * @return The virtualRepositoryConfig. + */ + com.google.devtools.artifactregistry.v1.VirtualRepositoryConfig getVirtualRepositoryConfig(); + /** + * + * + *
+   * Configuration specific for a Virtual Repository.
+   * 
+ * + * + * .google.devtools.artifactregistry.v1.VirtualRepositoryConfig virtual_repository_config = 14; + * + */ + com.google.devtools.artifactregistry.v1.VirtualRepositoryConfigOrBuilder + getVirtualRepositoryConfigOrBuilder(); + + /** + * + * + *
+   * Configuration specific for a Remote Repository.
+   * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig remote_repository_config = 15; + * + * + * @return Whether the remoteRepositoryConfig field is set. + */ + boolean hasRemoteRepositoryConfig(); + /** + * + * + *
+   * Configuration specific for a Remote Repository.
+   * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig remote_repository_config = 15; + * + * + * @return The remoteRepositoryConfig. + */ + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig getRemoteRepositoryConfig(); + /** + * + * + *
+   * Configuration specific for a Remote Repository.
+   * 
+ * + * + * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig remote_repository_config = 15; + * + */ + com.google.devtools.artifactregistry.v1.RemoteRepositoryConfigOrBuilder + getRemoteRepositoryConfigOrBuilder(); + /** * * *
    * The name of the repository, for example:
-   * "projects/p1/locations/us-central1/repositories/repo1".
+   * `projects/p1/locations/us-central1/repositories/repo1`.
    * 
* * string name = 1; @@ -83,7 +212,7 @@ public interface RepositoryOrBuilder * *
    * The name of the repository, for example:
-   * "projects/p1/locations/us-central1/repositories/repo1".
+   * `projects/p1/locations/us-central1/repositories/repo1`.
    * 
* * string name = 1; @@ -96,10 +225,12 @@ public interface RepositoryOrBuilder * * *
-   * The format of packages that are stored in the repository.
+   * Optional. The format of packages that are stored in the repository.
    * 
* - * .google.devtools.artifactregistry.v1.Repository.Format format = 2; + * + * .google.devtools.artifactregistry.v1.Repository.Format format = 2 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The enum numeric value on the wire for format. */ @@ -108,10 +239,12 @@ public interface RepositoryOrBuilder * * *
-   * The format of packages that are stored in the repository.
+   * Optional. The format of packages that are stored in the repository.
    * 
* - * .google.devtools.artifactregistry.v1.Repository.Format format = 2; + * + * .google.devtools.artifactregistry.v1.Repository.Format format = 2 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The format. */ @@ -224,10 +357,11 @@ java.lang.String getLabelsOrDefault( * * *
-   * The time when the repository was created.
+   * Output only. The time when the repository 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. */ @@ -236,10 +370,11 @@ java.lang.String getLabelsOrDefault( * * *
-   * The time when the repository was created.
+   * Output only. The time when the repository was created.
    * 
* - * .google.protobuf.Timestamp create_time = 5; + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @return The createTime. */ @@ -248,10 +383,11 @@ java.lang.String getLabelsOrDefault( * * *
-   * The time when the repository was created.
+   * Output only. The time when the repository 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(); @@ -259,10 +395,11 @@ java.lang.String getLabelsOrDefault( * * *
-   * The time when the repository was last updated.
+   * Output only. The time when the repository 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. */ @@ -271,10 +408,11 @@ java.lang.String getLabelsOrDefault( * * *
-   * The time when the repository was last updated.
+   * Output only. The time when the repository was last updated.
    * 
* - * .google.protobuf.Timestamp update_time = 6; + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @return The updateTime. */ @@ -283,10 +421,11 @@ java.lang.String getLabelsOrDefault( * * *
-   * The time when the repository was last updated.
+   * Output only. The time when the repository 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(); @@ -321,5 +460,164 @@ java.lang.String getLabelsOrDefault( */ com.google.protobuf.ByteString getKmsKeyNameBytes(); + /** + * + * + *
+   * Optional. The mode of the repository.
+   * 
+ * + * + * .google.devtools.artifactregistry.v1.Repository.Mode mode = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for mode. + */ + int getModeValue(); + /** + * + * + *
+   * Optional. The mode of the repository.
+   * 
+ * + * + * .google.devtools.artifactregistry.v1.Repository.Mode mode = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The mode. + */ + com.google.devtools.artifactregistry.v1.Repository.Mode getMode(); + + /** + * + * + *
+   * Optional. Cleanup policies for this repository. Cleanup policies indicate
+   * when certain package versions can be automatically deleted. Map keys are
+   * policy IDs supplied by users during policy creation. They must unique
+   * within a repository and be under 128 characters in length.
+   * 
+ * + * + * map<string, .google.devtools.artifactregistry.v1.CleanupPolicy> cleanup_policies = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getCleanupPoliciesCount(); + /** + * + * + *
+   * Optional. Cleanup policies for this repository. Cleanup policies indicate
+   * when certain package versions can be automatically deleted. Map keys are
+   * policy IDs supplied by users during policy creation. They must unique
+   * within a repository and be under 128 characters in length.
+   * 
+ * + * + * map<string, .google.devtools.artifactregistry.v1.CleanupPolicy> cleanup_policies = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + boolean containsCleanupPolicies(java.lang.String key); + /** Use {@link #getCleanupPoliciesMap()} instead. */ + @java.lang.Deprecated + java.util.Map + getCleanupPolicies(); + /** + * + * + *
+   * Optional. Cleanup policies for this repository. Cleanup policies indicate
+   * when certain package versions can be automatically deleted. Map keys are
+   * policy IDs supplied by users during policy creation. They must unique
+   * within a repository and be under 128 characters in length.
+   * 
+ * + * + * map<string, .google.devtools.artifactregistry.v1.CleanupPolicy> cleanup_policies = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.Map + getCleanupPoliciesMap(); + /** + * + * + *
+   * Optional. Cleanup policies for this repository. Cleanup policies indicate
+   * when certain package versions can be automatically deleted. Map keys are
+   * policy IDs supplied by users during policy creation. They must unique
+   * within a repository and be under 128 characters in length.
+   * 
+ * + * + * map<string, .google.devtools.artifactregistry.v1.CleanupPolicy> cleanup_policies = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + /* nullable */ + com.google.devtools.artifactregistry.v1.CleanupPolicy getCleanupPoliciesOrDefault( + java.lang.String key, + /* nullable */ + com.google.devtools.artifactregistry.v1.CleanupPolicy defaultValue); + /** + * + * + *
+   * Optional. Cleanup policies for this repository. Cleanup policies indicate
+   * when certain package versions can be automatically deleted. Map keys are
+   * policy IDs supplied by users during policy creation. They must unique
+   * within a repository and be under 128 characters in length.
+   * 
+ * + * + * map<string, .google.devtools.artifactregistry.v1.CleanupPolicy> cleanup_policies = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.devtools.artifactregistry.v1.CleanupPolicy getCleanupPoliciesOrThrow( + java.lang.String key); + + /** + * + * + *
+   * Output only. The size, in bytes, of all artifact storage in this
+   * repository. Repositories that are generally available or in public preview
+   *  use this to calculate storage costs.
+   * 
+ * + * int64 size_bytes = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The sizeBytes. + */ + long getSizeBytes(); + + /** + * + * + *
+   * Output only. If set, the repository satisfies physical zone separation.
+   * 
+ * + * bool satisfies_pzs = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The satisfiesPzs. + */ + boolean getSatisfiesPzs(); + + /** + * + * + *
+   * Optional. If true, the cleanup pipeline is prevented from deleting versions
+   * in this repository.
+   * 
+ * + * bool cleanup_policy_dry_run = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The cleanupPolicyDryRun. + */ + boolean getCleanupPolicyDryRun(); + com.google.devtools.artifactregistry.v1.Repository.FormatConfigCase getFormatConfigCase(); + + com.google.devtools.artifactregistry.v1.Repository.ModeConfigCase getModeConfigCase(); } diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/RepositoryProto.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/RepositoryProto.java index 2a3f01bfc35a..540f395a19a2 100644 --- a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/RepositoryProto.java +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/RepositoryProto.java @@ -27,6 +27,70 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devtools_artifactregistry_v1_UpstreamPolicy_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_devtools_artifactregistry_v1_UpstreamPolicy_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devtools_artifactregistry_v1_CleanupPolicyCondition_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_devtools_artifactregistry_v1_CleanupPolicyCondition_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devtools_artifactregistry_v1_CleanupPolicyMostRecentVersions_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_devtools_artifactregistry_v1_CleanupPolicyMostRecentVersions_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devtools_artifactregistry_v1_CleanupPolicy_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_devtools_artifactregistry_v1_CleanupPolicy_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devtools_artifactregistry_v1_VirtualRepositoryConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_devtools_artifactregistry_v1_VirtualRepositoryConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_UpstreamCredentials_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_UpstreamCredentials_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_UpstreamCredentials_UsernamePasswordCredentials_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_UpstreamCredentials_UsernamePasswordCredentials_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_DockerRepository_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_DockerRepository_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_MavenRepository_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_MavenRepository_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_NpmRepository_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_NpmRepository_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_PythonRepository_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_PythonRepository_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_AptRepository_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_AptRepository_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_AptRepository_PublicRepository_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_AptRepository_PublicRepository_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_YumRepository_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_YumRepository_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_YumRepository_PublicRepository_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_YumRepository_PublicRepository_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_devtools_artifactregistry_v1_Repository_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -35,10 +99,18 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_devtools_artifactregistry_v1_Repository_MavenRepositoryConfig_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_devtools_artifactregistry_v1_Repository_MavenRepositoryConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devtools_artifactregistry_v1_Repository_DockerRepositoryConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_devtools_artifactregistry_v1_Repository_DockerRepositoryConfig_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_devtools_artifactregistry_v1_Repository_LabelsEntry_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_devtools_artifactregistry_v1_Repository_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devtools_artifactregistry_v1_Repository_CleanupPoliciesEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_devtools_artifactregistry_v1_Repository_CleanupPoliciesEntry_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_devtools_artifactregistry_v1_ListRepositoriesRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -75,59 +147,184 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "\n4google/devtools/artifactregistry/v1/re" + "pository.proto\022#google.devtools.artifact" + "registry.v1\032\037google/api/field_behavior.p" - + "roto\032\031google/api/resource.proto\032 google/" - + "protobuf/field_mask.proto\032\037google/protob" - + "uf/timestamp.proto\"\245\007\n\nRepository\022]\n\014mav" - + "en_config\030\t \001(\0132E.google.devtools.artifa" - + "ctregistry.v1.Repository.MavenRepository" - + "ConfigH\000\022\014\n\004name\030\001 \001(\t\022F\n\006format\030\002 \001(\01626" - + ".google.devtools.artifactregistry.v1.Rep" - + "ository.Format\022\023\n\013description\030\003 \001(\t\022K\n\006l" - + "abels\030\004 \003(\0132;.google.devtools.artifactre" - + "gistry.v1.Repository.LabelsEntry\022/\n\013crea" - + "te_time\030\005 \001(\0132\032.google.protobuf.Timestam" - + "p\022/\n\013update_time\030\006 \001(\0132\032.google.protobuf" - + ".Timestamp\022\024\n\014kms_key_name\030\010 \001(\t\032\363\001\n\025Mav" - + "enRepositoryConfig\022!\n\031allow_snapshot_ove" - + "rwrites\030\001 \001(\010\022k\n\016version_policy\030\002 \001(\0162S." - + "google.devtools.artifactregistry.v1.Repo" - + "sitory.MavenRepositoryConfig.VersionPoli" - + "cy\"J\n\rVersionPolicy\022\036\n\032VERSION_POLICY_UN" - + "SPECIFIED\020\000\022\013\n\007RELEASE\020\001\022\014\n\010SNAPSHOT\020\002\032-" - + "\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(" - + "\t:\0028\001\"^\n\006Format\022\026\n\022FORMAT_UNSPECIFIED\020\000\022" - + "\n\n\006DOCKER\020\001\022\t\n\005MAVEN\020\002\022\007\n\003NPM\020\003\022\007\n\003APT\020\005" - + "\022\007\n\003YUM\020\006\022\n\n\006PYTHON\020\010:r\352Ao\n*artifactregi" - + "stry.googleapis.com/Repository\022Aprojects" - + "/{project}/locations/{location}/reposito" - + "ries/{repository}B\017\n\rformat_config\"\205\001\n\027L" - + "istRepositoriesRequest\022C\n\006parent\030\001 \001(\tB3" - + "\342A\001\002\372A,\022*artifactregistry.googleapis.com" - + "/Repository\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_t" - + "oken\030\003 \001(\t\"z\n\030ListRepositoriesResponse\022E" - + "\n\014repositories\030\001 \003(\0132/.google.devtools.a" - + "rtifactregistry.v1.Repository\022\027\n\017next_pa" - + "ge_token\030\002 \001(\t\"Y\n\024GetRepositoryRequest\022A" - + "\n\004name\030\001 \001(\tB3\342A\001\002\372A,\n*artifactregistry." - + "googleapis.com/Repository\"\306\001\n\027CreateRepo" - + "sitoryRequest\022C\n\006parent\030\001 \001(\tB3\342A\001\002\372A,\022*" - + "artifactregistry.googleapis.com/Reposito" - + "ry\022\033\n\rrepository_id\030\002 \001(\tB\004\342A\001\002\022I\n\nrepos" - + "itory\030\003 \001(\0132/.google.devtools.artifactre" - + "gistry.v1.RepositoryB\004\342A\001\002\"\217\001\n\027UpdateRep" - + "ositoryRequest\022C\n\nrepository\030\001 \001(\0132/.goo" - + "gle.devtools.artifactregistry.v1.Reposit" - + "ory\022/\n\013update_mask\030\002 \001(\0132\032.google.protob" - + "uf.FieldMask\"\\\n\027DeleteRepositoryRequest\022" + + "roto\032\031google/api/resource.proto\032\036google/" + + "protobuf/duration.proto\032 google/protobuf" + + "/field_mask.proto\032\037google/protobuf/times" + + "tamp.proto\"s\n\016UpstreamPolicy\022\n\n\002id\030\001 \001(\t" + + "\022C\n\nrepository\030\002 \001(\tB/\372A,\n*artifactregis" + + "try.googleapis.com/Repository\022\020\n\010priorit" + + "y\030\003 \001(\005\"\250\003\n\026CleanupPolicyCondition\022\\\n\tta" + + "g_state\030\002 \001(\0162D.google.devtools.artifact" + + "registry.v1.CleanupPolicyCondition.TagSt" + + "ateH\000\210\001\001\022\024\n\014tag_prefixes\030\003 \003(\t\022\035\n\025versio" + + "n_name_prefixes\030\004 \003(\t\022\035\n\025package_name_pr" + + "efixes\030\005 \003(\t\0222\n\nolder_than\030\006 \001(\0132\031.googl" + + "e.protobuf.DurationH\001\210\001\001\0222\n\nnewer_than\030\007" + + " \001(\0132\031.google.protobuf.DurationH\002\210\001\001\"H\n\010" + + "TagState\022\031\n\025TAG_STATE_UNSPECIFIED\020\000\022\n\n\006T" + + "AGGED\020\001\022\014\n\010UNTAGGED\020\002\022\007\n\003ANY\020\003B\014\n\n_tag_s" + + "tateB\r\n\013_older_thanB\r\n\013_newer_than\"h\n\037Cl" + + "eanupPolicyMostRecentVersions\022\035\n\025package" + + "_name_prefixes\030\001 \003(\t\022\027\n\nkeep_count\030\002 \001(\005" + + "H\000\210\001\001B\r\n\013_keep_count\"\350\002\n\rCleanupPolicy\022P" + + "\n\tcondition\030\002 \001(\0132;.google.devtools.arti" + + "factregistry.v1.CleanupPolicyConditionH\000" + + "\022d\n\024most_recent_versions\030\004 \001(\0132D.google." + + "devtools.artifactregistry.v1.CleanupPoli" + + "cyMostRecentVersionsH\000\022\n\n\002id\030\001 \001(\t\022I\n\006ac" + + "tion\030\003 \001(\01629.google.devtools.artifactreg" + + "istry.v1.CleanupPolicy.Action\"6\n\006Action\022" + + "\026\n\022ACTION_UNSPECIFIED\020\000\022\n\n\006DELETE\020\001\022\010\n\004K" + + "EEP\020\002B\020\n\016condition_type\"i\n\027VirtualReposi" + + "toryConfig\022N\n\021upstream_policies\030\001 \003(\01323." + + "google.devtools.artifactregistry.v1.Upst" + + "reamPolicy\"\316\026\n\026RemoteRepositoryConfig\022i\n" + + "\021docker_repository\030\002 \001(\0132L.google.devtoo" + + "ls.artifactregistry.v1.RemoteRepositoryC" + + "onfig.DockerRepositoryH\000\022g\n\020maven_reposi" + + "tory\030\003 \001(\0132K.google.devtools.artifactreg" + + "istry.v1.RemoteRepositoryConfig.MavenRep" + + "ositoryH\000\022c\n\016npm_repository\030\004 \001(\0132I.goog" + + "le.devtools.artifactregistry.v1.RemoteRe" + + "positoryConfig.NpmRepositoryH\000\022i\n\021python" + + "_repository\030\005 \001(\0132L.google.devtools.arti" + + "factregistry.v1.RemoteRepositoryConfig.P" + + "ythonRepositoryH\000\022c\n\016apt_repository\030\006 \001(" + + "\0132I.google.devtools.artifactregistry.v1." + + "RemoteRepositoryConfig.AptRepositoryH\000\022c" + + "\n\016yum_repository\030\007 \001(\0132I.google.devtools" + + ".artifactregistry.v1.RemoteRepositoryCon" + + "fig.YumRepositoryH\000\022\023\n\013description\030\001 \001(\t" + + "\022s\n\024upstream_credentials\030\t \001(\0132O.google." + + "devtools.artifactregistry.v1.RemoteRepos" + + "itoryConfig.UpstreamCredentialsB\004\342A\001\001\032\277\002" + + "\n\023UpstreamCredentials\022\224\001\n\035username_passw" + + "ord_credentials\030\001 \001(\0132k.google.devtools." + + "artifactregistry.v1.RemoteRepositoryConf" + + "ig.UpstreamCredentials.UsernamePasswordC" + + "redentialsH\000\032\201\001\n\033UsernamePasswordCredent" + + "ials\022\020\n\010username\030\001 \001(\t\022P\n\027password_secre" + + "t_version\030\002 \001(\tB/\372A,\n*secretmanager.goog" + + "leapis.com/SecretVersionB\r\n\013credentials\032" + + "\341\001\n\020DockerRepository\022z\n\021public_repositor" + + "y\030\001 \001(\0162].google.devtools.artifactregist" + + "ry.v1.RemoteRepositoryConfig.DockerRepos" + + "itory.PublicRepositoryH\000\"E\n\020PublicReposi" + + "tory\022!\n\035PUBLIC_REPOSITORY_UNSPECIFIED\020\000\022" + + "\016\n\nDOCKER_HUB\020\001B\n\n\010upstream\032\342\001\n\017MavenRep" + + "ository\022y\n\021public_repository\030\001 \001(\0162\\.goo" + + "gle.devtools.artifactregistry.v1.RemoteR" + + "epositoryConfig.MavenRepository.PublicRe" + + "positoryH\000\"H\n\020PublicRepository\022!\n\035PUBLIC" + + "_REPOSITORY_UNSPECIFIED\020\000\022\021\n\rMAVEN_CENTR" + + "AL\020\001B\n\n\010upstream\032\326\001\n\rNpmRepository\022w\n\021pu" + + "blic_repository\030\001 \001(\0162Z.google.devtools." + + "artifactregistry.v1.RemoteRepositoryConf" + + "ig.NpmRepository.PublicRepositoryH\000\"@\n\020P" + + "ublicRepository\022!\n\035PUBLIC_REPOSITORY_UNS" + + "PECIFIED\020\000\022\t\n\005NPMJS\020\001B\n\n\010upstream\032\333\001\n\020Py" + + "thonRepository\022z\n\021public_repository\030\001 \001(" + + "\0162].google.devtools.artifactregistry.v1." + + "RemoteRepositoryConfig.PythonRepository." + + "PublicRepositoryH\000\"?\n\020PublicRepository\022!" + + "\n\035PUBLIC_REPOSITORY_UNSPECIFIED\020\000\022\010\n\004PYP" + + "I\020\001B\n\n\010upstream\032\222\003\n\rAptRepository\022w\n\021pub" + + "lic_repository\030\001 \001(\0132Z.google.devtools.a" + + "rtifactregistry.v1.RemoteRepositoryConfi" + + "g.AptRepository.PublicRepositoryH\000\032\373\001\n\020P" + + "ublicRepository\022\202\001\n\017repository_base\030\001 \001(" + + "\0162i.google.devtools.artifactregistry.v1." + + "RemoteRepositoryConfig.AptRepository.Pub" + + "licRepository.RepositoryBase\022\027\n\017reposito" + + "ry_path\030\002 \001(\t\"I\n\016RepositoryBase\022\037\n\033REPOS" + + "ITORY_BASE_UNSPECIFIED\020\000\022\n\n\006DEBIAN\020\001\022\n\n\006" + + "UBUNTU\020\002B\n\n\010upstream\032\323\003\n\rYumRepository\022w" + + "\n\021public_repository\030\001 \001(\0132Z.google.devto" + + "ols.artifactregistry.v1.RemoteRepository" + + "Config.YumRepository.PublicRepositoryH\000\032" + + "\274\002\n\020PublicRepository\022\202\001\n\017repository_base" + + "\030\001 \001(\0162i.google.devtools.artifactregistr" + + "y.v1.RemoteRepositoryConfig.YumRepositor" + + "y.PublicRepository.RepositoryBase\022\027\n\017rep" + + "ository_path\030\002 \001(\t\"\211\001\n\016RepositoryBase\022\037\n" + + "\033REPOSITORY_BASE_UNSPECIFIED\020\000\022\n\n\006CENTOS" + + "\020\001\022\020\n\014CENTOS_DEBUG\020\002\022\020\n\014CENTOS_VAULT\020\003\022\021" + + "\n\rCENTOS_STREAM\020\004\022\t\n\005ROCKY\020\005\022\010\n\004EPEL\020\006B\n" + + "\n\010upstreamB\017\n\rremote_source\"\215\016\n\nReposito" + + "ry\022]\n\014maven_config\030\t \001(\0132E.google.devtoo" + + "ls.artifactregistry.v1.Repository.MavenR" + + "epositoryConfigH\000\022_\n\rdocker_config\030\021 \001(\013" + + "2F.google.devtools.artifactregistry.v1.R" + + "epository.DockerRepositoryConfigH\000\022a\n\031vi" + + "rtual_repository_config\030\016 \001(\0132<.google.d" + + "evtools.artifactregistry.v1.VirtualRepos" + + "itoryConfigH\001\022_\n\030remote_repository_confi" + + "g\030\017 \001(\0132;.google.devtools.artifactregist" + + "ry.v1.RemoteRepositoryConfigH\001\022\014\n\004name\030\001" + + " \001(\t\022L\n\006format\030\002 \001(\01626.google.devtools.a" + + "rtifactregistry.v1.Repository.FormatB\004\342A" + + "\001\001\022\023\n\013description\030\003 \001(\t\022K\n\006labels\030\004 \003(\0132" + + ";.google.devtools.artifactregistry.v1.Re" + + "pository.LabelsEntry\0225\n\013create_time\030\005 \001(" + + "\0132\032.google.protobuf.TimestampB\004\342A\001\003\0225\n\013u" + + "pdate_time\030\006 \001(\0132\032.google.protobuf.Times" + + "tampB\004\342A\001\003\022\024\n\014kms_key_name\030\010 \001(\t\022H\n\004mode" + + "\030\n \001(\01624.google.devtools.artifactregistr" + + "y.v1.Repository.ModeB\004\342A\001\001\022d\n\020cleanup_po" + + "licies\030\014 \003(\0132D.google.devtools.artifactr" + + "egistry.v1.Repository.CleanupPoliciesEnt" + + "ryB\004\342A\001\001\022\030\n\nsize_bytes\030\r \001(\003B\004\342A\001\003\022\033\n\rsa" + + "tisfies_pzs\030\020 \001(\010B\004\342A\001\003\022$\n\026cleanup_polic" + + "y_dry_run\030\022 \001(\010B\004\342A\001\001\032\363\001\n\025MavenRepositor" + + "yConfig\022!\n\031allow_snapshot_overwrites\030\001 \001" + + "(\010\022k\n\016version_policy\030\002 \001(\0162S.google.devt" + + "ools.artifactregistry.v1.Repository.Mave" + + "nRepositoryConfig.VersionPolicy\"J\n\rVersi" + + "onPolicy\022\036\n\032VERSION_POLICY_UNSPECIFIED\020\000" + + "\022\013\n\007RELEASE\020\001\022\014\n\010SNAPSHOT\020\002\0320\n\026DockerRep" + + "ositoryConfig\022\026\n\016immutable_tags\030\001 \001(\010\032-\n" + + "\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t" + + ":\0028\001\032j\n\024CleanupPoliciesEntry\022\013\n\003key\030\001 \001(" + + "\t\022A\n\005value\030\002 \001(\01322.google.devtools.artif" + + "actregistry.v1.CleanupPolicy:\0028\001\"o\n\006Form" + + "at\022\026\n\022FORMAT_UNSPECIFIED\020\000\022\n\n\006DOCKER\020\001\022\t" + + "\n\005MAVEN\020\002\022\007\n\003NPM\020\003\022\007\n\003APT\020\005\022\007\n\003YUM\020\006\022\n\n\006" + + "PYTHON\020\010\022\007\n\003KFP\020\t\022\006\n\002GO\020\n\"d\n\004Mode\022\024\n\020MOD" + + "E_UNSPECIFIED\020\000\022\027\n\023STANDARD_REPOSITORY\020\001" + + "\022\026\n\022VIRTUAL_REPOSITORY\020\002\022\025\n\021REMOTE_REPOS" + + "ITORY\020\003:r\352Ao\n*artifactregistry.googleapi" + + "s.com/Repository\022Aprojects/{project}/loc" + + "ations/{location}/repositories/{reposito" + + "ry}B\017\n\rformat_configB\r\n\013mode_config\"\205\001\n\027" + + "ListRepositoriesRequest\022C\n\006parent\030\001 \001(\tB" + + "3\342A\001\002\372A,\022*artifactregistry.googleapis.co" + + "m/Repository\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_" + + "token\030\003 \001(\t\"z\n\030ListRepositoriesResponse\022" + + "E\n\014repositories\030\001 \003(\0132/.google.devtools." + + "artifactregistry.v1.Repository\022\027\n\017next_p" + + "age_token\030\002 \001(\t\"Y\n\024GetRepositoryRequest\022" + "A\n\004name\030\001 \001(\tB3\342A\001\002\372A,\n*artifactregistry" - + ".googleapis.com/RepositoryB\372\001\n\'com.googl" - + "e.devtools.artifactregistry.v1B\017Reposito" - + "ryProtoP\001ZPcloud.google.com/go/artifactr" - + "egistry/apiv1/artifactregistrypb;artifac" - + "tregistrypb\252\002 Google.Cloud.ArtifactRegis" - + "try.V1\312\002 Google\\Cloud\\ArtifactRegistry\\V" - + "1\352\002#Google::Cloud::ArtifactRegistry::V1b" - + "\006proto3" + + ".googleapis.com/Repository\"\306\001\n\027CreateRep" + + "ositoryRequest\022C\n\006parent\030\001 \001(\tB3\342A\001\002\372A,\022" + + "*artifactregistry.googleapis.com/Reposit" + + "ory\022\033\n\rrepository_id\030\002 \001(\tB\004\342A\001\002\022I\n\nrepo" + + "sitory\030\003 \001(\0132/.google.devtools.artifactr" + + "egistry.v1.RepositoryB\004\342A\001\002\"\217\001\n\027UpdateRe" + + "positoryRequest\022C\n\nrepository\030\001 \001(\0132/.go" + + "ogle.devtools.artifactregistry.v1.Reposi" + + "tory\022/\n\013update_mask\030\002 \001(\0132\032.google.proto" + + "buf.FieldMask\"\\\n\027DeleteRepositoryRequest" + + "\022A\n\004name\030\001 \001(\tB3\342A\001\002\372A,\n*artifactregistr" + + "y.googleapis.com/RepositoryB\350\002\n\'com.goog" + + "le.devtools.artifactregistry.v1B\017Reposit" + + "oryProtoP\001ZPcloud.google.com/go/artifact" + + "registry/apiv1/artifactregistrypb;artifa" + + "ctregistrypb\252\002 Google.Cloud.ArtifactRegi" + + "stry.V1\312\002 Google\\Cloud\\ArtifactRegistry\\" + + "V1\352\002#Google::Cloud::ArtifactRegistry::V1" + + "\352Ak\n*secretmanager.googleapis.com/Secret" + + "Version\022=projects/{project}/secrets/{sec" + + "ret}/versions/{secret_version}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -135,16 +332,184 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.Descriptors.FileDescriptor[] { com.google.api.FieldBehaviorProto.getDescriptor(), com.google.api.ResourceProto.getDescriptor(), + com.google.protobuf.DurationProto.getDescriptor(), com.google.protobuf.FieldMaskProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), }); - internal_static_google_devtools_artifactregistry_v1_Repository_descriptor = + internal_static_google_devtools_artifactregistry_v1_UpstreamPolicy_descriptor = getDescriptor().getMessageTypes().get(0); + internal_static_google_devtools_artifactregistry_v1_UpstreamPolicy_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_devtools_artifactregistry_v1_UpstreamPolicy_descriptor, + new java.lang.String[] { + "Id", "Repository", "Priority", + }); + internal_static_google_devtools_artifactregistry_v1_CleanupPolicyCondition_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_devtools_artifactregistry_v1_CleanupPolicyCondition_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_devtools_artifactregistry_v1_CleanupPolicyCondition_descriptor, + new java.lang.String[] { + "TagState", + "TagPrefixes", + "VersionNamePrefixes", + "PackageNamePrefixes", + "OlderThan", + "NewerThan", + "TagState", + "OlderThan", + "NewerThan", + }); + internal_static_google_devtools_artifactregistry_v1_CleanupPolicyMostRecentVersions_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_devtools_artifactregistry_v1_CleanupPolicyMostRecentVersions_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_devtools_artifactregistry_v1_CleanupPolicyMostRecentVersions_descriptor, + new java.lang.String[] { + "PackageNamePrefixes", "KeepCount", "KeepCount", + }); + internal_static_google_devtools_artifactregistry_v1_CleanupPolicy_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_devtools_artifactregistry_v1_CleanupPolicy_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_devtools_artifactregistry_v1_CleanupPolicy_descriptor, + new java.lang.String[] { + "Condition", "MostRecentVersions", "Id", "Action", "ConditionType", + }); + internal_static_google_devtools_artifactregistry_v1_VirtualRepositoryConfig_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_devtools_artifactregistry_v1_VirtualRepositoryConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_devtools_artifactregistry_v1_VirtualRepositoryConfig_descriptor, + new java.lang.String[] { + "UpstreamPolicies", + }); + internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_descriptor, + new java.lang.String[] { + "DockerRepository", + "MavenRepository", + "NpmRepository", + "PythonRepository", + "AptRepository", + "YumRepository", + "Description", + "UpstreamCredentials", + "RemoteSource", + }); + internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_UpstreamCredentials_descriptor = + internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_descriptor + .getNestedTypes() + .get(0); + internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_UpstreamCredentials_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_UpstreamCredentials_descriptor, + new java.lang.String[] { + "UsernamePasswordCredentials", "Credentials", + }); + internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_UpstreamCredentials_UsernamePasswordCredentials_descriptor = + internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_UpstreamCredentials_descriptor + .getNestedTypes() + .get(0); + internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_UpstreamCredentials_UsernamePasswordCredentials_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_UpstreamCredentials_UsernamePasswordCredentials_descriptor, + new java.lang.String[] { + "Username", "PasswordSecretVersion", + }); + internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_DockerRepository_descriptor = + internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_descriptor + .getNestedTypes() + .get(1); + internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_DockerRepository_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_DockerRepository_descriptor, + new java.lang.String[] { + "PublicRepository", "Upstream", + }); + internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_MavenRepository_descriptor = + internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_descriptor + .getNestedTypes() + .get(2); + internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_MavenRepository_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_MavenRepository_descriptor, + new java.lang.String[] { + "PublicRepository", "Upstream", + }); + internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_NpmRepository_descriptor = + internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_descriptor + .getNestedTypes() + .get(3); + internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_NpmRepository_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_NpmRepository_descriptor, + new java.lang.String[] { + "PublicRepository", "Upstream", + }); + internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_PythonRepository_descriptor = + internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_descriptor + .getNestedTypes() + .get(4); + internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_PythonRepository_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_PythonRepository_descriptor, + new java.lang.String[] { + "PublicRepository", "Upstream", + }); + internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_AptRepository_descriptor = + internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_descriptor + .getNestedTypes() + .get(5); + internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_AptRepository_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_AptRepository_descriptor, + new java.lang.String[] { + "PublicRepository", "Upstream", + }); + internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_AptRepository_PublicRepository_descriptor = + internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_AptRepository_descriptor + .getNestedTypes() + .get(0); + internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_AptRepository_PublicRepository_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_AptRepository_PublicRepository_descriptor, + new java.lang.String[] { + "RepositoryBase", "RepositoryPath", + }); + internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_YumRepository_descriptor = + internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_descriptor + .getNestedTypes() + .get(6); + internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_YumRepository_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_YumRepository_descriptor, + new java.lang.String[] { + "PublicRepository", "Upstream", + }); + internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_YumRepository_PublicRepository_descriptor = + internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_YumRepository_descriptor + .getNestedTypes() + .get(0); + internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_YumRepository_PublicRepository_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_YumRepository_PublicRepository_descriptor, + new java.lang.String[] { + "RepositoryBase", "RepositoryPath", + }); + internal_static_google_devtools_artifactregistry_v1_Repository_descriptor = + getDescriptor().getMessageTypes().get(6); internal_static_google_devtools_artifactregistry_v1_Repository_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_devtools_artifactregistry_v1_Repository_descriptor, new java.lang.String[] { "MavenConfig", + "DockerConfig", + "VirtualRepositoryConfig", + "RemoteRepositoryConfig", "Name", "Format", "Description", @@ -152,7 +517,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "CreateTime", "UpdateTime", "KmsKeyName", + "Mode", + "CleanupPolicies", + "SizeBytes", + "SatisfiesPzs", + "CleanupPolicyDryRun", "FormatConfig", + "ModeConfig", }); internal_static_google_devtools_artifactregistry_v1_Repository_MavenRepositoryConfig_descriptor = internal_static_google_devtools_artifactregistry_v1_Repository_descriptor @@ -164,18 +535,38 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "AllowSnapshotOverwrites", "VersionPolicy", }); - internal_static_google_devtools_artifactregistry_v1_Repository_LabelsEntry_descriptor = + internal_static_google_devtools_artifactregistry_v1_Repository_DockerRepositoryConfig_descriptor = internal_static_google_devtools_artifactregistry_v1_Repository_descriptor .getNestedTypes() .get(1); + internal_static_google_devtools_artifactregistry_v1_Repository_DockerRepositoryConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_devtools_artifactregistry_v1_Repository_DockerRepositoryConfig_descriptor, + new java.lang.String[] { + "ImmutableTags", + }); + internal_static_google_devtools_artifactregistry_v1_Repository_LabelsEntry_descriptor = + internal_static_google_devtools_artifactregistry_v1_Repository_descriptor + .getNestedTypes() + .get(2); internal_static_google_devtools_artifactregistry_v1_Repository_LabelsEntry_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_devtools_artifactregistry_v1_Repository_LabelsEntry_descriptor, new java.lang.String[] { "Key", "Value", }); + internal_static_google_devtools_artifactregistry_v1_Repository_CleanupPoliciesEntry_descriptor = + internal_static_google_devtools_artifactregistry_v1_Repository_descriptor + .getNestedTypes() + .get(3); + internal_static_google_devtools_artifactregistry_v1_Repository_CleanupPoliciesEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_devtools_artifactregistry_v1_Repository_CleanupPoliciesEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); internal_static_google_devtools_artifactregistry_v1_ListRepositoriesRequest_descriptor = - getDescriptor().getMessageTypes().get(1); + getDescriptor().getMessageTypes().get(7); internal_static_google_devtools_artifactregistry_v1_ListRepositoriesRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_devtools_artifactregistry_v1_ListRepositoriesRequest_descriptor, @@ -183,7 +574,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "PageSize", "PageToken", }); internal_static_google_devtools_artifactregistry_v1_ListRepositoriesResponse_descriptor = - getDescriptor().getMessageTypes().get(2); + getDescriptor().getMessageTypes().get(8); internal_static_google_devtools_artifactregistry_v1_ListRepositoriesResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_devtools_artifactregistry_v1_ListRepositoriesResponse_descriptor, @@ -191,7 +582,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Repositories", "NextPageToken", }); internal_static_google_devtools_artifactregistry_v1_GetRepositoryRequest_descriptor = - getDescriptor().getMessageTypes().get(3); + getDescriptor().getMessageTypes().get(9); internal_static_google_devtools_artifactregistry_v1_GetRepositoryRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_devtools_artifactregistry_v1_GetRepositoryRequest_descriptor, @@ -199,7 +590,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_devtools_artifactregistry_v1_CreateRepositoryRequest_descriptor = - getDescriptor().getMessageTypes().get(4); + getDescriptor().getMessageTypes().get(10); internal_static_google_devtools_artifactregistry_v1_CreateRepositoryRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_devtools_artifactregistry_v1_CreateRepositoryRequest_descriptor, @@ -207,7 +598,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "RepositoryId", "Repository", }); internal_static_google_devtools_artifactregistry_v1_UpdateRepositoryRequest_descriptor = - getDescriptor().getMessageTypes().get(5); + getDescriptor().getMessageTypes().get(11); internal_static_google_devtools_artifactregistry_v1_UpdateRepositoryRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_devtools_artifactregistry_v1_UpdateRepositoryRequest_descriptor, @@ -215,7 +606,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Repository", "UpdateMask", }); internal_static_google_devtools_artifactregistry_v1_DeleteRepositoryRequest_descriptor = - getDescriptor().getMessageTypes().get(6); + getDescriptor().getMessageTypes().get(12); internal_static_google_devtools_artifactregistry_v1_DeleteRepositoryRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_devtools_artifactregistry_v1_DeleteRepositoryRequest_descriptor, @@ -226,11 +617,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { 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.resourceDefinition); 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.DurationProto.getDescriptor(); com.google.protobuf.FieldMaskProto.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/ServiceProto.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ServiceProto.java index 8c45b5575b2c..3028b231f1a6 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 @@ -60,7 +60,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "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" + + "ationMetadata2\344@\n\020ArtifactRegistry\022\341\001\n\020L" + "istDockerImages\022<.google.devtools.artifa" + "ctregistry.v1.ListDockerImagesRequest\032=." + "google.devtools.artifactregistry.v1.List" @@ -186,87 +186,95 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "le.protobuf.Empty\0225google.devtools.artif" + "actregistry.v1.OperationMetadata\332A\004name\202" + "\323\344\223\002H*F/v1/{name=projects/*/locations/*/" - + "repositories/*/packages/*/versions/*}\022\305\001" - + "\n\tListFiles\0225.google.devtools.artifactre" - + "gistry.v1.ListFilesRequest\0326.google.devt" - + "ools.artifactregistry.v1.ListFilesRespon" - + "se\"I\332A\006parent\202\323\344\223\002:\0228/v1/{parent=project" - + "s/*/locations/*/repositories/*}/files\022\263\001" - + "\n\007GetFile\0223.google.devtools.artifactregi" - + "stry.v1.GetFileRequest\032).google.devtools" - + ".artifactregistry.v1.File\"H\332A\004name\202\323\344\223\002;" - + "\0229/v1/{name=projects/*/locations/*/repos" - + "itories/*/files/**}\022\314\001\n\010ListTags\0224.googl" - + "e.devtools.artifactregistry.v1.ListTagsR" - + "equest\0325.google.devtools.artifactregistr" - + "y.v1.ListTagsResponse\"S\332A\006parent\202\323\344\223\002D\022B" - + "/v1/{parent=projects/*/locations/*/repos" - + "itories/*/packages/*}/tags\022\271\001\n\006GetTag\0222." - + "google.devtools.artifactregistry.v1.GetT" - + "agRequest\032(.google.devtools.artifactregi" - + "stry.v1.Tag\"Q\332A\004name\202\323\344\223\002D\022B/v1/{name=pr" - + "ojects/*/locations/*/repositories/*/pack" - + "ages/*/tags/*}\022\321\001\n\tCreateTag\0225.google.de" - + "vtools.artifactregistry.v1.CreateTagRequ" - + "est\032(.google.devtools.artifactregistry.v" - + "1.Tag\"c\332A\021parent,tag,tag_id\202\323\344\223\002I\"B/v1/{" - + "parent=projects/*/locations/*/repositori" - + "es/*/packages/*}/tags:\003tag\022\323\001\n\tUpdateTag" - + "\0225.google.devtools.artifactregistry.v1.U" - + "pdateTagRequest\032(.google.devtools.artifa" - + "ctregistry.v1.Tag\"e\332A\017tag,update_mask\202\323\344" - + "\223\002M2F/v1/{tag.name=projects/*/locations/" - + "*/repositories/*/packages/*/tags/*}:\003tag" - + "\022\255\001\n\tDeleteTag\0225.google.devtools.artifac" - + "tregistry.v1.DeleteTagRequest\032\026.google.p" - + "rotobuf.Empty\"Q\332A\004name\202\323\344\223\002D*B/v1/{name=" + + "repositories/*/packages/*/versions/*}\022\277\002" + + "\n\023BatchDeleteVersions\022?.google.devtools." + + "artifactregistry.v1.BatchDeleteVersionsR" + + "equest\032\035.google.longrunning.Operation\"\307\001" + + "\312AX\n\025google.protobuf.Empty\022?google.devto" + + "ols.artifactregistry.v1.BatchDeleteVersi" + + "onsMetadata\332A\014parent,names\202\323\344\223\002W\"R/v1/{p" + + "arent=projects/*/locations/*/repositorie" + + "s/*/packages/*}/versions:batchDelete:\001*\022" + + "\305\001\n\tListFiles\0225.google.devtools.artifact" + + "registry.v1.ListFilesRequest\0326.google.de" + + "vtools.artifactregistry.v1.ListFilesResp" + + "onse\"I\332A\006parent\202\323\344\223\002:\0228/v1/{parent=proje" + + "cts/*/locations/*/repositories/*}/files\022" + + "\263\001\n\007GetFile\0223.google.devtools.artifactre" + + "gistry.v1.GetFileRequest\032).google.devtoo" + + "ls.artifactregistry.v1.File\"H\332A\004name\202\323\344\223" + + "\002;\0229/v1/{name=projects/*/locations/*/rep" + + "ositories/*/files/**}\022\314\001\n\010ListTags\0224.goo" + + "gle.devtools.artifactregistry.v1.ListTag" + + "sRequest\0325.google.devtools.artifactregis" + + "try.v1.ListTagsResponse\"S\332A\006parent\202\323\344\223\002D" + + "\022B/v1/{parent=projects/*/locations/*/rep" + + "ositories/*/packages/*}/tags\022\271\001\n\006GetTag\022" + + "2.google.devtools.artifactregistry.v1.Ge" + + "tTagRequest\032(.google.devtools.artifactre" + + "gistry.v1.Tag\"Q\332A\004name\202\323\344\223\002D\022B/v1/{name=" + "projects/*/locations/*/repositories/*/pa" - + "ckages/*/tags/*}\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\332A\004name\202\323\344\223\002\'\022%/v1/{name" - + "=projects/*/projectSettings}\022\201\002\n\025UpdateP" - + "rojectSettings\022A.google.devtools.artifac" - + "tregistry.v1.UpdateProjectSettingsReques" - + "t\0324.google.devtools.artifactregistry.v1." - + "ProjectSettings\"o\332A\034project_settings,upd" - + "ate_mask\202\323\344\223\002J26/v1/{project_settings.na" - + "me=projects/*/projectSettings}:\020project_" - + "settings\022\274\001\n\016GetVPCSCConfig\022:.google.dev" - + "tools.artifactregistry.v1.GetVPCSCConfig" - + "Request\0320.google.devtools.artifactregist" - + "ry.v1.VPCSCConfig\"<\332A\004name\202\323\344\223\002/\022-/v1/{n" - + "ame=projects/*/locations/*/vpcscConfig}\022" - + "\361\001\n\021UpdateVPCSCConfig\022=.google.devtools." - + "artifactregistry.v1.UpdateVPCSCConfigReq" - + "uest\0320.google.devtools.artifactregistry." - + "v1.VPCSCConfig\"k\332A\030vpcsc_config,update_m" - + "ask\202\323\344\223\002J2:/v1/{vpcsc_config.name=projec" - + "ts/*/locations/*/vpcscConfig}:\014vpcsc_con" - + "fig\032\214\001\312A\037artifactregistry.googleapis.com" - + "\322Aghttps://www.googleapis.com/auth/cloud" - + "-platform,https://www.googleapis.com/aut" - + "h/cloud-platform.read-onlyB\367\001\n\'com.googl" - + "e.devtools.artifactregistry.v1B\014ServiceP" - + "rotoP\001ZPcloud.google.com/go/artifactregi" - + "stry/apiv1/artifactregistrypb;artifactre" - + "gistrypb\252\002 Google.Cloud.ArtifactRegistry" - + ".V1\312\002 Google\\Cloud\\ArtifactRegistry\\V1\352\002" - + "#Google::Cloud::ArtifactRegistry::V1b\006pr" - + "oto3" + + "ckages/*/tags/*}\022\321\001\n\tCreateTag\0225.google." + + "devtools.artifactregistry.v1.CreateTagRe" + + "quest\032(.google.devtools.artifactregistry" + + ".v1.Tag\"c\332A\021parent,tag,tag_id\202\323\344\223\002I\"B/v1" + + "/{parent=projects/*/locations/*/reposito" + + "ries/*/packages/*}/tags:\003tag\022\323\001\n\tUpdateT" + + "ag\0225.google.devtools.artifactregistry.v1" + + ".UpdateTagRequest\032(.google.devtools.arti" + + "factregistry.v1.Tag\"e\332A\017tag,update_mask\202" + + "\323\344\223\002M2F/v1/{tag.name=projects/*/location" + + "s/*/repositories/*/packages/*/tags/*}:\003t" + + "ag\022\255\001\n\tDeleteTag\0225.google.devtools.artif" + + "actregistry.v1.DeleteTagRequest\032\026.google" + + ".protobuf.Empty\"Q\332A\004name\202\323\344\223\002D*B/v1/{nam" + + "e=projects/*/locations/*/repositories/*/" + + "packages/*/tags/*}\022\227\001\n\014SetIamPolicy\022\".go" + + "ogle.iam.v1.SetIamPolicyRequest\032\025.google" + + ".iam.v1.Policy\"L\202\323\344\223\002F\"A/v1/{resource=pr" + + "ojects/*/locations/*/repositories/*}:set" + + "IamPolicy:\001*\022\224\001\n\014GetIamPolicy\022\".google.i" + + "am.v1.GetIamPolicyRequest\032\025.google.iam.v" + + "1.Policy\"I\202\323\344\223\002C\022A/v1/{resource=projects" + + "/*/locations/*/repositories/*}:getIamPol" + + "icy\022\275\001\n\022TestIamPermissions\022(.google.iam." + + "v1.TestIamPermissionsRequest\032).google.ia" + + "m.v1.TestIamPermissionsResponse\"R\202\323\344\223\002L\"" + + "G/v1/{resource=projects/*/locations/*/re" + + "positories/*}:testIamPermissions:\001*\022\300\001\n\022" + + "GetProjectSettings\022>.google.devtools.art" + + "ifactregistry.v1.GetProjectSettingsReque" + + "st\0324.google.devtools.artifactregistry.v1" + + ".ProjectSettings\"4\332A\004name\202\323\344\223\002\'\022%/v1/{na" + + "me=projects/*/projectSettings}\022\201\002\n\025Updat" + + "eProjectSettings\022A.google.devtools.artif" + + "actregistry.v1.UpdateProjectSettingsRequ" + + "est\0324.google.devtools.artifactregistry.v" + + "1.ProjectSettings\"o\332A\034project_settings,u" + + "pdate_mask\202\323\344\223\002J26/v1/{project_settings." + + "name=projects/*/projectSettings}:\020projec" + + "t_settings\022\274\001\n\016GetVPCSCConfig\022:.google.d" + + "evtools.artifactregistry.v1.GetVPCSCConf" + + "igRequest\0320.google.devtools.artifactregi" + + "stry.v1.VPCSCConfig\"<\332A\004name\202\323\344\223\002/\022-/v1/" + + "{name=projects/*/locations/*/vpcscConfig" + + "}\022\361\001\n\021UpdateVPCSCConfig\022=.google.devtool" + + "s.artifactregistry.v1.UpdateVPCSCConfigR" + + "equest\0320.google.devtools.artifactregistr" + + "y.v1.VPCSCConfig\"k\332A\030vpcsc_config,update" + + "_mask\202\323\344\223\002J2:/v1/{vpcsc_config.name=proj" + + "ects/*/locations/*/vpcscConfig}:\014vpcsc_c" + + "onfig\032\214\001\312A\037artifactregistry.googleapis.c" + + "om\322Aghttps://www.googleapis.com/auth/clo" + + "ud-platform,https://www.googleapis.com/a" + + "uth/cloud-platform.read-onlyB\367\001\n\'com.goo" + + "gle.devtools.artifactregistry.v1B\014Servic" + + "eProtoP\001ZPcloud.google.com/go/artifactre" + + "gistry/apiv1/artifactregistrypb;artifact" + + "registrypb\252\002 Google.Cloud.ArtifactRegist" + + "ry.V1\312\002 Google\\Cloud\\ArtifactRegistry\\V1" + + "\352\002#Google::Cloud::ArtifactRegistry::V1b\006" + + "proto3" }; 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/UpstreamPolicy.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/UpstreamPolicy.java new file mode 100644 index 000000000000..0a2229ebe74b --- /dev/null +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/UpstreamPolicy.java @@ -0,0 +1,907 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/repository.proto + +package com.google.devtools.artifactregistry.v1; + +/** + * + * + *
+ * Artifact policy configuration for the repository contents.
+ * 
+ * + * Protobuf type {@code google.devtools.artifactregistry.v1.UpstreamPolicy} + */ +public final class UpstreamPolicy extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.devtools.artifactregistry.v1.UpstreamPolicy) + UpstreamPolicyOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpstreamPolicy.newBuilder() to construct. + private UpstreamPolicy(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpstreamPolicy() { + id_ = ""; + repository_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpstreamPolicy(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_UpstreamPolicy_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_UpstreamPolicy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devtools.artifactregistry.v1.UpstreamPolicy.class, + com.google.devtools.artifactregistry.v1.UpstreamPolicy.Builder.class); + } + + public static final int ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + * + * + *
+   * The user-provided ID of the upstream policy.
+   * 
+ * + * string id = 1; + * + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + * + * + *
+   * The user-provided ID of the upstream policy.
+   * 
+ * + * string id = 1; + * + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REPOSITORY_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object repository_ = ""; + /** + * + * + *
+   * A reference to the repository resource, for example:
+   * `projects/p1/locations/us-central1/repositories/repo1`.
+   * 
+ * + * string repository = 2 [(.google.api.resource_reference) = { ... } + * + * @return The repository. + */ + @java.lang.Override + public java.lang.String getRepository() { + java.lang.Object ref = repository_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + repository_ = s; + return s; + } + } + /** + * + * + *
+   * A reference to the repository resource, for example:
+   * `projects/p1/locations/us-central1/repositories/repo1`.
+   * 
+ * + * string repository = 2 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for repository. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRepositoryBytes() { + java.lang.Object ref = repository_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + repository_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PRIORITY_FIELD_NUMBER = 3; + private int priority_ = 0; + /** + * + * + *
+   * Entries with a greater priority value take precedence in the pull order.
+   * 
+ * + * int32 priority = 3; + * + * @return The priority. + */ + @java.lang.Override + public int getPriority() { + return priority_; + } + + 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(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(repository_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, repository_); + } + if (priority_ != 0) { + output.writeInt32(3, priority_); + } + 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(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(repository_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, repository_); + } + if (priority_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, priority_); + } + 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.UpstreamPolicy)) { + return super.equals(obj); + } + com.google.devtools.artifactregistry.v1.UpstreamPolicy other = + (com.google.devtools.artifactregistry.v1.UpstreamPolicy) obj; + + if (!getId().equals(other.getId())) return false; + if (!getRepository().equals(other.getRepository())) return false; + if (getPriority() != other.getPriority()) 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) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (37 * hash) + REPOSITORY_FIELD_NUMBER; + hash = (53 * hash) + getRepository().hashCode(); + hash = (37 * hash) + PRIORITY_FIELD_NUMBER; + hash = (53 * hash) + getPriority(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devtools.artifactregistry.v1.UpstreamPolicy parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.UpstreamPolicy 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.UpstreamPolicy parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.UpstreamPolicy 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.UpstreamPolicy parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.UpstreamPolicy 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.UpstreamPolicy parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.UpstreamPolicy 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.UpstreamPolicy parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.UpstreamPolicy 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.UpstreamPolicy 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.UpstreamPolicy 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.UpstreamPolicy 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; + } + /** + * + * + *
+   * Artifact policy configuration for the repository contents.
+   * 
+ * + * Protobuf type {@code google.devtools.artifactregistry.v1.UpstreamPolicy} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devtools.artifactregistry.v1.UpstreamPolicy) + com.google.devtools.artifactregistry.v1.UpstreamPolicyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_UpstreamPolicy_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_UpstreamPolicy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devtools.artifactregistry.v1.UpstreamPolicy.class, + com.google.devtools.artifactregistry.v1.UpstreamPolicy.Builder.class); + } + + // Construct using com.google.devtools.artifactregistry.v1.UpstreamPolicy.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + repository_ = ""; + priority_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_UpstreamPolicy_descriptor; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.UpstreamPolicy getDefaultInstanceForType() { + return com.google.devtools.artifactregistry.v1.UpstreamPolicy.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.UpstreamPolicy build() { + com.google.devtools.artifactregistry.v1.UpstreamPolicy result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.UpstreamPolicy buildPartial() { + com.google.devtools.artifactregistry.v1.UpstreamPolicy result = + new com.google.devtools.artifactregistry.v1.UpstreamPolicy(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.devtools.artifactregistry.v1.UpstreamPolicy result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.repository_ = repository_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.priority_ = priority_; + } + } + + @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.UpstreamPolicy) { + return mergeFrom((com.google.devtools.artifactregistry.v1.UpstreamPolicy) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.devtools.artifactregistry.v1.UpstreamPolicy other) { + if (other == com.google.devtools.artifactregistry.v1.UpstreamPolicy.getDefaultInstance()) + return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRepository().isEmpty()) { + repository_ = other.repository_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getPriority() != 0) { + setPriority(other.getPriority()); + } + 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: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + repository_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + priority_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + 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 id_ = ""; + /** + * + * + *
+     * The user-provided ID of the upstream policy.
+     * 
+ * + * string id = 1; + * + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The user-provided ID of the upstream policy.
+     * 
+ * + * string id = 1; + * + * @return The bytes for id. + */ + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The user-provided ID of the upstream policy.
+     * 
+ * + * string id = 1; + * + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The user-provided ID of the upstream policy.
+     * 
+ * + * string id = 1; + * + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The user-provided ID of the upstream policy.
+     * 
+ * + * string id = 1; + * + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object repository_ = ""; + /** + * + * + *
+     * A reference to the repository resource, for example:
+     * `projects/p1/locations/us-central1/repositories/repo1`.
+     * 
+ * + * string repository = 2 [(.google.api.resource_reference) = { ... } + * + * @return The repository. + */ + public java.lang.String getRepository() { + java.lang.Object ref = repository_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + repository_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A reference to the repository resource, for example:
+     * `projects/p1/locations/us-central1/repositories/repo1`.
+     * 
+ * + * string repository = 2 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for repository. + */ + public com.google.protobuf.ByteString getRepositoryBytes() { + java.lang.Object ref = repository_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + repository_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A reference to the repository resource, for example:
+     * `projects/p1/locations/us-central1/repositories/repo1`.
+     * 
+ * + * string repository = 2 [(.google.api.resource_reference) = { ... } + * + * @param value The repository to set. + * @return This builder for chaining. + */ + public Builder setRepository(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + repository_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * A reference to the repository resource, for example:
+     * `projects/p1/locations/us-central1/repositories/repo1`.
+     * 
+ * + * string repository = 2 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearRepository() { + repository_ = getDefaultInstance().getRepository(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * A reference to the repository resource, for example:
+     * `projects/p1/locations/us-central1/repositories/repo1`.
+     * 
+ * + * string repository = 2 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for repository to set. + * @return This builder for chaining. + */ + public Builder setRepositoryBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + repository_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private int priority_; + /** + * + * + *
+     * Entries with a greater priority value take precedence in the pull order.
+     * 
+ * + * int32 priority = 3; + * + * @return The priority. + */ + @java.lang.Override + public int getPriority() { + return priority_; + } + /** + * + * + *
+     * Entries with a greater priority value take precedence in the pull order.
+     * 
+ * + * int32 priority = 3; + * + * @param value The priority to set. + * @return This builder for chaining. + */ + public Builder setPriority(int value) { + + priority_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Entries with a greater priority value take precedence in the pull order.
+     * 
+ * + * int32 priority = 3; + * + * @return This builder for chaining. + */ + public Builder clearPriority() { + bitField0_ = (bitField0_ & ~0x00000004); + priority_ = 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.UpstreamPolicy) + } + + // @@protoc_insertion_point(class_scope:google.devtools.artifactregistry.v1.UpstreamPolicy) + private static final com.google.devtools.artifactregistry.v1.UpstreamPolicy DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devtools.artifactregistry.v1.UpstreamPolicy(); + } + + public static com.google.devtools.artifactregistry.v1.UpstreamPolicy getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpstreamPolicy 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.UpstreamPolicy getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/UpstreamPolicyOrBuilder.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/UpstreamPolicyOrBuilder.java new file mode 100644 index 000000000000..c6cce99d9bfa --- /dev/null +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/UpstreamPolicyOrBuilder.java @@ -0,0 +1,90 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/repository.proto + +package com.google.devtools.artifactregistry.v1; + +public interface UpstreamPolicyOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devtools.artifactregistry.v1.UpstreamPolicy) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The user-provided ID of the upstream policy.
+   * 
+ * + * string id = 1; + * + * @return The id. + */ + java.lang.String getId(); + /** + * + * + *
+   * The user-provided ID of the upstream policy.
+   * 
+ * + * string id = 1; + * + * @return The bytes for id. + */ + com.google.protobuf.ByteString getIdBytes(); + + /** + * + * + *
+   * A reference to the repository resource, for example:
+   * `projects/p1/locations/us-central1/repositories/repo1`.
+   * 
+ * + * string repository = 2 [(.google.api.resource_reference) = { ... } + * + * @return The repository. + */ + java.lang.String getRepository(); + /** + * + * + *
+   * A reference to the repository resource, for example:
+   * `projects/p1/locations/us-central1/repositories/repo1`.
+   * 
+ * + * string repository = 2 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for repository. + */ + com.google.protobuf.ByteString getRepositoryBytes(); + + /** + * + * + *
+   * Entries with a greater priority value take precedence in the pull order.
+   * 
+ * + * int32 priority = 3; + * + * @return The priority. + */ + int getPriority(); +} diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/VersionName.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/VersionName.java new file mode 100644 index 000000000000..b091b5a53d7f --- /dev/null +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/VersionName.java @@ -0,0 +1,298 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS 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 VersionName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_REPOSITORY_PACKAGE_VERSION = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/repositories/{repository}/packages/{package}/versions/{version}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String repository; + private final String package_; + private final String version; + + @Deprecated + protected VersionName() { + project = null; + location = null; + repository = null; + package_ = null; + version = null; + } + + private VersionName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + repository = Preconditions.checkNotNull(builder.getRepository()); + package_ = Preconditions.checkNotNull(builder.getPackage()); + version = Preconditions.checkNotNull(builder.getVersion()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getRepository() { + return repository; + } + + public String getPackage() { + return package_; + } + + public String getVersion() { + return version; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static VersionName of( + String project, String location, String repository, String package_, String version) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setRepository(repository) + .setPackage(package_) + .setVersion(version) + .build(); + } + + public static String format( + String project, String location, String repository, String package_, String version) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setRepository(repository) + .setPackage(package_) + .setVersion(version) + .build() + .toString(); + } + + public static VersionName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_REPOSITORY_PACKAGE_VERSION.validatedMatch( + formattedString, "VersionName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("repository"), + matchMap.get("package"), + matchMap.get("version")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (VersionName 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_VERSION.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (repository != null) { + fieldMapBuilder.put("repository", repository); + } + if (package_ != null) { + fieldMapBuilder.put("package", package_); + } + if (version != null) { + fieldMapBuilder.put("version", version); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_REPOSITORY_PACKAGE_VERSION.instantiate( + "project", + project, + "location", + location, + "repository", + repository, + "package", + package_, + "version", + version); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + VersionName that = ((VersionName) 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_) + && Objects.equals(this.version, that.version); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(repository); + h *= 1000003; + h ^= Objects.hashCode(package_); + h *= 1000003; + h ^= Objects.hashCode(version); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/repositories/{repository}/packages/{package}/versions/{version}. + */ + public static class Builder { + private String project; + private String location; + private String repository; + private String package_; + private String version; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getRepository() { + return repository; + } + + public String getPackage() { + return package_; + } + + public String getVersion() { + return version; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setRepository(String repository) { + this.repository = repository; + return this; + } + + public Builder setPackage(String package_) { + this.package_ = package_; + return this; + } + + public Builder setVersion(String version) { + this.version = version; + return this; + } + + private Builder(VersionName versionName) { + this.project = versionName.project; + this.location = versionName.location; + this.repository = versionName.repository; + this.package_ = versionName.package_; + this.version = versionName.version; + } + + public VersionName build() { + return new VersionName(this); + } + } +} 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 97134a5413e5..7e947f9ff854 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_BatchDeleteVersionsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_devtools_artifactregistry_v1_BatchDeleteVersionsRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_devtools_artifactregistry_v1_BatchDeleteVersionsMetadata_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -87,17 +91,21 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ionRequest\022\014\n\004name\030\001 \001(\t\022>\n\004view\030\002 \001(\01620" + ".google.devtools.artifactregistry.v1.Ver" + "sionView\"3\n\024DeleteVersionRequest\022\014\n\004name" - + "\030\001 \001(\t\022\r\n\005force\030\002 \001(\010\"6\n\033BatchDeleteVers" - + "ionsMetadata\022\027\n\017failed_versions\030\002 \003(\t*@\n" - + "\013VersionView\022\034\n\030VERSION_VIEW_UNSPECIFIED" - + "\020\000\022\t\n\005BASIC\020\001\022\010\n\004FULL\020\002B\367\001\n\'com.google.d" - + "evtools.artifactregistry.v1B\014VersionProt" - + "oP\001ZPcloud.google.com/go/artifactregistr" - + "y/apiv1/artifactregistrypb;artifactregis" - + "trypb\252\002 Google.Cloud.ArtifactRegistry.V1" - + "\312\002 Google\\Cloud\\ArtifactRegistry\\V1\352\002#Go" - + "ogle::Cloud::ArtifactRegistry::V1b\006proto" - + "3" + + "\030\001 \001(\t\022\r\n\005force\030\002 \001(\010\"\262\001\n\032BatchDeleteVer" + + "sionsRequest\022<\n\006parent\030\001 \001(\tB,\372A)\022\'artif" + + "actregistry.googleapis.com/Version\022?\n\005na" + + "mes\030\002 \003(\tB0\342A\001\002\372A)\n\'artifactregistry.goo" + + "gleapis.com/Version\022\025\n\rvalidate_only\030\003 \001" + + "(\010\"6\n\033BatchDeleteVersionsMetadata\022\027\n\017fai" + + "led_versions\030\002 \003(\t*@\n\013VersionView\022\034\n\030VER" + + "SION_VIEW_UNSPECIFIED\020\000\022\t\n\005BASIC\020\001\022\010\n\004FU" + + "LL\020\002B\367\001\n\'com.google.devtools.artifactreg" + + "istry.v1B\014VersionProtoP\001ZPcloud.google.c" + + "om/go/artifactregistry/apiv1/artifactreg" + + "istrypb;artifactregistrypb\252\002 Google.Clou" + + "d.ArtifactRegistry.V1\312\002 Google\\Cloud\\Art" + + "ifactRegistry\\V1\352\002#Google::Cloud::Artifa" + + "ctRegistry::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -149,8 +157,16 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Name", "Force", }); - internal_static_google_devtools_artifactregistry_v1_BatchDeleteVersionsMetadata_descriptor = + internal_static_google_devtools_artifactregistry_v1_BatchDeleteVersionsRequest_descriptor = getDescriptor().getMessageTypes().get(5); + internal_static_google_devtools_artifactregistry_v1_BatchDeleteVersionsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_devtools_artifactregistry_v1_BatchDeleteVersionsRequest_descriptor, + new java.lang.String[] { + "Parent", "Names", "ValidateOnly", + }); + internal_static_google_devtools_artifactregistry_v1_BatchDeleteVersionsMetadata_descriptor = + getDescriptor().getMessageTypes().get(6); internal_static_google_devtools_artifactregistry_v1_BatchDeleteVersionsMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_devtools_artifactregistry_v1_BatchDeleteVersionsMetadata_descriptor, @@ -161,6 +177,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { 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(); diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/VirtualRepositoryConfig.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/VirtualRepositoryConfig.java new file mode 100644 index 000000000000..ba4bc84b254b --- /dev/null +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/VirtualRepositoryConfig.java @@ -0,0 +1,1008 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/repository.proto + +package com.google.devtools.artifactregistry.v1; + +/** + * + * + *
+ * Virtual repository configuration.
+ * 
+ * + * Protobuf type {@code google.devtools.artifactregistry.v1.VirtualRepositoryConfig} + */ +public final class VirtualRepositoryConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.devtools.artifactregistry.v1.VirtualRepositoryConfig) + VirtualRepositoryConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use VirtualRepositoryConfig.newBuilder() to construct. + private VirtualRepositoryConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private VirtualRepositoryConfig() { + upstreamPolicies_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new VirtualRepositoryConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_VirtualRepositoryConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_VirtualRepositoryConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devtools.artifactregistry.v1.VirtualRepositoryConfig.class, + com.google.devtools.artifactregistry.v1.VirtualRepositoryConfig.Builder.class); + } + + public static final int UPSTREAM_POLICIES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List upstreamPolicies_; + /** + * + * + *
+   * Policies that configure the upstream artifacts distributed by the Virtual
+   * Repository. Upstream policies cannot be set on a standard repository.
+   * 
+ * + * repeated .google.devtools.artifactregistry.v1.UpstreamPolicy upstream_policies = 1; + * + */ + @java.lang.Override + public java.util.List + getUpstreamPoliciesList() { + return upstreamPolicies_; + } + /** + * + * + *
+   * Policies that configure the upstream artifacts distributed by the Virtual
+   * Repository. Upstream policies cannot be set on a standard repository.
+   * 
+ * + * repeated .google.devtools.artifactregistry.v1.UpstreamPolicy upstream_policies = 1; + * + */ + @java.lang.Override + public java.util.List + getUpstreamPoliciesOrBuilderList() { + return upstreamPolicies_; + } + /** + * + * + *
+   * Policies that configure the upstream artifacts distributed by the Virtual
+   * Repository. Upstream policies cannot be set on a standard repository.
+   * 
+ * + * repeated .google.devtools.artifactregistry.v1.UpstreamPolicy upstream_policies = 1; + * + */ + @java.lang.Override + public int getUpstreamPoliciesCount() { + return upstreamPolicies_.size(); + } + /** + * + * + *
+   * Policies that configure the upstream artifacts distributed by the Virtual
+   * Repository. Upstream policies cannot be set on a standard repository.
+   * 
+ * + * repeated .google.devtools.artifactregistry.v1.UpstreamPolicy upstream_policies = 1; + * + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.UpstreamPolicy getUpstreamPolicies(int index) { + return upstreamPolicies_.get(index); + } + /** + * + * + *
+   * Policies that configure the upstream artifacts distributed by the Virtual
+   * Repository. Upstream policies cannot be set on a standard repository.
+   * 
+ * + * repeated .google.devtools.artifactregistry.v1.UpstreamPolicy upstream_policies = 1; + * + */ + @java.lang.Override + public com.google.devtools.artifactregistry.v1.UpstreamPolicyOrBuilder + getUpstreamPoliciesOrBuilder(int index) { + return upstreamPolicies_.get(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 < upstreamPolicies_.size(); i++) { + output.writeMessage(1, upstreamPolicies_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < upstreamPolicies_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, upstreamPolicies_.get(i)); + } + 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.VirtualRepositoryConfig)) { + return super.equals(obj); + } + com.google.devtools.artifactregistry.v1.VirtualRepositoryConfig other = + (com.google.devtools.artifactregistry.v1.VirtualRepositoryConfig) obj; + + if (!getUpstreamPoliciesList().equals(other.getUpstreamPoliciesList())) 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 (getUpstreamPoliciesCount() > 0) { + hash = (37 * hash) + UPSTREAM_POLICIES_FIELD_NUMBER; + hash = (53 * hash) + getUpstreamPoliciesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devtools.artifactregistry.v1.VirtualRepositoryConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.VirtualRepositoryConfig 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.VirtualRepositoryConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.VirtualRepositoryConfig 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.VirtualRepositoryConfig parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devtools.artifactregistry.v1.VirtualRepositoryConfig 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.VirtualRepositoryConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.VirtualRepositoryConfig 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.VirtualRepositoryConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devtools.artifactregistry.v1.VirtualRepositoryConfig 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.VirtualRepositoryConfig 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.VirtualRepositoryConfig 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.VirtualRepositoryConfig 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; + } + /** + * + * + *
+   * Virtual repository configuration.
+   * 
+ * + * Protobuf type {@code google.devtools.artifactregistry.v1.VirtualRepositoryConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devtools.artifactregistry.v1.VirtualRepositoryConfig) + com.google.devtools.artifactregistry.v1.VirtualRepositoryConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_VirtualRepositoryConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_VirtualRepositoryConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devtools.artifactregistry.v1.VirtualRepositoryConfig.class, + com.google.devtools.artifactregistry.v1.VirtualRepositoryConfig.Builder.class); + } + + // Construct using com.google.devtools.artifactregistry.v1.VirtualRepositoryConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (upstreamPoliciesBuilder_ == null) { + upstreamPolicies_ = java.util.Collections.emptyList(); + } else { + upstreamPolicies_ = null; + upstreamPoliciesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_VirtualRepositoryConfig_descriptor; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.VirtualRepositoryConfig + getDefaultInstanceForType() { + return com.google.devtools.artifactregistry.v1.VirtualRepositoryConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.VirtualRepositoryConfig build() { + com.google.devtools.artifactregistry.v1.VirtualRepositoryConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devtools.artifactregistry.v1.VirtualRepositoryConfig buildPartial() { + com.google.devtools.artifactregistry.v1.VirtualRepositoryConfig result = + new com.google.devtools.artifactregistry.v1.VirtualRepositoryConfig(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.devtools.artifactregistry.v1.VirtualRepositoryConfig result) { + if (upstreamPoliciesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + upstreamPolicies_ = java.util.Collections.unmodifiableList(upstreamPolicies_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.upstreamPolicies_ = upstreamPolicies_; + } else { + result.upstreamPolicies_ = upstreamPoliciesBuilder_.build(); + } + } + + private void buildPartial0( + com.google.devtools.artifactregistry.v1.VirtualRepositoryConfig 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.VirtualRepositoryConfig) { + return mergeFrom((com.google.devtools.artifactregistry.v1.VirtualRepositoryConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.devtools.artifactregistry.v1.VirtualRepositoryConfig other) { + if (other + == com.google.devtools.artifactregistry.v1.VirtualRepositoryConfig.getDefaultInstance()) + return this; + if (upstreamPoliciesBuilder_ == null) { + if (!other.upstreamPolicies_.isEmpty()) { + if (upstreamPolicies_.isEmpty()) { + upstreamPolicies_ = other.upstreamPolicies_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureUpstreamPoliciesIsMutable(); + upstreamPolicies_.addAll(other.upstreamPolicies_); + } + onChanged(); + } + } else { + if (!other.upstreamPolicies_.isEmpty()) { + if (upstreamPoliciesBuilder_.isEmpty()) { + upstreamPoliciesBuilder_.dispose(); + upstreamPoliciesBuilder_ = null; + upstreamPolicies_ = other.upstreamPolicies_; + bitField0_ = (bitField0_ & ~0x00000001); + upstreamPoliciesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getUpstreamPoliciesFieldBuilder() + : null; + } else { + upstreamPoliciesBuilder_.addAllMessages(other.upstreamPolicies_); + } + } + } + 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.UpstreamPolicy m = + input.readMessage( + com.google.devtools.artifactregistry.v1.UpstreamPolicy.parser(), + extensionRegistry); + if (upstreamPoliciesBuilder_ == null) { + ensureUpstreamPoliciesIsMutable(); + upstreamPolicies_.add(m); + } else { + upstreamPoliciesBuilder_.addMessage(m); + } + 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.util.List + upstreamPolicies_ = java.util.Collections.emptyList(); + + private void ensureUpstreamPoliciesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + upstreamPolicies_ = + new java.util.ArrayList( + upstreamPolicies_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.devtools.artifactregistry.v1.UpstreamPolicy, + com.google.devtools.artifactregistry.v1.UpstreamPolicy.Builder, + com.google.devtools.artifactregistry.v1.UpstreamPolicyOrBuilder> + upstreamPoliciesBuilder_; + + /** + * + * + *
+     * Policies that configure the upstream artifacts distributed by the Virtual
+     * Repository. Upstream policies cannot be set on a standard repository.
+     * 
+ * + * repeated .google.devtools.artifactregistry.v1.UpstreamPolicy upstream_policies = 1; + * + */ + public java.util.List + getUpstreamPoliciesList() { + if (upstreamPoliciesBuilder_ == null) { + return java.util.Collections.unmodifiableList(upstreamPolicies_); + } else { + return upstreamPoliciesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Policies that configure the upstream artifacts distributed by the Virtual
+     * Repository. Upstream policies cannot be set on a standard repository.
+     * 
+ * + * repeated .google.devtools.artifactregistry.v1.UpstreamPolicy upstream_policies = 1; + * + */ + public int getUpstreamPoliciesCount() { + if (upstreamPoliciesBuilder_ == null) { + return upstreamPolicies_.size(); + } else { + return upstreamPoliciesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Policies that configure the upstream artifacts distributed by the Virtual
+     * Repository. Upstream policies cannot be set on a standard repository.
+     * 
+ * + * repeated .google.devtools.artifactregistry.v1.UpstreamPolicy upstream_policies = 1; + * + */ + public com.google.devtools.artifactregistry.v1.UpstreamPolicy getUpstreamPolicies(int index) { + if (upstreamPoliciesBuilder_ == null) { + return upstreamPolicies_.get(index); + } else { + return upstreamPoliciesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Policies that configure the upstream artifacts distributed by the Virtual
+     * Repository. Upstream policies cannot be set on a standard repository.
+     * 
+ * + * repeated .google.devtools.artifactregistry.v1.UpstreamPolicy upstream_policies = 1; + * + */ + public Builder setUpstreamPolicies( + int index, com.google.devtools.artifactregistry.v1.UpstreamPolicy value) { + if (upstreamPoliciesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUpstreamPoliciesIsMutable(); + upstreamPolicies_.set(index, value); + onChanged(); + } else { + upstreamPoliciesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Policies that configure the upstream artifacts distributed by the Virtual
+     * Repository. Upstream policies cannot be set on a standard repository.
+     * 
+ * + * repeated .google.devtools.artifactregistry.v1.UpstreamPolicy upstream_policies = 1; + * + */ + public Builder setUpstreamPolicies( + int index, com.google.devtools.artifactregistry.v1.UpstreamPolicy.Builder builderForValue) { + if (upstreamPoliciesBuilder_ == null) { + ensureUpstreamPoliciesIsMutable(); + upstreamPolicies_.set(index, builderForValue.build()); + onChanged(); + } else { + upstreamPoliciesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Policies that configure the upstream artifacts distributed by the Virtual
+     * Repository. Upstream policies cannot be set on a standard repository.
+     * 
+ * + * repeated .google.devtools.artifactregistry.v1.UpstreamPolicy upstream_policies = 1; + * + */ + public Builder addUpstreamPolicies( + com.google.devtools.artifactregistry.v1.UpstreamPolicy value) { + if (upstreamPoliciesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUpstreamPoliciesIsMutable(); + upstreamPolicies_.add(value); + onChanged(); + } else { + upstreamPoliciesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Policies that configure the upstream artifacts distributed by the Virtual
+     * Repository. Upstream policies cannot be set on a standard repository.
+     * 
+ * + * repeated .google.devtools.artifactregistry.v1.UpstreamPolicy upstream_policies = 1; + * + */ + public Builder addUpstreamPolicies( + int index, com.google.devtools.artifactregistry.v1.UpstreamPolicy value) { + if (upstreamPoliciesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUpstreamPoliciesIsMutable(); + upstreamPolicies_.add(index, value); + onChanged(); + } else { + upstreamPoliciesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Policies that configure the upstream artifacts distributed by the Virtual
+     * Repository. Upstream policies cannot be set on a standard repository.
+     * 
+ * + * repeated .google.devtools.artifactregistry.v1.UpstreamPolicy upstream_policies = 1; + * + */ + public Builder addUpstreamPolicies( + com.google.devtools.artifactregistry.v1.UpstreamPolicy.Builder builderForValue) { + if (upstreamPoliciesBuilder_ == null) { + ensureUpstreamPoliciesIsMutable(); + upstreamPolicies_.add(builderForValue.build()); + onChanged(); + } else { + upstreamPoliciesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Policies that configure the upstream artifacts distributed by the Virtual
+     * Repository. Upstream policies cannot be set on a standard repository.
+     * 
+ * + * repeated .google.devtools.artifactregistry.v1.UpstreamPolicy upstream_policies = 1; + * + */ + public Builder addUpstreamPolicies( + int index, com.google.devtools.artifactregistry.v1.UpstreamPolicy.Builder builderForValue) { + if (upstreamPoliciesBuilder_ == null) { + ensureUpstreamPoliciesIsMutable(); + upstreamPolicies_.add(index, builderForValue.build()); + onChanged(); + } else { + upstreamPoliciesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Policies that configure the upstream artifacts distributed by the Virtual
+     * Repository. Upstream policies cannot be set on a standard repository.
+     * 
+ * + * repeated .google.devtools.artifactregistry.v1.UpstreamPolicy upstream_policies = 1; + * + */ + public Builder addAllUpstreamPolicies( + java.lang.Iterable + values) { + if (upstreamPoliciesBuilder_ == null) { + ensureUpstreamPoliciesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, upstreamPolicies_); + onChanged(); + } else { + upstreamPoliciesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Policies that configure the upstream artifacts distributed by the Virtual
+     * Repository. Upstream policies cannot be set on a standard repository.
+     * 
+ * + * repeated .google.devtools.artifactregistry.v1.UpstreamPolicy upstream_policies = 1; + * + */ + public Builder clearUpstreamPolicies() { + if (upstreamPoliciesBuilder_ == null) { + upstreamPolicies_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + upstreamPoliciesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Policies that configure the upstream artifacts distributed by the Virtual
+     * Repository. Upstream policies cannot be set on a standard repository.
+     * 
+ * + * repeated .google.devtools.artifactregistry.v1.UpstreamPolicy upstream_policies = 1; + * + */ + public Builder removeUpstreamPolicies(int index) { + if (upstreamPoliciesBuilder_ == null) { + ensureUpstreamPoliciesIsMutable(); + upstreamPolicies_.remove(index); + onChanged(); + } else { + upstreamPoliciesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Policies that configure the upstream artifacts distributed by the Virtual
+     * Repository. Upstream policies cannot be set on a standard repository.
+     * 
+ * + * repeated .google.devtools.artifactregistry.v1.UpstreamPolicy upstream_policies = 1; + * + */ + public com.google.devtools.artifactregistry.v1.UpstreamPolicy.Builder + getUpstreamPoliciesBuilder(int index) { + return getUpstreamPoliciesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Policies that configure the upstream artifacts distributed by the Virtual
+     * Repository. Upstream policies cannot be set on a standard repository.
+     * 
+ * + * repeated .google.devtools.artifactregistry.v1.UpstreamPolicy upstream_policies = 1; + * + */ + public com.google.devtools.artifactregistry.v1.UpstreamPolicyOrBuilder + getUpstreamPoliciesOrBuilder(int index) { + if (upstreamPoliciesBuilder_ == null) { + return upstreamPolicies_.get(index); + } else { + return upstreamPoliciesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Policies that configure the upstream artifacts distributed by the Virtual
+     * Repository. Upstream policies cannot be set on a standard repository.
+     * 
+ * + * repeated .google.devtools.artifactregistry.v1.UpstreamPolicy upstream_policies = 1; + * + */ + public java.util.List + getUpstreamPoliciesOrBuilderList() { + if (upstreamPoliciesBuilder_ != null) { + return upstreamPoliciesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(upstreamPolicies_); + } + } + /** + * + * + *
+     * Policies that configure the upstream artifacts distributed by the Virtual
+     * Repository. Upstream policies cannot be set on a standard repository.
+     * 
+ * + * repeated .google.devtools.artifactregistry.v1.UpstreamPolicy upstream_policies = 1; + * + */ + public com.google.devtools.artifactregistry.v1.UpstreamPolicy.Builder + addUpstreamPoliciesBuilder() { + return getUpstreamPoliciesFieldBuilder() + .addBuilder(com.google.devtools.artifactregistry.v1.UpstreamPolicy.getDefaultInstance()); + } + /** + * + * + *
+     * Policies that configure the upstream artifacts distributed by the Virtual
+     * Repository. Upstream policies cannot be set on a standard repository.
+     * 
+ * + * repeated .google.devtools.artifactregistry.v1.UpstreamPolicy upstream_policies = 1; + * + */ + public com.google.devtools.artifactregistry.v1.UpstreamPolicy.Builder + addUpstreamPoliciesBuilder(int index) { + return getUpstreamPoliciesFieldBuilder() + .addBuilder( + index, com.google.devtools.artifactregistry.v1.UpstreamPolicy.getDefaultInstance()); + } + /** + * + * + *
+     * Policies that configure the upstream artifacts distributed by the Virtual
+     * Repository. Upstream policies cannot be set on a standard repository.
+     * 
+ * + * repeated .google.devtools.artifactregistry.v1.UpstreamPolicy upstream_policies = 1; + * + */ + public java.util.List + getUpstreamPoliciesBuilderList() { + return getUpstreamPoliciesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.devtools.artifactregistry.v1.UpstreamPolicy, + com.google.devtools.artifactregistry.v1.UpstreamPolicy.Builder, + com.google.devtools.artifactregistry.v1.UpstreamPolicyOrBuilder> + getUpstreamPoliciesFieldBuilder() { + if (upstreamPoliciesBuilder_ == null) { + upstreamPoliciesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.devtools.artifactregistry.v1.UpstreamPolicy, + com.google.devtools.artifactregistry.v1.UpstreamPolicy.Builder, + com.google.devtools.artifactregistry.v1.UpstreamPolicyOrBuilder>( + upstreamPolicies_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + upstreamPolicies_ = null; + } + return upstreamPoliciesBuilder_; + } + + @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.VirtualRepositoryConfig) + } + + // @@protoc_insertion_point(class_scope:google.devtools.artifactregistry.v1.VirtualRepositoryConfig) + private static final com.google.devtools.artifactregistry.v1.VirtualRepositoryConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devtools.artifactregistry.v1.VirtualRepositoryConfig(); + } + + public static com.google.devtools.artifactregistry.v1.VirtualRepositoryConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VirtualRepositoryConfig 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.VirtualRepositoryConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/VirtualRepositoryConfigOrBuilder.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/VirtualRepositoryConfigOrBuilder.java new file mode 100644 index 000000000000..a09e08a862af --- /dev/null +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/VirtualRepositoryConfigOrBuilder.java @@ -0,0 +1,88 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/repository.proto + +package com.google.devtools.artifactregistry.v1; + +public interface VirtualRepositoryConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devtools.artifactregistry.v1.VirtualRepositoryConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Policies that configure the upstream artifacts distributed by the Virtual
+   * Repository. Upstream policies cannot be set on a standard repository.
+   * 
+ * + * repeated .google.devtools.artifactregistry.v1.UpstreamPolicy upstream_policies = 1; + * + */ + java.util.List getUpstreamPoliciesList(); + /** + * + * + *
+   * Policies that configure the upstream artifacts distributed by the Virtual
+   * Repository. Upstream policies cannot be set on a standard repository.
+   * 
+ * + * repeated .google.devtools.artifactregistry.v1.UpstreamPolicy upstream_policies = 1; + * + */ + com.google.devtools.artifactregistry.v1.UpstreamPolicy getUpstreamPolicies(int index); + /** + * + * + *
+   * Policies that configure the upstream artifacts distributed by the Virtual
+   * Repository. Upstream policies cannot be set on a standard repository.
+   * 
+ * + * repeated .google.devtools.artifactregistry.v1.UpstreamPolicy upstream_policies = 1; + * + */ + int getUpstreamPoliciesCount(); + /** + * + * + *
+   * Policies that configure the upstream artifacts distributed by the Virtual
+   * Repository. Upstream policies cannot be set on a standard repository.
+   * 
+ * + * repeated .google.devtools.artifactregistry.v1.UpstreamPolicy upstream_policies = 1; + * + */ + java.util.List + getUpstreamPoliciesOrBuilderList(); + /** + * + * + *
+   * Policies that configure the upstream artifacts distributed by the Virtual
+   * Repository. Upstream policies cannot be set on a standard repository.
+   * 
+ * + * repeated .google.devtools.artifactregistry.v1.UpstreamPolicy upstream_policies = 1; + * + */ + com.google.devtools.artifactregistry.v1.UpstreamPolicyOrBuilder getUpstreamPoliciesOrBuilder( + int index); +} 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 68e63ff42e2f..003a2b516fba 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 @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. 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 58b3a4803843..7955f5f8d6f7 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 @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. 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 69b27297fb80..695442751a95 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 @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. 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 0dfdf6752644..1a604e399e97 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 @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -36,7 +36,7 @@ message Package { }; // The name of the package, for example: - // "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1". + // `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`. // If the package ID part contains slashes, the slashes are escaped. string name = 1; diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/proto/google/devtools/artifactregistry/v1/repository.proto b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/proto/google/devtools/artifactregistry/v1/repository.proto index 92ddec06c9d6..d8b4558a3a25 100644 --- a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/proto/google/devtools/artifactregistry/v1/repository.proto +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/proto/google/devtools/artifactregistry/v1/repository.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -18,6 +18,7 @@ package google.devtools.artifactregistry.v1; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; +import "google/protobuf/duration.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; @@ -28,6 +29,316 @@ option java_outer_classname = "RepositoryProto"; option java_package = "com.google.devtools.artifactregistry.v1"; option php_namespace = "Google\\Cloud\\ArtifactRegistry\\V1"; option ruby_package = "Google::Cloud::ArtifactRegistry::V1"; +option (google.api.resource_definition) = { + type: "secretmanager.googleapis.com/SecretVersion" + pattern: "projects/{project}/secrets/{secret}/versions/{secret_version}" +}; + +// Artifact policy configuration for the repository contents. +message UpstreamPolicy { + // The user-provided ID of the upstream policy. + string id = 1; + + // A reference to the repository resource, for example: + // `projects/p1/locations/us-central1/repositories/repo1`. + string repository = 2 [(google.api.resource_reference) = { + type: "artifactregistry.googleapis.com/Repository" + }]; + + // Entries with a greater priority value take precedence in the pull order. + int32 priority = 3; +} + +// CleanupPolicyCondition is a set of conditions attached to a CleanupPolicy. +// If multiple entries are set, all must be satisfied for the condition to be +// satisfied. +message CleanupPolicyCondition { + // Statuses applying to versions. + enum TagState { + // Tag status not specified. + TAG_STATE_UNSPECIFIED = 0; + + // Applies to tagged versions only. + TAGGED = 1; + + // Applies to untagged versions only. + UNTAGGED = 2; + + // Applies to all versions. + ANY = 3; + } + + // Match versions by tag status. + optional TagState tag_state = 2; + + // Match versions by tag prefix. Applied on any prefix match. + repeated string tag_prefixes = 3; + + // Match versions by version name prefix. Applied on any prefix match. + repeated string version_name_prefixes = 4; + + // Match versions by package prefix. Applied on any prefix match. + repeated string package_name_prefixes = 5; + + // Match versions older than a duration. + optional google.protobuf.Duration older_than = 6; + + // Match versions newer than a duration. + optional google.protobuf.Duration newer_than = 7; +} + +// CleanupPolicyMostRecentVersions is an alternate condition of a CleanupPolicy +// for retaining a minimum number of versions. +message CleanupPolicyMostRecentVersions { + // List of package name prefixes that will apply this rule. + repeated string package_name_prefixes = 1; + + // Minimum number of versions to keep. + optional int32 keep_count = 2; +} + +// Artifact policy configuration for repository cleanup policies. +message CleanupPolicy { + // Action type for a cleanup policy. + enum Action { + // Action not specified. + ACTION_UNSPECIFIED = 0; + + // Delete action. + DELETE = 1; + + // Keep action. + KEEP = 2; + } + + oneof condition_type { + // Policy condition for matching versions. + CleanupPolicyCondition condition = 2; + + // Policy condition for retaining a minimum number of versions. May only be + // specified with a Keep action. + CleanupPolicyMostRecentVersions most_recent_versions = 4; + } + + // The user-provided ID of the cleanup policy. + string id = 1; + + // Policy action. + Action action = 3; +} + +// Virtual repository configuration. +message VirtualRepositoryConfig { + // Policies that configure the upstream artifacts distributed by the Virtual + // Repository. Upstream policies cannot be set on a standard repository. + repeated UpstreamPolicy upstream_policies = 1; +} + +// Remote repository configuration. +message RemoteRepositoryConfig { + // The credentials to access the remote repository. + message UpstreamCredentials { + // Username and password credentials. + message UsernamePasswordCredentials { + // The username to access the remote repository. + string username = 1; + + // The Secret Manager key version that holds the password to access the + // remote repository. Must be in the format of + // `projects/{project}/secrets/{secret}/versions/{version}`. + string password_secret_version = 2 [(google.api.resource_reference) = { + type: "secretmanager.googleapis.com/SecretVersion" + }]; + } + + oneof credentials { + // Use username and password to access the remote repository. + UsernamePasswordCredentials username_password_credentials = 1; + } + } + + // Configuration for a Docker remote repository. + message DockerRepository { + // Predefined list of publicly available Docker repositories like Docker + // Hub. + enum PublicRepository { + // Unspecified repository. + PUBLIC_REPOSITORY_UNSPECIFIED = 0; + + // Docker Hub. + DOCKER_HUB = 1; + } + + // Address of the remote repository. + oneof upstream { + // One of the publicly available Docker repositories supported by Artifact + // Registry. + PublicRepository public_repository = 1; + } + } + + // Configuration for a Maven remote repository. + message MavenRepository { + // Predefined list of publicly available Maven repositories like Maven + // Central. + enum PublicRepository { + // Unspecified repository. + PUBLIC_REPOSITORY_UNSPECIFIED = 0; + + // Maven Central. + MAVEN_CENTRAL = 1; + } + + // Address of the remote repository. + oneof upstream { + // One of the publicly available Maven repositories supported by Artifact + // Registry. + PublicRepository public_repository = 1; + } + } + + // Configuration for a Npm remote repository. + message NpmRepository { + // Predefined list of publicly available NPM repositories like npmjs. + enum PublicRepository { + // Unspecified repository. + PUBLIC_REPOSITORY_UNSPECIFIED = 0; + + // npmjs. + NPMJS = 1; + } + + // Address of the remote repository + oneof upstream { + // One of the publicly available Npm repositories supported by Artifact + // Registry. + PublicRepository public_repository = 1; + } + } + + // Configuration for a Python remote repository. + message PythonRepository { + // Predefined list of publicly available Python repositories like PyPI.org. + enum PublicRepository { + // Unspecified repository. + PUBLIC_REPOSITORY_UNSPECIFIED = 0; + + // PyPI. + PYPI = 1; + } + + // Address of the remote repository. + oneof upstream { + // One of the publicly available Python repositories supported by Artifact + // Registry. + PublicRepository public_repository = 1; + } + } + + // Configuration for an Apt remote repository. + message AptRepository { + // Publicly available Apt repositories constructed from a common repository + // base and a custom repository path. + message PublicRepository { + // Predefined list of publicly available repository bases for Apt. + enum RepositoryBase { + // Unspecified repository base. + REPOSITORY_BASE_UNSPECIFIED = 0; + + // Debian. + DEBIAN = 1; + + // Ubuntu LTS/Pro. + UBUNTU = 2; + } + + // A common public repository base for Apt. + RepositoryBase repository_base = 1; + + // A custom field to define a path to a specific repository from the base. + string repository_path = 2; + } + + // Address of the remote repository. + oneof upstream { + // One of the publicly available Apt repositories supported by Artifact + // Registry. + PublicRepository public_repository = 1; + } + } + + // Configuration for a Yum remote repository. + message YumRepository { + // Publicly available Yum repositories constructed from a common repository + // base and a custom repository path. + message PublicRepository { + // Predefined list of publicly available repository bases for Yum. + enum RepositoryBase { + // Unspecified repository base. + REPOSITORY_BASE_UNSPECIFIED = 0; + + // CentOS. + CENTOS = 1; + + // CentOS Debug. + CENTOS_DEBUG = 2; + + // CentOS Vault. + CENTOS_VAULT = 3; + + // CentOS Stream. + CENTOS_STREAM = 4; + + // Rocky. + ROCKY = 5; + + // Fedora Extra Packages for Enterprise Linux (EPEL). + EPEL = 6; + } + + // A common public repository base for Yum. + RepositoryBase repository_base = 1; + + // A custom field to define a path to a specific repository from the base. + string repository_path = 2; + } + + // Address of the remote repository. + oneof upstream { + // One of the publicly available Yum repositories supported by Artifact + // Registry. + PublicRepository public_repository = 1; + } + } + + // Settings specific to the remote repository. + oneof remote_source { + // Specific settings for a Docker remote repository. + DockerRepository docker_repository = 2; + + // Specific settings for a Maven remote repository. + MavenRepository maven_repository = 3; + + // Specific settings for an Npm remote repository. + NpmRepository npm_repository = 4; + + // Specific settings for a Python remote repository. + PythonRepository python_repository = 5; + + // Specific settings for an Apt remote repository. + AptRepository apt_repository = 6; + + // Specific settings for a Yum remote repository. + YumRepository yum_repository = 7; + } + + // The description of the remote source. + string description = 1; + + // Optional. The credentials used to access the remote repository. + UpstreamCredentials upstream_credentials = 9 + [(google.api.field_behavior) = OPTIONAL]; +} // A Repository for storing artifacts with a specific format. message Repository { @@ -62,6 +373,16 @@ message Repository { VersionPolicy version_policy = 2; } + // DockerRepositoryConfig is docker related repository details. + // Provides additional configuration details for repositories of the docker + // format type. + message DockerRepositoryConfig { + // The repository which enabled this flag prevents all tags from being + // modified, moved or deleted. This does not prevent tags from being + // created. + bool immutable_tags = 1; + } + // A package format. enum Format { // Unspecified package format. @@ -84,6 +405,28 @@ message Repository { // Python package format. PYTHON = 8; + + // Kubeflow Pipelines package format. + KFP = 9; + + // Go package format. + GO = 10; + } + + // The mode configures the repository to serve artifacts from different + // sources. + enum Mode { + // Unspecified mode. + MODE_UNSPECIFIED = 0; + + // A standard repository storing artifacts. + STANDARD_REPOSITORY = 1; + + // A virtual repository to serve artifacts from one or more sources. + VIRTUAL_REPOSITORY = 2; + + // A remote repository to serve artifacts from a remote source. + REMOTE_REPOSITORY = 3; } // Repository-specific configurations. @@ -91,14 +434,28 @@ message Repository { // Maven repository config contains repository level configuration // for the repositories of maven type. MavenRepositoryConfig maven_config = 9; + + // Docker repository config contains repository level configuration + // for the repositories of docker type. + DockerRepositoryConfig docker_config = 17; + } + + // Repository configuration specific to the Mode value being selected (Remote + // or Virtual) + oneof mode_config { + // Configuration specific for a Virtual Repository. + VirtualRepositoryConfig virtual_repository_config = 14; + + // Configuration specific for a Remote Repository. + RemoteRepositoryConfig remote_repository_config = 15; } // The name of the repository, for example: - // "projects/p1/locations/us-central1/repositories/repo1". + // `projects/p1/locations/us-central1/repositories/repo1`. string name = 1; - // The format of packages that are stored in the repository. - Format format = 2; + // Optional. The format of packages that are stored in the repository. + Format format = 2 [(google.api.field_behavior) = OPTIONAL]; // The user-provided description of the repository. string description = 3; @@ -110,17 +467,41 @@ message Repository { // and dashes. map labels = 4; - // The time when the repository was created. - google.protobuf.Timestamp create_time = 5; + // Output only. The time when the repository was created. + google.protobuf.Timestamp create_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; - // The time when the repository was last updated. - google.protobuf.Timestamp update_time = 6; + // Output only. The time when the repository was last updated. + google.protobuf.Timestamp update_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; // The Cloud KMS resource name of the customer managed encryption key that's // used to encrypt the contents of the Repository. Has the form: // `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`. // This value may not be changed after the Repository has been created. string kms_key_name = 8; + + // Optional. The mode of the repository. + Mode mode = 10 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Cleanup policies for this repository. Cleanup policies indicate + // when certain package versions can be automatically deleted. Map keys are + // policy IDs supplied by users during policy creation. They must unique + // within a repository and be under 128 characters in length. + map cleanup_policies = 12 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The size, in bytes, of all artifact storage in this + // repository. Repositories that are generally available or in public preview + // use this to calculate storage costs. + int64 size_bytes = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. If set, the repository satisfies physical zone separation. + bool satisfies_pzs = 16 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. If true, the cleanup pipeline is prevented from deleting versions + // in this repository. + bool cleanup_policy_dry_run = 18 [(google.api.field_behavior) = OPTIONAL]; } // The request to list repositories. @@ -173,10 +554,10 @@ message CreateRepositoryRequest { } ]; - // The repository id to use for this repository. + // Required. The repository id to use for this repository. string repository_id = 2 [(google.api.field_behavior) = REQUIRED]; - // The repository to be created. + // Required. The repository to be created. Repository repository = 3 [(google.api.field_behavior) = REQUIRED]; } 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 5edda67a5dc6..574f509d3602 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 @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -276,6 +276,21 @@ service ArtifactRegistry { }; } + // Deletes multiple versions across a repository. The returned operation will + // complete once the versions have been deleted. + rpc BatchDeleteVersions(BatchDeleteVersionsRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/repositories/*/packages/*}/versions:batchDelete" + body: "*" + }; + option (google.api.method_signature) = "parent,names"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata" + }; + } + // Lists files. rpc ListFiles(ListFilesRequest) returns (ListFilesResponse) { option (google.api.http) = { 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 b1f0111e112b..41b8d873a1cb 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 @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/proto/google/devtools/artifactregistry/v1/tag.proto b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/proto/google/devtools/artifactregistry/v1/tag.proto index 818373baf1d9..bd4be6b14638 100644 --- a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/proto/google/devtools/artifactregistry/v1/tag.proto +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/proto/google/devtools/artifactregistry/v1/tag.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -51,7 +51,9 @@ message Tag { // The request to list tags. message ListTagsRequest { - // The name of the parent resource whose tags will be listed. + // The name of the parent package whose tags will be listed. + // For example: + // `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`. string parent = 1; // An expression for filtering the results of the request. Filter rules are 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 b84d7f276be1..684c1e4dc5c3 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 @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -128,6 +128,26 @@ message DeleteVersionRequest { bool force = 2; } +// The request to delete multiple versions across a repository. +message BatchDeleteVersionsRequest { + // The name of the repository holding all requested versions. + string parent = 1 [(google.api.resource_reference) = { + child_type: "artifactregistry.googleapis.com/Version" + }]; + + // Required. The names of the versions to delete. + // A maximum of 10000 versions can be deleted in a batch. + repeated string names = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "artifactregistry.googleapis.com/Version" + } + ]; + + // If true, the request is performed without deleting data, following AIP-163. + bool validate_only = 3; +} + // The metadata of an LRO from deleting multiple versions. message BatchDeleteVersionsMetadata { // The versions the operation failed to delete. 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 index 575e03a76f6a..16cbe5f3720c 100644 --- 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 @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. 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 f55332ae4bb8..015696b6a4ba 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 @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/batchdeleteversions/AsyncBatchDeleteVersions.java b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/batchdeleteversions/AsyncBatchDeleteVersions.java new file mode 100644 index 000000000000..4c4d83ea0077 --- /dev/null +++ b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/batchdeleteversions/AsyncBatchDeleteVersions.java @@ -0,0 +1,54 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS 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_BatchDeleteVersions_async] +import com.google.api.core.ApiFuture; +import com.google.devtools.artifactregistry.v1.ArtifactRegistryClient; +import com.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest; +import com.google.devtools.artifactregistry.v1.PackageName; +import com.google.longrunning.Operation; +import java.util.ArrayList; + +public class AsyncBatchDeleteVersions { + + public static void main(String[] args) throws Exception { + asyncBatchDeleteVersions(); + } + + public static void asyncBatchDeleteVersions() 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()) { + BatchDeleteVersionsRequest request = + BatchDeleteVersionsRequest.newBuilder() + .setParent( + PackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PACKAGE]").toString()) + .addAllNames(new ArrayList()) + .setValidateOnly(true) + .build(); + ApiFuture future = + artifactRegistryClient.batchDeleteVersionsCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END artifactregistry_v1_generated_ArtifactRegistry_BatchDeleteVersions_async] diff --git a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/batchdeleteversions/AsyncBatchDeleteVersionsLRO.java b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/batchdeleteversions/AsyncBatchDeleteVersionsLRO.java new file mode 100644 index 000000000000..e2f868a8e51e --- /dev/null +++ b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/batchdeleteversions/AsyncBatchDeleteVersionsLRO.java @@ -0,0 +1,55 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS 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_BatchDeleteVersions_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.devtools.artifactregistry.v1.ArtifactRegistryClient; +import com.google.devtools.artifactregistry.v1.BatchDeleteVersionsMetadata; +import com.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest; +import com.google.devtools.artifactregistry.v1.PackageName; +import com.google.protobuf.Empty; +import java.util.ArrayList; + +public class AsyncBatchDeleteVersionsLRO { + + public static void main(String[] args) throws Exception { + asyncBatchDeleteVersionsLRO(); + } + + public static void asyncBatchDeleteVersionsLRO() 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()) { + BatchDeleteVersionsRequest request = + BatchDeleteVersionsRequest.newBuilder() + .setParent( + PackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PACKAGE]").toString()) + .addAllNames(new ArrayList()) + .setValidateOnly(true) + .build(); + OperationFuture future = + artifactRegistryClient.batchDeleteVersionsOperationCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END artifactregistry_v1_generated_ArtifactRegistry_BatchDeleteVersions_LRO_async] diff --git a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/batchdeleteversions/SyncBatchDeleteVersions.java b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/batchdeleteversions/SyncBatchDeleteVersions.java new file mode 100644 index 000000000000..7fc77e571d70 --- /dev/null +++ b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/batchdeleteversions/SyncBatchDeleteVersions.java @@ -0,0 +1,50 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS 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_BatchDeleteVersions_sync] +import com.google.devtools.artifactregistry.v1.ArtifactRegistryClient; +import com.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest; +import com.google.devtools.artifactregistry.v1.PackageName; +import com.google.protobuf.Empty; +import java.util.ArrayList; + +public class SyncBatchDeleteVersions { + + public static void main(String[] args) throws Exception { + syncBatchDeleteVersions(); + } + + public static void syncBatchDeleteVersions() 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()) { + BatchDeleteVersionsRequest request = + BatchDeleteVersionsRequest.newBuilder() + .setParent( + PackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PACKAGE]").toString()) + .addAllNames(new ArrayList()) + .setValidateOnly(true) + .build(); + artifactRegistryClient.batchDeleteVersionsAsync(request).get(); + } + } +} +// [END artifactregistry_v1_generated_ArtifactRegistry_BatchDeleteVersions_sync] diff --git a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/batchdeleteversions/SyncBatchDeleteVersionsPackagenameListstring.java b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/batchdeleteversions/SyncBatchDeleteVersionsPackagenameListstring.java new file mode 100644 index 000000000000..75fe39e4f2f1 --- /dev/null +++ b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/batchdeleteversions/SyncBatchDeleteVersionsPackagenameListstring.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS 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_BatchDeleteVersions_PackagenameListstring_sync] +import com.google.devtools.artifactregistry.v1.ArtifactRegistryClient; +import com.google.devtools.artifactregistry.v1.PackageName; +import com.google.protobuf.Empty; +import java.util.ArrayList; +import java.util.List; + +public class SyncBatchDeleteVersionsPackagenameListstring { + + public static void main(String[] args) throws Exception { + syncBatchDeleteVersionsPackagenameListstring(); + } + + public static void syncBatchDeleteVersionsPackagenameListstring() 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 parent = PackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PACKAGE]"); + List names = new ArrayList<>(); + artifactRegistryClient.batchDeleteVersionsAsync(parent, names).get(); + } + } +} +// [END artifactregistry_v1_generated_ArtifactRegistry_BatchDeleteVersions_PackagenameListstring_sync] diff --git a/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/batchdeleteversions/SyncBatchDeleteVersionsStringListstring.java b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/batchdeleteversions/SyncBatchDeleteVersionsStringListstring.java new file mode 100644 index 000000000000..d189e684e2c1 --- /dev/null +++ b/java-artifact-registry/samples/snippets/generated/com/google/devtools/artifactregistry/v1/artifactregistry/batchdeleteversions/SyncBatchDeleteVersionsStringListstring.java @@ -0,0 +1,46 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS 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_BatchDeleteVersions_StringListstring_sync] +import com.google.devtools.artifactregistry.v1.ArtifactRegistryClient; +import com.google.devtools.artifactregistry.v1.PackageName; +import com.google.protobuf.Empty; +import java.util.ArrayList; +import java.util.List; + +public class SyncBatchDeleteVersionsStringListstring { + + public static void main(String[] args) throws Exception { + syncBatchDeleteVersionsStringListstring(); + } + + public static void syncBatchDeleteVersionsStringListstring() 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 = + PackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PACKAGE]").toString(); + List names = new ArrayList<>(); + artifactRegistryClient.batchDeleteVersionsAsync(parent, names).get(); + } + } +} +// [END artifactregistry_v1_generated_ArtifactRegistry_BatchDeleteVersions_StringListstring_sync]