Skip to content
This repository has been archived by the owner on Sep 27, 2023. It is now read-only.

Commit

Permalink
feat: new generated features
Browse files Browse the repository at this point in the history
* changes without context

        autosynth cannot find the source of changes triggered by earlier changes in this
        repository, or by version upgrades to tools such as linters.

* feat: Deprecated SearchAssignments in favor of SearchAllAssignments feat: Reservation objects now contain a creation time and an update time feat: Added commitment_start_time to capacity commitments feat: Force deleting capacity commitments is allowed while reservations with active assignments exist feat: ML_EXTERNAL job type is supported feat: Optional id can be passed into CreateCapacityCommitment and CreateAssignment docs: Clarified docs for None assignments fix!: Fixed pattern for BiReservation object BREAKING_CHANGE: Changed from `bireservation` to `biReservation`

PiperOrigin-RevId: 394129271

Source-Author: Google APIs <noreply@google.com>
Source-Date: Tue Aug 31 18:31:20 2021 -0700
Source-Repo: googleapis/googleapis
Source-Sha: 2c7f233a072ce7acf72a1db871a94a7c3e8ad36e
Source-Link: googleapis/googleapis@2c7f233

* 🦉 Updates from OwlBot

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
yoshi-automation and gcf-owl-bot[bot] committed Sep 1, 2021
1 parent 448c9d3 commit 9f89c0f
Show file tree
Hide file tree
Showing 34 changed files with 5,608 additions and 328 deletions.
6 changes: 3 additions & 3 deletions README.md
Expand Up @@ -19,20 +19,20 @@ If you are using Maven, add this to your pom.xml file:
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-bigqueryreservation</artifactId>
<version>2.0.2</version>
<version>2.0.3</version>
</dependency>
```

If you are using Gradle without BOM, add this to your dependencies

```Groovy
implementation 'com.google.cloud:google-cloud-bigqueryreservation:2.0.2'
implementation 'com.google.cloud:google-cloud-bigqueryreservation:2.0.3'
```

If you are using SBT, add this to your dependencies

```Scala
libraryDependencies += "com.google.cloud" % "google-cloud-bigqueryreservation" % "2.0.2"
libraryDependencies += "com.google.cloud" % "google-cloud-bigqueryreservation" % "2.0.3"
```

## Authentication
Expand Down

Large diffs are not rendered by default.

Expand Up @@ -19,6 +19,7 @@
import static com.google.cloud.bigquery.reservation.v1.ReservationServiceClient.ListAssignmentsPagedResponse;
import static com.google.cloud.bigquery.reservation.v1.ReservationServiceClient.ListCapacityCommitmentsPagedResponse;
import static com.google.cloud.bigquery.reservation.v1.ReservationServiceClient.ListReservationsPagedResponse;
import static com.google.cloud.bigquery.reservation.v1.ReservationServiceClient.SearchAllAssignmentsPagedResponse;
import static com.google.cloud.bigquery.reservation.v1.ReservationServiceClient.SearchAssignmentsPagedResponse;

import com.google.api.core.ApiFunction;
Expand Down Expand Up @@ -164,13 +165,27 @@ public UnaryCallSettings<DeleteAssignmentRequest, Empty> deleteAssignmentSetting
return ((ReservationServiceStubSettings) getStubSettings()).deleteAssignmentSettings();
}

/** Returns the object with the settings used for calls to searchAssignments. */
/**
* Returns the object with the settings used for calls to searchAssignments.
*
* @deprecated This method is deprecated and will be removed in the next major version update.
*/
@Deprecated
public PagedCallSettings<
SearchAssignmentsRequest, SearchAssignmentsResponse, SearchAssignmentsPagedResponse>
searchAssignmentsSettings() {
return ((ReservationServiceStubSettings) getStubSettings()).searchAssignmentsSettings();
}

/** Returns the object with the settings used for calls to searchAllAssignments. */
public PagedCallSettings<
SearchAllAssignmentsRequest,
SearchAllAssignmentsResponse,
SearchAllAssignmentsPagedResponse>
searchAllAssignmentsSettings() {
return ((ReservationServiceStubSettings) getStubSettings()).searchAllAssignmentsSettings();
}

/** Returns the object with the settings used for calls to moveAssignment. */
public UnaryCallSettings<MoveAssignmentRequest, Assignment> moveAssignmentSettings() {
return ((ReservationServiceStubSettings) getStubSettings()).moveAssignmentSettings();
Expand Down Expand Up @@ -377,13 +392,27 @@ public UnaryCallSettings.Builder<DeleteAssignmentRequest, Empty> deleteAssignmen
return getStubSettingsBuilder().deleteAssignmentSettings();
}

/** Returns the builder for the settings used for calls to searchAssignments. */
/**
* Returns the builder for the settings used for calls to searchAssignments.
*
* @deprecated This method is deprecated and will be removed in the next major version update.
*/
@Deprecated
public PagedCallSettings.Builder<
SearchAssignmentsRequest, SearchAssignmentsResponse, SearchAssignmentsPagedResponse>
searchAssignmentsSettings() {
return getStubSettingsBuilder().searchAssignmentsSettings();
}

/** Returns the builder for the settings used for calls to searchAllAssignments. */
public PagedCallSettings.Builder<
SearchAllAssignmentsRequest,
SearchAllAssignmentsResponse,
SearchAllAssignmentsPagedResponse>
searchAllAssignmentsSettings() {
return getStubSettingsBuilder().searchAllAssignmentsSettings();
}

/** Returns the builder for the settings used for calls to moveAssignment. */
public UnaryCallSettings.Builder<MoveAssignmentRequest, Assignment> moveAssignmentSettings() {
return getStubSettingsBuilder().moveAssignmentSettings();
Expand Down
Expand Up @@ -52,6 +52,9 @@
"MoveAssignment": {
"methods": ["moveAssignment", "moveAssignment", "moveAssignment", "moveAssignment", "moveAssignment", "moveAssignmentCallable"]
},
"SearchAllAssignments": {
"methods": ["searchAllAssignments", "searchAllAssignments", "searchAllAssignments", "searchAllAssignmentsPagedCallable", "searchAllAssignmentsCallable"]
},
"SearchAssignments": {
"methods": ["searchAssignments", "searchAssignments", "searchAssignments", "searchAssignmentsPagedCallable", "searchAssignmentsCallable"]
},
Expand Down
Expand Up @@ -15,7 +15,9 @@
*/

/**
* The interfaces provided are listed below, along with usage samples.
* A client to BigQuery Reservation API
*
* <p>The interfaces provided are listed below, along with usage samples.
*
* <p>======================= ReservationServiceClient =======================
*
Expand Down
Expand Up @@ -19,6 +19,7 @@
import static com.google.cloud.bigquery.reservation.v1.ReservationServiceClient.ListAssignmentsPagedResponse;
import static com.google.cloud.bigquery.reservation.v1.ReservationServiceClient.ListCapacityCommitmentsPagedResponse;
import static com.google.cloud.bigquery.reservation.v1.ReservationServiceClient.ListReservationsPagedResponse;
import static com.google.cloud.bigquery.reservation.v1.ReservationServiceClient.SearchAllAssignmentsPagedResponse;
import static com.google.cloud.bigquery.reservation.v1.ReservationServiceClient.SearchAssignmentsPagedResponse;

import com.google.api.gax.core.BackgroundResource;
Expand Down Expand Up @@ -48,6 +49,8 @@
import com.google.cloud.bigquery.reservation.v1.MergeCapacityCommitmentsRequest;
import com.google.cloud.bigquery.reservation.v1.MoveAssignmentRequest;
import com.google.cloud.bigquery.reservation.v1.Reservation;
import com.google.cloud.bigquery.reservation.v1.SearchAllAssignmentsRequest;
import com.google.cloud.bigquery.reservation.v1.SearchAllAssignmentsResponse;
import com.google.cloud.bigquery.reservation.v1.SearchAssignmentsRequest;
import com.google.cloud.bigquery.reservation.v1.SearchAssignmentsResponse;
import com.google.cloud.bigquery.reservation.v1.SplitCapacityCommitmentRequest;
Expand Down Expand Up @@ -257,6 +260,18 @@ public class GrpcReservationServiceStub extends ReservationServiceStub {
ProtoUtils.marshaller(SearchAssignmentsResponse.getDefaultInstance()))
.build();

private static final MethodDescriptor<SearchAllAssignmentsRequest, SearchAllAssignmentsResponse>
searchAllAssignmentsMethodDescriptor =
MethodDescriptor.<SearchAllAssignmentsRequest, SearchAllAssignmentsResponse>newBuilder()
.setType(MethodDescriptor.MethodType.UNARY)
.setFullMethodName(
"google.cloud.bigquery.reservation.v1.ReservationService/SearchAllAssignments")
.setRequestMarshaller(
ProtoUtils.marshaller(SearchAllAssignmentsRequest.getDefaultInstance()))
.setResponseMarshaller(
ProtoUtils.marshaller(SearchAllAssignmentsResponse.getDefaultInstance()))
.build();

private static final MethodDescriptor<MoveAssignmentRequest, Assignment>
moveAssignmentMethodDescriptor =
MethodDescriptor.<MoveAssignmentRequest, Assignment>newBuilder()
Expand Down Expand Up @@ -324,6 +339,10 @@ public class GrpcReservationServiceStub extends ReservationServiceStub {
searchAssignmentsCallable;
private final UnaryCallable<SearchAssignmentsRequest, SearchAssignmentsPagedResponse>
searchAssignmentsPagedCallable;
private final UnaryCallable<SearchAllAssignmentsRequest, SearchAllAssignmentsResponse>
searchAllAssignmentsCallable;
private final UnaryCallable<SearchAllAssignmentsRequest, SearchAllAssignmentsPagedResponse>
searchAllAssignmentsPagedCallable;
private final UnaryCallable<MoveAssignmentRequest, Assignment> moveAssignmentCallable;
private final UnaryCallable<GetBiReservationRequest, BiReservation> getBiReservationCallable;
private final UnaryCallable<UpdateBiReservationRequest, BiReservation>
Expand Down Expand Up @@ -548,6 +567,17 @@ protected GrpcReservationServiceStub(
return params.build();
})
.build();
GrpcCallSettings<SearchAllAssignmentsRequest, SearchAllAssignmentsResponse>
searchAllAssignmentsTransportSettings =
GrpcCallSettings.<SearchAllAssignmentsRequest, SearchAllAssignmentsResponse>newBuilder()
.setMethodDescriptor(searchAllAssignmentsMethodDescriptor)
.setParamsExtractor(
request -> {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("parent", String.valueOf(request.getParent()));
return params.build();
})
.build();
GrpcCallSettings<MoveAssignmentRequest, Assignment> moveAssignmentTransportSettings =
GrpcCallSettings.<MoveAssignmentRequest, Assignment>newBuilder()
.setMethodDescriptor(moveAssignmentMethodDescriptor)
Expand Down Expand Up @@ -668,6 +698,16 @@ protected GrpcReservationServiceStub(
searchAssignmentsTransportSettings,
settings.searchAssignmentsSettings(),
clientContext);
this.searchAllAssignmentsCallable =
callableFactory.createUnaryCallable(
searchAllAssignmentsTransportSettings,
settings.searchAllAssignmentsSettings(),
clientContext);
this.searchAllAssignmentsPagedCallable =
callableFactory.createPagedCallable(
searchAllAssignmentsTransportSettings,
settings.searchAllAssignmentsSettings(),
clientContext);
this.moveAssignmentCallable =
callableFactory.createUnaryCallable(
moveAssignmentTransportSettings, settings.moveAssignmentSettings(), clientContext);
Expand Down Expand Up @@ -800,6 +840,18 @@ public UnaryCallable<DeleteAssignmentRequest, Empty> deleteAssignmentCallable()
return searchAssignmentsPagedCallable;
}

@Override
public UnaryCallable<SearchAllAssignmentsRequest, SearchAllAssignmentsResponse>
searchAllAssignmentsCallable() {
return searchAllAssignmentsCallable;
}

@Override
public UnaryCallable<SearchAllAssignmentsRequest, SearchAllAssignmentsPagedResponse>
searchAllAssignmentsPagedCallable() {
return searchAllAssignmentsPagedCallable;
}

@Override
public UnaryCallable<MoveAssignmentRequest, Assignment> moveAssignmentCallable() {
return moveAssignmentCallable;
Expand Down
Expand Up @@ -19,6 +19,7 @@
import static com.google.cloud.bigquery.reservation.v1.ReservationServiceClient.ListAssignmentsPagedResponse;
import static com.google.cloud.bigquery.reservation.v1.ReservationServiceClient.ListCapacityCommitmentsPagedResponse;
import static com.google.cloud.bigquery.reservation.v1.ReservationServiceClient.ListReservationsPagedResponse;
import static com.google.cloud.bigquery.reservation.v1.ReservationServiceClient.SearchAllAssignmentsPagedResponse;
import static com.google.cloud.bigquery.reservation.v1.ReservationServiceClient.SearchAssignmentsPagedResponse;

import com.google.api.gax.core.BackgroundResource;
Expand All @@ -44,6 +45,8 @@
import com.google.cloud.bigquery.reservation.v1.MergeCapacityCommitmentsRequest;
import com.google.cloud.bigquery.reservation.v1.MoveAssignmentRequest;
import com.google.cloud.bigquery.reservation.v1.Reservation;
import com.google.cloud.bigquery.reservation.v1.SearchAllAssignmentsRequest;
import com.google.cloud.bigquery.reservation.v1.SearchAllAssignmentsResponse;
import com.google.cloud.bigquery.reservation.v1.SearchAssignmentsRequest;
import com.google.cloud.bigquery.reservation.v1.SearchAssignmentsResponse;
import com.google.cloud.bigquery.reservation.v1.SplitCapacityCommitmentRequest;
Expand Down Expand Up @@ -146,16 +149,28 @@ public UnaryCallable<DeleteAssignmentRequest, Empty> deleteAssignmentCallable()
throw new UnsupportedOperationException("Not implemented: deleteAssignmentCallable()");
}

@Deprecated
public UnaryCallable<SearchAssignmentsRequest, SearchAssignmentsPagedResponse>
searchAssignmentsPagedCallable() {
throw new UnsupportedOperationException("Not implemented: searchAssignmentsPagedCallable()");
}

@Deprecated
public UnaryCallable<SearchAssignmentsRequest, SearchAssignmentsResponse>
searchAssignmentsCallable() {
throw new UnsupportedOperationException("Not implemented: searchAssignmentsCallable()");
}

public UnaryCallable<SearchAllAssignmentsRequest, SearchAllAssignmentsPagedResponse>
searchAllAssignmentsPagedCallable() {
throw new UnsupportedOperationException("Not implemented: searchAllAssignmentsPagedCallable()");
}

public UnaryCallable<SearchAllAssignmentsRequest, SearchAllAssignmentsResponse>
searchAllAssignmentsCallable() {
throw new UnsupportedOperationException("Not implemented: searchAllAssignmentsCallable()");
}

public UnaryCallable<MoveAssignmentRequest, Assignment> moveAssignmentCallable() {
throw new UnsupportedOperationException("Not implemented: moveAssignmentCallable()");
}
Expand Down

0 comments on commit 9f89c0f

Please sign in to comment.