Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions java-artifact-registry/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file:
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>libraries-bom</artifactId>
<version>26.23.0</version>
<version>26.25.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1805,8 +1805,8 @@ public final UnaryCallable<GetRepositoryRequest, Repository> getRepositoryCallab
* }</pre>
*
* @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<Repository, OperationMetadata> createRepositoryAsync(
Expand Down Expand Up @@ -1843,8 +1843,8 @@ public final OperationFuture<Repository, OperationMetadata> createRepositoryAsyn
* }</pre>
*
* @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<Repository, OperationMetadata> createRepositoryAsync(
Expand Down Expand Up @@ -2945,6 +2945,172 @@ public final UnaryCallable<DeleteVersionRequest, Operation> 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.
*
* <p>Sample code:
*
* <pre>{@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<String> names = new ArrayList<>();
* artifactRegistryClient.batchDeleteVersionsAsync(parent, names).get();
* }
* }</pre>
*
* @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<Empty, BatchDeleteVersionsMetadata> batchDeleteVersionsAsync(
PackageName parent, List<String> 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.
*
* <p>Sample code:
*
* <pre>{@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<String> names = new ArrayList<>();
* artifactRegistryClient.batchDeleteVersionsAsync(parent, names).get();
* }
* }</pre>
*
* @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<Empty, BatchDeleteVersionsMetadata> batchDeleteVersionsAsync(
String parent, List<String> 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.
*
* <p>Sample code:
*
* <pre>{@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<String>())
* .setValidateOnly(true)
* .build();
* artifactRegistryClient.batchDeleteVersionsAsync(request).get();
* }
* }</pre>
*
* @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<Empty, BatchDeleteVersionsMetadata> 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.
*
* <p>Sample code:
*
* <pre>{@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<String>())
* .setValidateOnly(true)
* .build();
* OperationFuture<Empty, BatchDeleteVersionsMetadata> future =
* artifactRegistryClient.batchDeleteVersionsOperationCallable().futureCall(request);
* // Do something.
* future.get();
* }
* }</pre>
*/
public final OperationCallable<BatchDeleteVersionsRequest, Empty, BatchDeleteVersionsMetadata>
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.
*
* <p>Sample code:
*
* <pre>{@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<String>())
* .setValidateOnly(true)
* .build();
* ApiFuture<Operation> future =
* artifactRegistryClient.batchDeleteVersionsCallable().futureCall(request);
* // Do something.
* future.get();
* }
* }</pre>
*/
public final UnaryCallable<BatchDeleteVersionsRequest, Operation> batchDeleteVersionsCallable() {
return stub.batchDeleteVersionsCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists files.
Expand Down Expand Up @@ -3239,7 +3405,8 @@ public final UnaryCallable<GetFileRequest, File> getFileCallable() {
* }
* }</pre>
*
* @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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,18 @@ public UnaryCallSettings<DeleteVersionRequest, Operation> deleteVersionSettings(
return ((ArtifactRegistryStubSettings) getStubSettings()).deleteVersionOperationSettings();
}

/** Returns the object with the settings used for calls to batchDeleteVersions. */
public UnaryCallSettings<BatchDeleteVersionsRequest, Operation> batchDeleteVersionsSettings() {
return ((ArtifactRegistryStubSettings) getStubSettings()).batchDeleteVersionsSettings();
}

/** Returns the object with the settings used for calls to batchDeleteVersions. */
public OperationCallSettings<BatchDeleteVersionsRequest, Empty, BatchDeleteVersionsMetadata>
batchDeleteVersionsOperationSettings() {
return ((ArtifactRegistryStubSettings) getStubSettings())
.batchDeleteVersionsOperationSettings();
}

/** Returns the object with the settings used for calls to listFiles. */
public PagedCallSettings<ListFilesRequest, ListFilesResponse, ListFilesPagedResponse>
listFilesSettings() {
Expand Down Expand Up @@ -617,6 +629,19 @@ public UnaryCallSettings.Builder<DeleteVersionRequest, Operation> deleteVersionS
return getStubSettingsBuilder().deleteVersionOperationSettings();
}

/** Returns the builder for the settings used for calls to batchDeleteVersions. */
public UnaryCallSettings.Builder<BatchDeleteVersionsRequest, Operation>
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<ListFilesRequest, ListFilesResponse, ListFilesPagedResponse>
listFilesSettings() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
"grpc": {
"libraryClient": "ArtifactRegistryClient",
"rpcs": {
"BatchDeleteVersions": {
"methods": ["batchDeleteVersionsAsync", "batchDeleteVersionsAsync", "batchDeleteVersionsAsync", "batchDeleteVersionsOperationCallable", "batchDeleteVersionsCallable"]
},
"CreateRepository": {
"methods": ["createRepositoryAsync", "createRepositoryAsync", "createRepositoryAsync", "createRepositoryOperationCallable", "createRepositoryCallable"]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -273,6 +275,16 @@ public UnaryCallable<DeleteVersionRequest, Operation> deleteVersionCallable() {
throw new UnsupportedOperationException("Not implemented: deleteVersionCallable()");
}

public OperationCallable<BatchDeleteVersionsRequest, Empty, BatchDeleteVersionsMetadata>
batchDeleteVersionsOperationCallable() {
throw new UnsupportedOperationException(
"Not implemented: batchDeleteVersionsOperationCallable()");
}

public UnaryCallable<BatchDeleteVersionsRequest, Operation> batchDeleteVersionsCallable() {
throw new UnsupportedOperationException("Not implemented: batchDeleteVersionsCallable()");
}

public UnaryCallable<ListFilesRequest, ListFilesPagedResponse> listFilesPagedCallable() {
throw new UnsupportedOperationException("Not implemented: listFilesPagedCallable()");
}
Expand Down
Loading