@Override public Paginated<InstanceConfig> listInstanceConfigs(int pageSize, @Nullable String pageToken) throws SpannerException { ListInstanceConfigsRequest.Builder requestBuilder = ListInstanceConfigsRequest.newBuilder().setParent(projectName).setPageSize(pageSize); if (pageToken != null) { requestBuilder.setPageToken(pageToken); } ListInstanceConfigsRequest request = requestBuilder.build(); GrpcCallContext context = newCallContext(null, projectName); ListInstanceConfigsResponse response = get(instanceAdminStub.listInstanceConfigsCallable().futureCall(request, context)); return new Paginated<>(response.getInstanceConfigsList(), response.getNextPageToken()); }
@Override public Paginated<InstanceConfig> listInstanceConfigs(int pageSize, @Nullable String pageToken) throws SpannerException { ListInstanceConfigsRequest.Builder requestBuilder = ListInstanceConfigsRequest.newBuilder().setParent(projectName).setPageSize(pageSize); if (pageToken != null) { requestBuilder.setPageToken(pageToken); } ListInstanceConfigsRequest request = requestBuilder.build(); GrpcCallContext context = newCallContext(null, projectName); ListInstanceConfigsResponse response = get(instanceAdminStub.listInstanceConfigsCallable().futureCall(request, context)); return new Paginated<>(response.getInstanceConfigsList(), response.getNextPageToken()); }
/** * Lists the supported instance configurations for a given project. * * <p>Sample code: * * <pre><code> * try (InstanceAdminClient instanceAdminClient = InstanceAdminClient.create()) { * ProjectName parent = ProjectName.of("[PROJECT]"); * for (InstanceConfig element : instanceAdminClient.listInstanceConfigs(parent.toString()).iterateAll()) { * // doThingsWith(element); * } * } * </code></pre> * * @param parent Required. The name of the project for which a list of supported instance * configurations is requested. Values are of the form `projects/<project>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListInstanceConfigsPagedResponse listInstanceConfigs(String parent) { ListInstanceConfigsRequest request = ListInstanceConfigsRequest.newBuilder().setParent(parent).build(); return listInstanceConfigs(request); }
/** * Lists the supported instance configurations for a given project. * * <p>Sample code: * * <pre><code> * try (InstanceAdminClient instanceAdminClient = InstanceAdminClient.create()) { * ProjectName parent = ProjectName.of("[PROJECT]"); * for (InstanceConfig element : instanceAdminClient.listInstanceConfigs(parent).iterateAll()) { * // doThingsWith(element); * } * } * </code></pre> * * @param parent Required. The name of the project for which a list of supported instance * configurations is requested. Values are of the form `projects/<project>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListInstanceConfigsPagedResponse listInstanceConfigs(ProjectName parent) { ListInstanceConfigsRequest request = ListInstanceConfigsRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .build(); return listInstanceConfigs(request); }
@Override public ListInstanceConfigsRequest injectToken( ListInstanceConfigsRequest payload, String token) { return ListInstanceConfigsRequest.newBuilder(payload).setPageToken(token).build(); }
@Override public ListInstanceConfigsRequest injectPageSize( ListInstanceConfigsRequest payload, int pageSize) { return ListInstanceConfigsRequest.newBuilder(payload).setPageSize(pageSize).build(); }
/** * Lists the supported instance configurations for a given project. * * <p>Sample code: * * <pre><code> * try (InstanceAdminClient instanceAdminClient = InstanceAdminClient.create()) { * ProjectName parent = ProjectName.of("[PROJECT]"); * for (InstanceConfig element : instanceAdminClient.listInstanceConfigs(parent.toString()).iterateAll()) { * // doThingsWith(element); * } * } * </code></pre> * * @param parent Required. The name of the project for which a list of supported instance * configurations is requested. Values are of the form `projects/<project>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListInstanceConfigsPagedResponse listInstanceConfigs(String parent) { ListInstanceConfigsRequest request = ListInstanceConfigsRequest.newBuilder().setParent(parent).build(); return listInstanceConfigs(request); }
/** * Lists the supported instance configurations for a given project. * * <p>Sample code: * * <pre><code> * try (InstanceAdminClient instanceAdminClient = InstanceAdminClient.create()) { * ProjectName parent = ProjectName.of("[PROJECT]"); * for (InstanceConfig element : instanceAdminClient.listInstanceConfigs(parent).iterateAll()) { * // doThingsWith(element); * } * } * </code></pre> * * @param parent Required. The name of the project for which a list of supported instance * configurations is requested. Values are of the form `projects/<project>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListInstanceConfigsPagedResponse listInstanceConfigs(ProjectName parent) { ListInstanceConfigsRequest request = ListInstanceConfigsRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .build(); return listInstanceConfigs(request); }
@Override public ListInstanceConfigsRequest injectPageSize( ListInstanceConfigsRequest payload, int pageSize) { return ListInstanceConfigsRequest.newBuilder(payload).setPageSize(pageSize).build(); }
@Override public ListInstanceConfigsRequest injectToken( ListInstanceConfigsRequest payload, String token) { return ListInstanceConfigsRequest.newBuilder(payload).setPageToken(token).build(); }