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

Commit

Permalink
feat: TPU v2alpha1 public protos
Browse files Browse the repository at this point in the history
Committer: @rosbo
PiperOrigin-RevId: 403400668

Source-Link: googleapis/googleapis@8f48b97

Source-Link: googleapis/googleapis-gen@f966fd0
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZjk2NmZkMDJiZDBkMjQ4ZTlhZGVmZmUzYmIyZGFhNTNiZjQ0YTI1MiJ9
  • Loading branch information
gcf-owl-bot[bot] committed Oct 19, 2021
1 parent 04c7469 commit e5cb327
Show file tree
Hide file tree
Showing 153 changed files with 52,616 additions and 10,217 deletions.
1,462 changes: 0 additions & 1,462 deletions grpc-google-cloud-tpu-v1/src/main/java/com/google/cloud/tpu/v1/TpuGrpc.java

This file was deleted.

Expand Up @@ -60,13 +60,13 @@
* methods:
*
* <ol>
* <li>A "flattened" method. With this type of method, the fields of the request type have been
* <li> A "flattened" method. With this type of method, the fields of the request type have been
* converted into function parameters. It may be the case that not all fields are available as
* parameters, and not every API method will have a flattened method entry point.
* <li>A "request object" method. This type of method only takes one parameter, a request object,
* <li> A "request object" method. This type of method only takes one parameter, a request object,
* which must be constructed before the call. Not every API method will have a request object
* method.
* <li>A "callable" method. This type of method takes no parameters and returns an immutable API
* <li> A "callable" method. This type of method takes no parameters and returns an immutable API
* callable object, which can be used to initiate calls to the service.
* </ol>
*
Expand Down Expand Up @@ -1425,11 +1425,8 @@ protected ListNodesFixedSizeCollection createCollection(

public static class ListTensorFlowVersionsPagedResponse
extends AbstractPagedListResponse<
ListTensorFlowVersionsRequest,
ListTensorFlowVersionsResponse,
TensorFlowVersion,
ListTensorFlowVersionsPage,
ListTensorFlowVersionsFixedSizeCollection> {
ListTensorFlowVersionsRequest, ListTensorFlowVersionsResponse, TensorFlowVersion,
ListTensorFlowVersionsPage, ListTensorFlowVersionsFixedSizeCollection> {

public static ApiFuture<ListTensorFlowVersionsPagedResponse> createAsync(
PageContext<
Expand All @@ -1451,9 +1448,7 @@ private ListTensorFlowVersionsPagedResponse(ListTensorFlowVersionsPage page) {

public static class ListTensorFlowVersionsPage
extends AbstractPage<
ListTensorFlowVersionsRequest,
ListTensorFlowVersionsResponse,
TensorFlowVersion,
ListTensorFlowVersionsRequest, ListTensorFlowVersionsResponse, TensorFlowVersion,
ListTensorFlowVersionsPage> {

private ListTensorFlowVersionsPage(
Expand Down Expand Up @@ -1489,11 +1484,8 @@ public ApiFuture<ListTensorFlowVersionsPage> createPageAsync(

public static class ListTensorFlowVersionsFixedSizeCollection
extends AbstractFixedSizeCollection<
ListTensorFlowVersionsRequest,
ListTensorFlowVersionsResponse,
TensorFlowVersion,
ListTensorFlowVersionsPage,
ListTensorFlowVersionsFixedSizeCollection> {
ListTensorFlowVersionsRequest, ListTensorFlowVersionsResponse, TensorFlowVersion,
ListTensorFlowVersionsPage, ListTensorFlowVersionsFixedSizeCollection> {

private ListTensorFlowVersionsFixedSizeCollection(
List<ListTensorFlowVersionsPage> pages, int collectionSize) {
Expand All @@ -1513,11 +1505,8 @@ protected ListTensorFlowVersionsFixedSizeCollection createCollection(

public static class ListAcceleratorTypesPagedResponse
extends AbstractPagedListResponse<
ListAcceleratorTypesRequest,
ListAcceleratorTypesResponse,
AcceleratorType,
ListAcceleratorTypesPage,
ListAcceleratorTypesFixedSizeCollection> {
ListAcceleratorTypesRequest, ListAcceleratorTypesResponse, AcceleratorType,
ListAcceleratorTypesPage, ListAcceleratorTypesFixedSizeCollection> {

public static ApiFuture<ListAcceleratorTypesPagedResponse> createAsync(
PageContext<ListAcceleratorTypesRequest, ListAcceleratorTypesResponse, AcceleratorType>
Expand All @@ -1538,9 +1527,7 @@ private ListAcceleratorTypesPagedResponse(ListAcceleratorTypesPage page) {

public static class ListAcceleratorTypesPage
extends AbstractPage<
ListAcceleratorTypesRequest,
ListAcceleratorTypesResponse,
AcceleratorType,
ListAcceleratorTypesRequest, ListAcceleratorTypesResponse, AcceleratorType,
ListAcceleratorTypesPage> {

private ListAcceleratorTypesPage(
Expand Down Expand Up @@ -1573,11 +1560,8 @@ public ApiFuture<ListAcceleratorTypesPage> createPageAsync(

public static class ListAcceleratorTypesFixedSizeCollection
extends AbstractFixedSizeCollection<
ListAcceleratorTypesRequest,
ListAcceleratorTypesResponse,
AcceleratorType,
ListAcceleratorTypesPage,
ListAcceleratorTypesFixedSizeCollection> {
ListAcceleratorTypesRequest, ListAcceleratorTypesResponse, AcceleratorType,
ListAcceleratorTypesPage, ListAcceleratorTypesFixedSizeCollection> {

private ListAcceleratorTypesFixedSizeCollection(
List<ListAcceleratorTypesPage> pages, int collectionSize) {
Expand Down
Expand Up @@ -30,6 +30,7 @@
import com.google.api.gax.rpc.ClientSettings;
import com.google.api.gax.rpc.OperationCallSettings;
import com.google.api.gax.rpc.PagedCallSettings;
import com.google.api.gax.rpc.StubSettings;
import com.google.api.gax.rpc.TransportChannelProvider;
import com.google.api.gax.rpc.UnaryCallSettings;
import com.google.cloud.tpu.v1.stub.TpuStubSettings;
Expand All @@ -45,9 +46,9 @@
* <p>The default instance has everything set to sensible defaults:
*
* <ul>
* <li>The default service address (tpu.googleapis.com) and default port (443) are used.
* <li>Credentials are acquired automatically through Application Default Credentials.
* <li>Retries are configured for idempotent methods but not for non-idempotent methods.
* <li> The default service address (tpu.googleapis.com) and default port (443) are used.
* <li> Credentials are acquired automatically through Application Default Credentials.
* <li> Retries are configured for idempotent methods but not for non-idempotent methods.
* </ul>
*
* <p>The builder of this class is recursive, so contained classes are themselves builders. When
Expand Down Expand Up @@ -140,8 +141,7 @@ public UnaryCallSettings<StartNodeRequest, Operation> startNodeSettings() {

/** Returns the object with the settings used for calls to listTensorFlowVersions. */
public PagedCallSettings<
ListTensorFlowVersionsRequest,
ListTensorFlowVersionsResponse,
ListTensorFlowVersionsRequest, ListTensorFlowVersionsResponse,
ListTensorFlowVersionsPagedResponse>
listTensorFlowVersionsSettings() {
return ((TpuStubSettings) getStubSettings()).listTensorFlowVersionsSettings();
Expand All @@ -155,8 +155,7 @@ public UnaryCallSettings<StartNodeRequest, Operation> startNodeSettings() {

/** Returns the object with the settings used for calls to listAcceleratorTypes. */
public PagedCallSettings<
ListAcceleratorTypesRequest,
ListAcceleratorTypesResponse,
ListAcceleratorTypesRequest, ListAcceleratorTypesResponse,
ListAcceleratorTypesPagedResponse>
listAcceleratorTypesSettings() {
return ((TpuStubSettings) getStubSettings()).listAcceleratorTypesSettings();
Expand Down Expand Up @@ -332,8 +331,7 @@ public UnaryCallSettings.Builder<StartNodeRequest, Operation> startNodeSettings(

/** Returns the builder for the settings used for calls to listTensorFlowVersions. */
public PagedCallSettings.Builder<
ListTensorFlowVersionsRequest,
ListTensorFlowVersionsResponse,
ListTensorFlowVersionsRequest, ListTensorFlowVersionsResponse,
ListTensorFlowVersionsPagedResponse>
listTensorFlowVersionsSettings() {
return getStubSettingsBuilder().listTensorFlowVersionsSettings();
Expand All @@ -347,8 +345,7 @@ public UnaryCallSettings.Builder<StartNodeRequest, Operation> startNodeSettings(

/** Returns the builder for the settings used for calls to listAcceleratorTypes. */
public PagedCallSettings.Builder<
ListAcceleratorTypesRequest,
ListAcceleratorTypesResponse,
ListAcceleratorTypesRequest, ListAcceleratorTypesResponse,
ListAcceleratorTypesPagedResponse>
listAcceleratorTypesSettings() {
return getStubSettingsBuilder().listAcceleratorTypesSettings();
Expand Down
Expand Up @@ -51,6 +51,7 @@
import io.grpc.MethodDescriptor;
import io.grpc.protobuf.ProtoUtils;
import java.io.IOException;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import javax.annotation.Generated;

Expand Down
Expand Up @@ -81,9 +81,9 @@
* <p>The default instance has everything set to sensible defaults:
*
* <ul>
* <li>The default service address (tpu.googleapis.com) and default port (443) are used.
* <li>Credentials are acquired automatically through Application Default Credentials.
* <li>Retries are configured for idempotent methods but not for non-idempotent methods.
* <li> The default service address (tpu.googleapis.com) and default port (443) are used.
* <li> Credentials are acquired automatically through Application Default Credentials.
* <li> Retries are configured for idempotent methods but not for non-idempotent methods.
* </ul>
*
* <p>The builder of this class is recursive, so contained classes are themselves builders. When
Expand Down Expand Up @@ -130,15 +130,13 @@ public class TpuStubSettings extends StubSettings<TpuStubSettings> {
private final OperationCallSettings<StartNodeRequest, Node, OperationMetadata>
startNodeOperationSettings;
private final PagedCallSettings<
ListTensorFlowVersionsRequest,
ListTensorFlowVersionsResponse,
ListTensorFlowVersionsRequest, ListTensorFlowVersionsResponse,
ListTensorFlowVersionsPagedResponse>
listTensorFlowVersionsSettings;
private final UnaryCallSettings<GetTensorFlowVersionRequest, TensorFlowVersion>
getTensorFlowVersionSettings;
private final PagedCallSettings<
ListAcceleratorTypesRequest,
ListAcceleratorTypesResponse,
ListAcceleratorTypesRequest, ListAcceleratorTypesResponse,
ListAcceleratorTypesPagedResponse>
listAcceleratorTypesSettings;
private final UnaryCallSettings<GetAcceleratorTypeRequest, AcceleratorType>
Expand Down Expand Up @@ -282,13 +280,11 @@ public ApiFuture<ListNodesPagedResponse> getFuturePagedResponse(
};

private static final PagedListResponseFactory<
ListTensorFlowVersionsRequest,
ListTensorFlowVersionsResponse,
ListTensorFlowVersionsRequest, ListTensorFlowVersionsResponse,
ListTensorFlowVersionsPagedResponse>
LIST_TENSOR_FLOW_VERSIONS_PAGE_STR_FACT =
new PagedListResponseFactory<
ListTensorFlowVersionsRequest,
ListTensorFlowVersionsResponse,
ListTensorFlowVersionsRequest, ListTensorFlowVersionsResponse,
ListTensorFlowVersionsPagedResponse>() {
@Override
public ApiFuture<ListTensorFlowVersionsPagedResponse> getFuturePagedResponse(
Expand All @@ -298,8 +294,7 @@ public ApiFuture<ListTensorFlowVersionsPagedResponse> getFuturePagedResponse(
ApiCallContext context,
ApiFuture<ListTensorFlowVersionsResponse> futureResponse) {
PageContext<
ListTensorFlowVersionsRequest,
ListTensorFlowVersionsResponse,
ListTensorFlowVersionsRequest, ListTensorFlowVersionsResponse,
TensorFlowVersion>
pageContext =
PageContext.create(
Expand All @@ -309,13 +304,11 @@ public ApiFuture<ListTensorFlowVersionsPagedResponse> getFuturePagedResponse(
};

private static final PagedListResponseFactory<
ListAcceleratorTypesRequest,
ListAcceleratorTypesResponse,
ListAcceleratorTypesRequest, ListAcceleratorTypesResponse,
ListAcceleratorTypesPagedResponse>
LIST_ACCELERATOR_TYPES_PAGE_STR_FACT =
new PagedListResponseFactory<
ListAcceleratorTypesRequest,
ListAcceleratorTypesResponse,
ListAcceleratorTypesRequest, ListAcceleratorTypesResponse,
ListAcceleratorTypesPagedResponse>() {
@Override
public ApiFuture<ListAcceleratorTypesPagedResponse> getFuturePagedResponse(
Expand Down Expand Up @@ -400,8 +393,7 @@ public UnaryCallSettings<StartNodeRequest, Operation> startNodeSettings() {

/** Returns the object with the settings used for calls to listTensorFlowVersions. */
public PagedCallSettings<
ListTensorFlowVersionsRequest,
ListTensorFlowVersionsResponse,
ListTensorFlowVersionsRequest, ListTensorFlowVersionsResponse,
ListTensorFlowVersionsPagedResponse>
listTensorFlowVersionsSettings() {
return listTensorFlowVersionsSettings;
Expand All @@ -415,8 +407,7 @@ public UnaryCallSettings<StartNodeRequest, Operation> startNodeSettings() {

/** Returns the object with the settings used for calls to listAcceleratorTypes. */
public PagedCallSettings<
ListAcceleratorTypesRequest,
ListAcceleratorTypesResponse,
ListAcceleratorTypesRequest, ListAcceleratorTypesResponse,
ListAcceleratorTypesPagedResponse>
listAcceleratorTypesSettings() {
return listAcceleratorTypesSettings;
Expand Down Expand Up @@ -462,7 +453,9 @@ public static List<String> getDefaultServiceScopes() {

/** Returns a builder for the default credentials for this service. */
public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() {
return GoogleCredentialsProvider.newBuilder().setScopesToApply(DEFAULT_SERVICE_SCOPES);
return GoogleCredentialsProvider.newBuilder()
.setScopesToApply(DEFAULT_SERVICE_SCOPES)
.setUseJwtAccessWithScope(true);
}

/** Returns a builder for the default ChannelProvider for this service. */
Expand Down Expand Up @@ -542,15 +535,13 @@ public static class Builder extends StubSettings.Builder<TpuStubSettings, Builde
private final OperationCallSettings.Builder<StartNodeRequest, Node, OperationMetadata>
startNodeOperationSettings;
private final PagedCallSettings.Builder<
ListTensorFlowVersionsRequest,
ListTensorFlowVersionsResponse,
ListTensorFlowVersionsRequest, ListTensorFlowVersionsResponse,
ListTensorFlowVersionsPagedResponse>
listTensorFlowVersionsSettings;
private final UnaryCallSettings.Builder<GetTensorFlowVersionRequest, TensorFlowVersion>
getTensorFlowVersionSettings;
private final PagedCallSettings.Builder<
ListAcceleratorTypesRequest,
ListAcceleratorTypesResponse,
ListAcceleratorTypesRequest, ListAcceleratorTypesResponse,
ListAcceleratorTypesPagedResponse>
listAcceleratorTypesSettings;
private final UnaryCallSettings.Builder<GetAcceleratorTypeRequest, AcceleratorType>
Expand Down Expand Up @@ -934,8 +925,7 @@ public UnaryCallSettings.Builder<StartNodeRequest, Operation> startNodeSettings(

/** Returns the builder for the settings used for calls to listTensorFlowVersions. */
public PagedCallSettings.Builder<
ListTensorFlowVersionsRequest,
ListTensorFlowVersionsResponse,
ListTensorFlowVersionsRequest, ListTensorFlowVersionsResponse,
ListTensorFlowVersionsPagedResponse>
listTensorFlowVersionsSettings() {
return listTensorFlowVersionsSettings;
Expand All @@ -949,8 +939,7 @@ public UnaryCallSettings.Builder<StartNodeRequest, Operation> startNodeSettings(

/** Returns the builder for the settings used for calls to listAcceleratorTypes. */
public PagedCallSettings.Builder<
ListAcceleratorTypesRequest,
ListAcceleratorTypesResponse,
ListAcceleratorTypesRequest, ListAcceleratorTypesResponse,
ListAcceleratorTypesPagedResponse>
listAcceleratorTypesSettings() {
return listAcceleratorTypesSettings;
Expand Down

0 comments on commit e5cb327

Please sign in to comment.