@Test @SuppressWarnings("all") public void updateAlbumExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); mockPhotosLibrary.addException(exception); try { Album album = Album.newBuilder().build(); client.updateAlbum(album); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { } }
public final Album updateAlbum(Album album) { UpdateAlbumRequest request = UpdateAlbumRequest.newBuilder().setAlbum(album).build(); return updateAlbum(request); }
InternalPhotosLibraryClient implements BackgroundResource { public final Album updateAlbum(Album album) { UpdateAlbumRequest request = UpdateAlbumRequest.newBuilder().setAlbum(album).build(); return updateAlbum(request); } }
InternalPhotosLibraryClient implements BackgroundResource { public final Album updateAlbum(Album album) { UpdateAlbumRequest request = UpdateAlbumRequest.newBuilder().setAlbum(album).build(); return updateAlbum(request); } protected  InternalPhotosLibraryClient(InternalPhotosLibrarySettings settings); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") protected  InternalPhotosLibraryClient(PhotosLibraryStub stub); }
InternalPhotosLibraryClient implements BackgroundResource { public final Album updateAlbum(Album album) { UpdateAlbumRequest request = UpdateAlbumRequest.newBuilder().setAlbum(album).build(); return updateAlbum(request); } protected  InternalPhotosLibraryClient(InternalPhotosLibrarySettings settings); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") protected  InternalPhotosLibraryClient(PhotosLibraryStub stub); static final InternalPhotosLibraryClient create(); static final InternalPhotosLibraryClient create(InternalPhotosLibrarySettings settings); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") static final InternalPhotosLibraryClient create(PhotosLibraryStub stub); final InternalPhotosLibrarySettings getSettings(); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") PhotosLibraryStub getStub(); final Album createAlbum(Album album); final Album createAlbum(CreateAlbumRequest request); final UnaryCallable<CreateAlbumRequest, Album> createAlbumCallable(); final BatchCreateMediaItemsResponse batchCreateMediaItems(
      String albumId, List<NewMediaItem> newMediaItems, AlbumPosition albumPosition); final BatchCreateMediaItemsResponse batchCreateMediaItems(
      BatchCreateMediaItemsRequest request); final UnaryCallable<BatchCreateMediaItemsRequest, BatchCreateMediaItemsResponse> batchCreateMediaItemsCallable(); final BatchAddMediaItemsToAlbumResponse batchAddMediaItemsToAlbum(
      String albumId, List<String> mediaItemIds); final BatchAddMediaItemsToAlbumResponse batchAddMediaItemsToAlbum(
      BatchAddMediaItemsToAlbumRequest request); final UnaryCallable<BatchAddMediaItemsToAlbumRequest, BatchAddMediaItemsToAlbumResponse> batchAddMediaItemsToAlbumCallable(); final SearchMediaItemsPagedResponse searchMediaItems(String albumId); final SearchMediaItemsPagedResponse searchMediaItems(Filters filters); final SearchMediaItemsPagedResponse searchMediaItems(SearchMediaItemsRequest request); final UnaryCallable<SearchMediaItemsRequest, SearchMediaItemsPagedResponse> searchMediaItemsPagedCallable(); final UnaryCallable<SearchMediaItemsRequest, SearchMediaItemsResponse> searchMediaItemsCallable(); final ListMediaItemsPagedResponse listMediaItems(ListMediaItemsRequest request); final UnaryCallable<ListMediaItemsRequest, ListMediaItemsPagedResponse> listMediaItemsPagedCallable(); final UnaryCallable<ListMediaItemsRequest, ListMediaItemsResponse> listMediaItemsCallable(); final MediaItem getMediaItem(String mediaItemId); final MediaItem getMediaItem(GetMediaItemRequest request); final UnaryCallable<GetMediaItemRequest, MediaItem> getMediaItemCallable(); final BatchGetMediaItemsResponse batchGetMediaItems(List<String> mediaItemIds); final BatchGetMediaItemsResponse batchGetMediaItems(BatchGetMediaItemsRequest request); final UnaryCallable<BatchGetMediaItemsRequest, BatchGetMediaItemsResponse> batchGetMediaItemsCallable(); final ListAlbumsPagedResponse listAlbums(boolean excludeNonAppCreatedData); final ListAlbumsPagedResponse listAlbums(ListAlbumsRequest request); final UnaryCallable<ListAlbumsRequest, ListAlbumsPagedResponse> listAlbumsPagedCallable(); final UnaryCallable<ListAlbumsRequest, ListAlbumsResponse> listAlbumsCallable(); final Album getAlbum(String albumId); final Album getAlbum(GetAlbumRequest request); final UnaryCallable<GetAlbumRequest, Album> getAlbumCallable(); final Album getSharedAlbum(String shareToken); final Album getSharedAlbum(GetSharedAlbumRequest request); final UnaryCallable<GetSharedAlbumRequest, Album> getSharedAlbumCallable(); final AddEnrichmentToAlbumResponse addEnrichmentToAlbum(
      String albumId, NewEnrichmentItem newEnrichmentItem, AlbumPosition albumPosition); final AddEnrichmentToAlbumResponse addEnrichmentToAlbum(
      AddEnrichmentToAlbumRequest request); final UnaryCallable<AddEnrichmentToAlbumRequest, AddEnrichmentToAlbumResponse> addEnrichmentToAlbumCallable(); final JoinSharedAlbumResponse joinSharedAlbum(String shareToken); final JoinSharedAlbumResponse joinSharedAlbum(JoinSharedAlbumRequest request); final UnaryCallable<JoinSharedAlbumRequest, JoinSharedAlbumResponse> joinSharedAlbumCallable(); final LeaveSharedAlbumResponse leaveSharedAlbum(String shareToken); final LeaveSharedAlbumResponse leaveSharedAlbum(LeaveSharedAlbumRequest request); final UnaryCallable<LeaveSharedAlbumRequest, LeaveSharedAlbumResponse> leaveSharedAlbumCallable(); final ShareAlbumResponse shareAlbum(
      String albumId, SharedAlbumOptions sharedAlbumOptions); final ShareAlbumResponse shareAlbum(ShareAlbumRequest request); final UnaryCallable<ShareAlbumRequest, ShareAlbumResponse> shareAlbumCallable(); final ListSharedAlbumsPagedResponse listSharedAlbums(boolean excludeNonAppCreatedData); final ListSharedAlbumsPagedResponse listSharedAlbums(ListSharedAlbumsRequest request); final UnaryCallable<ListSharedAlbumsRequest, ListSharedAlbumsPagedResponse> listSharedAlbumsPagedCallable(); final UnaryCallable<ListSharedAlbumsRequest, ListSharedAlbumsResponse> listSharedAlbumsCallable(); final UnshareAlbumResponse unshareAlbum(String albumId); final UnshareAlbumResponse unshareAlbum(UnshareAlbumRequest request); final UnaryCallable<UnshareAlbumRequest, UnshareAlbumResponse> unshareAlbumCallable(); final BatchRemoveMediaItemsFromAlbumResponse batchRemoveMediaItemsFromAlbum(
      String albumId, List<String> mediaItemIds); final BatchRemoveMediaItemsFromAlbumResponse batchRemoveMediaItemsFromAlbum(
      BatchRemoveMediaItemsFromAlbumRequest request); final UnaryCallable<
          BatchRemoveMediaItemsFromAlbumRequest, BatchRemoveMediaItemsFromAlbumResponse> batchRemoveMediaItemsFromAlbumCallable(); final Album updateAlbum(Album album); final Album updateAlbum(Album album, FieldMask updateMask); final Album updateAlbum(UpdateAlbumRequest request); final UnaryCallable<UpdateAlbumRequest, Album> updateAlbumCallable(); final MediaItem updateMediaItem(MediaItem mediaItem, FieldMask updateMask); final MediaItem updateMediaItem(UpdateMediaItemRequest request); final UnaryCallable<UpdateMediaItemRequest, MediaItem> updateMediaItemCallable(); @Override final void close(); @Override void shutdown(); @Override boolean isShutdown(); @Override boolean isTerminated(); @Override void shutdownNow(); @Override boolean awaitTermination(long duration, TimeUnit unit); }
InternalPhotosLibraryClient implements BackgroundResource { public final Album updateAlbum(Album album) { UpdateAlbumRequest request = UpdateAlbumRequest.newBuilder().setAlbum(album).build(); return updateAlbum(request); } protected  InternalPhotosLibraryClient(InternalPhotosLibrarySettings settings); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") protected  InternalPhotosLibraryClient(PhotosLibraryStub stub); static final InternalPhotosLibraryClient create(); static final InternalPhotosLibraryClient create(InternalPhotosLibrarySettings settings); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") static final InternalPhotosLibraryClient create(PhotosLibraryStub stub); final InternalPhotosLibrarySettings getSettings(); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") PhotosLibraryStub getStub(); final Album createAlbum(Album album); final Album createAlbum(CreateAlbumRequest request); final UnaryCallable<CreateAlbumRequest, Album> createAlbumCallable(); final BatchCreateMediaItemsResponse batchCreateMediaItems(
      String albumId, List<NewMediaItem> newMediaItems, AlbumPosition albumPosition); final BatchCreateMediaItemsResponse batchCreateMediaItems(
      BatchCreateMediaItemsRequest request); final UnaryCallable<BatchCreateMediaItemsRequest, BatchCreateMediaItemsResponse> batchCreateMediaItemsCallable(); final BatchAddMediaItemsToAlbumResponse batchAddMediaItemsToAlbum(
      String albumId, List<String> mediaItemIds); final BatchAddMediaItemsToAlbumResponse batchAddMediaItemsToAlbum(
      BatchAddMediaItemsToAlbumRequest request); final UnaryCallable<BatchAddMediaItemsToAlbumRequest, BatchAddMediaItemsToAlbumResponse> batchAddMediaItemsToAlbumCallable(); final SearchMediaItemsPagedResponse searchMediaItems(String albumId); final SearchMediaItemsPagedResponse searchMediaItems(Filters filters); final SearchMediaItemsPagedResponse searchMediaItems(SearchMediaItemsRequest request); final UnaryCallable<SearchMediaItemsRequest, SearchMediaItemsPagedResponse> searchMediaItemsPagedCallable(); final UnaryCallable<SearchMediaItemsRequest, SearchMediaItemsResponse> searchMediaItemsCallable(); final ListMediaItemsPagedResponse listMediaItems(ListMediaItemsRequest request); final UnaryCallable<ListMediaItemsRequest, ListMediaItemsPagedResponse> listMediaItemsPagedCallable(); final UnaryCallable<ListMediaItemsRequest, ListMediaItemsResponse> listMediaItemsCallable(); final MediaItem getMediaItem(String mediaItemId); final MediaItem getMediaItem(GetMediaItemRequest request); final UnaryCallable<GetMediaItemRequest, MediaItem> getMediaItemCallable(); final BatchGetMediaItemsResponse batchGetMediaItems(List<String> mediaItemIds); final BatchGetMediaItemsResponse batchGetMediaItems(BatchGetMediaItemsRequest request); final UnaryCallable<BatchGetMediaItemsRequest, BatchGetMediaItemsResponse> batchGetMediaItemsCallable(); final ListAlbumsPagedResponse listAlbums(boolean excludeNonAppCreatedData); final ListAlbumsPagedResponse listAlbums(ListAlbumsRequest request); final UnaryCallable<ListAlbumsRequest, ListAlbumsPagedResponse> listAlbumsPagedCallable(); final UnaryCallable<ListAlbumsRequest, ListAlbumsResponse> listAlbumsCallable(); final Album getAlbum(String albumId); final Album getAlbum(GetAlbumRequest request); final UnaryCallable<GetAlbumRequest, Album> getAlbumCallable(); final Album getSharedAlbum(String shareToken); final Album getSharedAlbum(GetSharedAlbumRequest request); final UnaryCallable<GetSharedAlbumRequest, Album> getSharedAlbumCallable(); final AddEnrichmentToAlbumResponse addEnrichmentToAlbum(
      String albumId, NewEnrichmentItem newEnrichmentItem, AlbumPosition albumPosition); final AddEnrichmentToAlbumResponse addEnrichmentToAlbum(
      AddEnrichmentToAlbumRequest request); final UnaryCallable<AddEnrichmentToAlbumRequest, AddEnrichmentToAlbumResponse> addEnrichmentToAlbumCallable(); final JoinSharedAlbumResponse joinSharedAlbum(String shareToken); final JoinSharedAlbumResponse joinSharedAlbum(JoinSharedAlbumRequest request); final UnaryCallable<JoinSharedAlbumRequest, JoinSharedAlbumResponse> joinSharedAlbumCallable(); final LeaveSharedAlbumResponse leaveSharedAlbum(String shareToken); final LeaveSharedAlbumResponse leaveSharedAlbum(LeaveSharedAlbumRequest request); final UnaryCallable<LeaveSharedAlbumRequest, LeaveSharedAlbumResponse> leaveSharedAlbumCallable(); final ShareAlbumResponse shareAlbum(
      String albumId, SharedAlbumOptions sharedAlbumOptions); final ShareAlbumResponse shareAlbum(ShareAlbumRequest request); final UnaryCallable<ShareAlbumRequest, ShareAlbumResponse> shareAlbumCallable(); final ListSharedAlbumsPagedResponse listSharedAlbums(boolean excludeNonAppCreatedData); final ListSharedAlbumsPagedResponse listSharedAlbums(ListSharedAlbumsRequest request); final UnaryCallable<ListSharedAlbumsRequest, ListSharedAlbumsPagedResponse> listSharedAlbumsPagedCallable(); final UnaryCallable<ListSharedAlbumsRequest, ListSharedAlbumsResponse> listSharedAlbumsCallable(); final UnshareAlbumResponse unshareAlbum(String albumId); final UnshareAlbumResponse unshareAlbum(UnshareAlbumRequest request); final UnaryCallable<UnshareAlbumRequest, UnshareAlbumResponse> unshareAlbumCallable(); final BatchRemoveMediaItemsFromAlbumResponse batchRemoveMediaItemsFromAlbum(
      String albumId, List<String> mediaItemIds); final BatchRemoveMediaItemsFromAlbumResponse batchRemoveMediaItemsFromAlbum(
      BatchRemoveMediaItemsFromAlbumRequest request); final UnaryCallable<
          BatchRemoveMediaItemsFromAlbumRequest, BatchRemoveMediaItemsFromAlbumResponse> batchRemoveMediaItemsFromAlbumCallable(); final Album updateAlbum(Album album); final Album updateAlbum(Album album, FieldMask updateMask); final Album updateAlbum(UpdateAlbumRequest request); final UnaryCallable<UpdateAlbumRequest, Album> updateAlbumCallable(); final MediaItem updateMediaItem(MediaItem mediaItem, FieldMask updateMask); final MediaItem updateMediaItem(UpdateMediaItemRequest request); final UnaryCallable<UpdateMediaItemRequest, MediaItem> updateMediaItemCallable(); @Override final void close(); @Override void shutdown(); @Override boolean isShutdown(); @Override boolean isTerminated(); @Override void shutdownNow(); @Override boolean awaitTermination(long duration, TimeUnit unit);  }