com.google.photos.library.v1.proto.PhotosLibraryGrpc Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of google-photos-library-client Show documentation
Show all versions of google-photos-library-client Show documentation
Google Photos Library API Client Library for Java
package com.google.photos.library.v1.proto;
import static io.grpc.MethodDescriptor.generateFullMethodName;
import static io.grpc.stub.ClientCalls.asyncUnaryCall;
import static io.grpc.stub.ClientCalls.blockingUnaryCall;
import static io.grpc.stub.ClientCalls.futureUnaryCall;
import static io.grpc.stub.ServerCalls.asyncUnaryCall;
import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall;
/**
*
*
*
* Service which allows developers to perform the following actions on behalf of
* the user:
* - upload media items directly to their Google Photos library
* - create albums
* - add media items (including album enrichments) to albums
* - list and download content from their Google Photos library
* - filter results by media type, date range or content category
* - create, join, and access shared albums
*
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler (version 1.10.0)",
comments = "Source: google/photos/library/v1/photos_library.proto")
public final class PhotosLibraryGrpc {
private PhotosLibraryGrpc() {}
public static final String SERVICE_NAME = "google.photos.library.v1.PhotosLibrary";
// Static method descriptors that strictly reflect the proto.
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
@java.lang.Deprecated // Use {@link #getCreateAlbumMethod()} instead.
public static final io.grpc.MethodDescriptor<
com.google.photos.library.v1.proto.CreateAlbumRequest,
com.google.photos.library.v1.proto.Album>
METHOD_CREATE_ALBUM = getCreateAlbumMethodHelper();
private static volatile io.grpc.MethodDescriptor<
com.google.photos.library.v1.proto.CreateAlbumRequest,
com.google.photos.library.v1.proto.Album>
getCreateAlbumMethod;
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
public static io.grpc.MethodDescriptor<
com.google.photos.library.v1.proto.CreateAlbumRequest,
com.google.photos.library.v1.proto.Album>
getCreateAlbumMethod() {
return getCreateAlbumMethodHelper();
}
private static io.grpc.MethodDescriptor<
com.google.photos.library.v1.proto.CreateAlbumRequest,
com.google.photos.library.v1.proto.Album>
getCreateAlbumMethodHelper() {
io.grpc.MethodDescriptor<
com.google.photos.library.v1.proto.CreateAlbumRequest,
com.google.photos.library.v1.proto.Album>
getCreateAlbumMethod;
if ((getCreateAlbumMethod = PhotosLibraryGrpc.getCreateAlbumMethod) == null) {
synchronized (PhotosLibraryGrpc.class) {
if ((getCreateAlbumMethod = PhotosLibraryGrpc.getCreateAlbumMethod) == null) {
PhotosLibraryGrpc.getCreateAlbumMethod =
getCreateAlbumMethod =
io.grpc.MethodDescriptor
.
newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(
generateFullMethodName(
"google.photos.library.v1.PhotosLibrary", "CreateAlbum"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.photos.library.v1.proto.CreateAlbumRequest
.getDefaultInstance()))
.setResponseMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.photos.library.v1.proto.Album.getDefaultInstance()))
.setSchemaDescriptor(new PhotosLibraryMethodDescriptorSupplier("CreateAlbum"))
.build();
}
}
}
return getCreateAlbumMethod;
}
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
@java.lang.Deprecated // Use {@link #getBatchCreateMediaItemsMethod()} instead.
public static final io.grpc.MethodDescriptor<
com.google.photos.library.v1.proto.BatchCreateMediaItemsRequest,
com.google.photos.library.v1.proto.BatchCreateMediaItemsResponse>
METHOD_BATCH_CREATE_MEDIA_ITEMS = getBatchCreateMediaItemsMethodHelper();
private static volatile io.grpc.MethodDescriptor<
com.google.photos.library.v1.proto.BatchCreateMediaItemsRequest,
com.google.photos.library.v1.proto.BatchCreateMediaItemsResponse>
getBatchCreateMediaItemsMethod;
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
public static io.grpc.MethodDescriptor<
com.google.photos.library.v1.proto.BatchCreateMediaItemsRequest,
com.google.photos.library.v1.proto.BatchCreateMediaItemsResponse>
getBatchCreateMediaItemsMethod() {
return getBatchCreateMediaItemsMethodHelper();
}
private static io.grpc.MethodDescriptor<
com.google.photos.library.v1.proto.BatchCreateMediaItemsRequest,
com.google.photos.library.v1.proto.BatchCreateMediaItemsResponse>
getBatchCreateMediaItemsMethodHelper() {
io.grpc.MethodDescriptor<
com.google.photos.library.v1.proto.BatchCreateMediaItemsRequest,
com.google.photos.library.v1.proto.BatchCreateMediaItemsResponse>
getBatchCreateMediaItemsMethod;
if ((getBatchCreateMediaItemsMethod = PhotosLibraryGrpc.getBatchCreateMediaItemsMethod)
== null) {
synchronized (PhotosLibraryGrpc.class) {
if ((getBatchCreateMediaItemsMethod = PhotosLibraryGrpc.getBatchCreateMediaItemsMethod)
== null) {
PhotosLibraryGrpc.getBatchCreateMediaItemsMethod =
getBatchCreateMediaItemsMethod =
io.grpc.MethodDescriptor
.
newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(
generateFullMethodName(
"google.photos.library.v1.PhotosLibrary", "BatchCreateMediaItems"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.photos.library.v1.proto.BatchCreateMediaItemsRequest
.getDefaultInstance()))
.setResponseMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.photos.library.v1.proto.BatchCreateMediaItemsResponse
.getDefaultInstance()))
.setSchemaDescriptor(
new PhotosLibraryMethodDescriptorSupplier("BatchCreateMediaItems"))
.build();
}
}
}
return getBatchCreateMediaItemsMethod;
}
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
@java.lang.Deprecated // Use {@link #getSearchMediaItemsMethod()} instead.
public static final io.grpc.MethodDescriptor<
com.google.photos.library.v1.proto.SearchMediaItemsRequest,
com.google.photos.library.v1.proto.SearchMediaItemsResponse>
METHOD_SEARCH_MEDIA_ITEMS = getSearchMediaItemsMethodHelper();
private static volatile io.grpc.MethodDescriptor<
com.google.photos.library.v1.proto.SearchMediaItemsRequest,
com.google.photos.library.v1.proto.SearchMediaItemsResponse>
getSearchMediaItemsMethod;
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
public static io.grpc.MethodDescriptor<
com.google.photos.library.v1.proto.SearchMediaItemsRequest,
com.google.photos.library.v1.proto.SearchMediaItemsResponse>
getSearchMediaItemsMethod() {
return getSearchMediaItemsMethodHelper();
}
private static io.grpc.MethodDescriptor<
com.google.photos.library.v1.proto.SearchMediaItemsRequest,
com.google.photos.library.v1.proto.SearchMediaItemsResponse>
getSearchMediaItemsMethodHelper() {
io.grpc.MethodDescriptor<
com.google.photos.library.v1.proto.SearchMediaItemsRequest,
com.google.photos.library.v1.proto.SearchMediaItemsResponse>
getSearchMediaItemsMethod;
if ((getSearchMediaItemsMethod = PhotosLibraryGrpc.getSearchMediaItemsMethod) == null) {
synchronized (PhotosLibraryGrpc.class) {
if ((getSearchMediaItemsMethod = PhotosLibraryGrpc.getSearchMediaItemsMethod) == null) {
PhotosLibraryGrpc.getSearchMediaItemsMethod =
getSearchMediaItemsMethod =
io.grpc.MethodDescriptor
.
newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(
generateFullMethodName(
"google.photos.library.v1.PhotosLibrary", "SearchMediaItems"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.photos.library.v1.proto.SearchMediaItemsRequest
.getDefaultInstance()))
.setResponseMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.photos.library.v1.proto.SearchMediaItemsResponse
.getDefaultInstance()))
.setSchemaDescriptor(
new PhotosLibraryMethodDescriptorSupplier("SearchMediaItems"))
.build();
}
}
}
return getSearchMediaItemsMethod;
}
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
@java.lang.Deprecated // Use {@link #getListMediaItemsMethod()} instead.
public static final io.grpc.MethodDescriptor<
com.google.photos.library.v1.proto.ListMediaItemsRequest,
com.google.photos.library.v1.proto.ListMediaItemsResponse>
METHOD_LIST_MEDIA_ITEMS = getListMediaItemsMethodHelper();
private static volatile io.grpc.MethodDescriptor<
com.google.photos.library.v1.proto.ListMediaItemsRequest,
com.google.photos.library.v1.proto.ListMediaItemsResponse>
getListMediaItemsMethod;
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
public static io.grpc.MethodDescriptor<
com.google.photos.library.v1.proto.ListMediaItemsRequest,
com.google.photos.library.v1.proto.ListMediaItemsResponse>
getListMediaItemsMethod() {
return getListMediaItemsMethodHelper();
}
private static io.grpc.MethodDescriptor<
com.google.photos.library.v1.proto.ListMediaItemsRequest,
com.google.photos.library.v1.proto.ListMediaItemsResponse>
getListMediaItemsMethodHelper() {
io.grpc.MethodDescriptor<
com.google.photos.library.v1.proto.ListMediaItemsRequest,
com.google.photos.library.v1.proto.ListMediaItemsResponse>
getListMediaItemsMethod;
if ((getListMediaItemsMethod = PhotosLibraryGrpc.getListMediaItemsMethod) == null) {
synchronized (PhotosLibraryGrpc.class) {
if ((getListMediaItemsMethod = PhotosLibraryGrpc.getListMediaItemsMethod) == null) {
PhotosLibraryGrpc.getListMediaItemsMethod =
getListMediaItemsMethod =
io.grpc.MethodDescriptor
.
newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(
generateFullMethodName(
"google.photos.library.v1.PhotosLibrary", "ListMediaItems"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.photos.library.v1.proto.ListMediaItemsRequest
.getDefaultInstance()))
.setResponseMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.photos.library.v1.proto.ListMediaItemsResponse
.getDefaultInstance()))
.setSchemaDescriptor(
new PhotosLibraryMethodDescriptorSupplier("ListMediaItems"))
.build();
}
}
}
return getListMediaItemsMethod;
}
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
@java.lang.Deprecated // Use {@link #getGetMediaItemMethod()} instead.
public static final io.grpc.MethodDescriptor<
com.google.photos.library.v1.proto.GetMediaItemRequest,
com.google.photos.library.v1.proto.MediaItem>
METHOD_GET_MEDIA_ITEM = getGetMediaItemMethodHelper();
private static volatile io.grpc.MethodDescriptor<
com.google.photos.library.v1.proto.GetMediaItemRequest,
com.google.photos.library.v1.proto.MediaItem>
getGetMediaItemMethod;
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
public static io.grpc.MethodDescriptor<
com.google.photos.library.v1.proto.GetMediaItemRequest,
com.google.photos.library.v1.proto.MediaItem>
getGetMediaItemMethod() {
return getGetMediaItemMethodHelper();
}
private static io.grpc.MethodDescriptor<
com.google.photos.library.v1.proto.GetMediaItemRequest,
com.google.photos.library.v1.proto.MediaItem>
getGetMediaItemMethodHelper() {
io.grpc.MethodDescriptor<
com.google.photos.library.v1.proto.GetMediaItemRequest,
com.google.photos.library.v1.proto.MediaItem>
getGetMediaItemMethod;
if ((getGetMediaItemMethod = PhotosLibraryGrpc.getGetMediaItemMethod) == null) {
synchronized (PhotosLibraryGrpc.class) {
if ((getGetMediaItemMethod = PhotosLibraryGrpc.getGetMediaItemMethod) == null) {
PhotosLibraryGrpc.getGetMediaItemMethod =
getGetMediaItemMethod =
io.grpc.MethodDescriptor
.
newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(
generateFullMethodName(
"google.photos.library.v1.PhotosLibrary", "GetMediaItem"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.photos.library.v1.proto.GetMediaItemRequest
.getDefaultInstance()))
.setResponseMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.photos.library.v1.proto.MediaItem.getDefaultInstance()))
.setSchemaDescriptor(
new PhotosLibraryMethodDescriptorSupplier("GetMediaItem"))
.build();
}
}
}
return getGetMediaItemMethod;
}
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
@java.lang.Deprecated // Use {@link #getListAlbumsMethod()} instead.
public static final io.grpc.MethodDescriptor<
com.google.photos.library.v1.proto.ListAlbumsRequest,
com.google.photos.library.v1.proto.ListAlbumsResponse>
METHOD_LIST_ALBUMS = getListAlbumsMethodHelper();
private static volatile io.grpc.MethodDescriptor<
com.google.photos.library.v1.proto.ListAlbumsRequest,
com.google.photos.library.v1.proto.ListAlbumsResponse>
getListAlbumsMethod;
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
public static io.grpc.MethodDescriptor<
com.google.photos.library.v1.proto.ListAlbumsRequest,
com.google.photos.library.v1.proto.ListAlbumsResponse>
getListAlbumsMethod() {
return getListAlbumsMethodHelper();
}
private static io.grpc.MethodDescriptor<
com.google.photos.library.v1.proto.ListAlbumsRequest,
com.google.photos.library.v1.proto.ListAlbumsResponse>
getListAlbumsMethodHelper() {
io.grpc.MethodDescriptor<
com.google.photos.library.v1.proto.ListAlbumsRequest,
com.google.photos.library.v1.proto.ListAlbumsResponse>
getListAlbumsMethod;
if ((getListAlbumsMethod = PhotosLibraryGrpc.getListAlbumsMethod) == null) {
synchronized (PhotosLibraryGrpc.class) {
if ((getListAlbumsMethod = PhotosLibraryGrpc.getListAlbumsMethod) == null) {
PhotosLibraryGrpc.getListAlbumsMethod =
getListAlbumsMethod =
io.grpc.MethodDescriptor
.
newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(
generateFullMethodName(
"google.photos.library.v1.PhotosLibrary", "ListAlbums"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.photos.library.v1.proto.ListAlbumsRequest
.getDefaultInstance()))
.setResponseMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.photos.library.v1.proto.ListAlbumsResponse
.getDefaultInstance()))
.setSchemaDescriptor(new PhotosLibraryMethodDescriptorSupplier("ListAlbums"))
.build();
}
}
}
return getListAlbumsMethod;
}
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
@java.lang.Deprecated // Use {@link #getGetAlbumMethod()} instead.
public static final io.grpc.MethodDescriptor<
com.google.photos.library.v1.proto.GetAlbumRequest,
com.google.photos.library.v1.proto.Album>
METHOD_GET_ALBUM = getGetAlbumMethodHelper();
private static volatile io.grpc.MethodDescriptor<
com.google.photos.library.v1.proto.GetAlbumRequest,
com.google.photos.library.v1.proto.Album>
getGetAlbumMethod;
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
public static io.grpc.MethodDescriptor<
com.google.photos.library.v1.proto.GetAlbumRequest,
com.google.photos.library.v1.proto.Album>
getGetAlbumMethod() {
return getGetAlbumMethodHelper();
}
private static io.grpc.MethodDescriptor<
com.google.photos.library.v1.proto.GetAlbumRequest,
com.google.photos.library.v1.proto.Album>
getGetAlbumMethodHelper() {
io.grpc.MethodDescriptor<
com.google.photos.library.v1.proto.GetAlbumRequest,
com.google.photos.library.v1.proto.Album>
getGetAlbumMethod;
if ((getGetAlbumMethod = PhotosLibraryGrpc.getGetAlbumMethod) == null) {
synchronized (PhotosLibraryGrpc.class) {
if ((getGetAlbumMethod = PhotosLibraryGrpc.getGetAlbumMethod) == null) {
PhotosLibraryGrpc.getGetAlbumMethod =
getGetAlbumMethod =
io.grpc.MethodDescriptor
.
newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(
generateFullMethodName(
"google.photos.library.v1.PhotosLibrary", "GetAlbum"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.photos.library.v1.proto.GetAlbumRequest
.getDefaultInstance()))
.setResponseMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.photos.library.v1.proto.Album.getDefaultInstance()))
.setSchemaDescriptor(new PhotosLibraryMethodDescriptorSupplier("GetAlbum"))
.build();
}
}
}
return getGetAlbumMethod;
}
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
@java.lang.Deprecated // Use {@link #getAddEnrichmentToAlbumMethod()} instead.
public static final io.grpc.MethodDescriptor<
com.google.photos.library.v1.proto.AddEnrichmentToAlbumRequest,
com.google.photos.library.v1.proto.AddEnrichmentToAlbumResponse>
METHOD_ADD_ENRICHMENT_TO_ALBUM = getAddEnrichmentToAlbumMethodHelper();
private static volatile io.grpc.MethodDescriptor<
com.google.photos.library.v1.proto.AddEnrichmentToAlbumRequest,
com.google.photos.library.v1.proto.AddEnrichmentToAlbumResponse>
getAddEnrichmentToAlbumMethod;
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
public static io.grpc.MethodDescriptor<
com.google.photos.library.v1.proto.AddEnrichmentToAlbumRequest,
com.google.photos.library.v1.proto.AddEnrichmentToAlbumResponse>
getAddEnrichmentToAlbumMethod() {
return getAddEnrichmentToAlbumMethodHelper();
}
private static io.grpc.MethodDescriptor<
com.google.photos.library.v1.proto.AddEnrichmentToAlbumRequest,
com.google.photos.library.v1.proto.AddEnrichmentToAlbumResponse>
getAddEnrichmentToAlbumMethodHelper() {
io.grpc.MethodDescriptor<
com.google.photos.library.v1.proto.AddEnrichmentToAlbumRequest,
com.google.photos.library.v1.proto.AddEnrichmentToAlbumResponse>
getAddEnrichmentToAlbumMethod;
if ((getAddEnrichmentToAlbumMethod = PhotosLibraryGrpc.getAddEnrichmentToAlbumMethod) == null) {
synchronized (PhotosLibraryGrpc.class) {
if ((getAddEnrichmentToAlbumMethod = PhotosLibraryGrpc.getAddEnrichmentToAlbumMethod)
== null) {
PhotosLibraryGrpc.getAddEnrichmentToAlbumMethod =
getAddEnrichmentToAlbumMethod =
io.grpc.MethodDescriptor
.
newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(
generateFullMethodName(
"google.photos.library.v1.PhotosLibrary", "AddEnrichmentToAlbum"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.photos.library.v1.proto.AddEnrichmentToAlbumRequest
.getDefaultInstance()))
.setResponseMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.photos.library.v1.proto.AddEnrichmentToAlbumResponse
.getDefaultInstance()))
.setSchemaDescriptor(
new PhotosLibraryMethodDescriptorSupplier("AddEnrichmentToAlbum"))
.build();
}
}
}
return getAddEnrichmentToAlbumMethod;
}
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
@java.lang.Deprecated // Use {@link #getJoinSharedAlbumMethod()} instead.
public static final io.grpc.MethodDescriptor<
com.google.photos.library.v1.proto.JoinSharedAlbumRequest,
com.google.photos.library.v1.proto.JoinSharedAlbumResponse>
METHOD_JOIN_SHARED_ALBUM = getJoinSharedAlbumMethodHelper();
private static volatile io.grpc.MethodDescriptor<
com.google.photos.library.v1.proto.JoinSharedAlbumRequest,
com.google.photos.library.v1.proto.JoinSharedAlbumResponse>
getJoinSharedAlbumMethod;
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
public static io.grpc.MethodDescriptor<
com.google.photos.library.v1.proto.JoinSharedAlbumRequest,
com.google.photos.library.v1.proto.JoinSharedAlbumResponse>
getJoinSharedAlbumMethod() {
return getJoinSharedAlbumMethodHelper();
}
private static io.grpc.MethodDescriptor<
com.google.photos.library.v1.proto.JoinSharedAlbumRequest,
com.google.photos.library.v1.proto.JoinSharedAlbumResponse>
getJoinSharedAlbumMethodHelper() {
io.grpc.MethodDescriptor<
com.google.photos.library.v1.proto.JoinSharedAlbumRequest,
com.google.photos.library.v1.proto.JoinSharedAlbumResponse>
getJoinSharedAlbumMethod;
if ((getJoinSharedAlbumMethod = PhotosLibraryGrpc.getJoinSharedAlbumMethod) == null) {
synchronized (PhotosLibraryGrpc.class) {
if ((getJoinSharedAlbumMethod = PhotosLibraryGrpc.getJoinSharedAlbumMethod) == null) {
PhotosLibraryGrpc.getJoinSharedAlbumMethod =
getJoinSharedAlbumMethod =
io.grpc.MethodDescriptor
.
newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(
generateFullMethodName(
"google.photos.library.v1.PhotosLibrary", "JoinSharedAlbum"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.photos.library.v1.proto.JoinSharedAlbumRequest
.getDefaultInstance()))
.setResponseMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.photos.library.v1.proto.JoinSharedAlbumResponse
.getDefaultInstance()))
.setSchemaDescriptor(
new PhotosLibraryMethodDescriptorSupplier("JoinSharedAlbum"))
.build();
}
}
}
return getJoinSharedAlbumMethod;
}
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
@java.lang.Deprecated // Use {@link #getShareAlbumMethod()} instead.
public static final io.grpc.MethodDescriptor<
com.google.photos.library.v1.proto.ShareAlbumRequest,
com.google.photos.library.v1.proto.ShareAlbumResponse>
METHOD_SHARE_ALBUM = getShareAlbumMethodHelper();
private static volatile io.grpc.MethodDescriptor<
com.google.photos.library.v1.proto.ShareAlbumRequest,
com.google.photos.library.v1.proto.ShareAlbumResponse>
getShareAlbumMethod;
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
public static io.grpc.MethodDescriptor<
com.google.photos.library.v1.proto.ShareAlbumRequest,
com.google.photos.library.v1.proto.ShareAlbumResponse>
getShareAlbumMethod() {
return getShareAlbumMethodHelper();
}
private static io.grpc.MethodDescriptor<
com.google.photos.library.v1.proto.ShareAlbumRequest,
com.google.photos.library.v1.proto.ShareAlbumResponse>
getShareAlbumMethodHelper() {
io.grpc.MethodDescriptor<
com.google.photos.library.v1.proto.ShareAlbumRequest,
com.google.photos.library.v1.proto.ShareAlbumResponse>
getShareAlbumMethod;
if ((getShareAlbumMethod = PhotosLibraryGrpc.getShareAlbumMethod) == null) {
synchronized (PhotosLibraryGrpc.class) {
if ((getShareAlbumMethod = PhotosLibraryGrpc.getShareAlbumMethod) == null) {
PhotosLibraryGrpc.getShareAlbumMethod =
getShareAlbumMethod =
io.grpc.MethodDescriptor
.
newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(
generateFullMethodName(
"google.photos.library.v1.PhotosLibrary", "ShareAlbum"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.photos.library.v1.proto.ShareAlbumRequest
.getDefaultInstance()))
.setResponseMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.photos.library.v1.proto.ShareAlbumResponse
.getDefaultInstance()))
.setSchemaDescriptor(new PhotosLibraryMethodDescriptorSupplier("ShareAlbum"))
.build();
}
}
}
return getShareAlbumMethod;
}
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
@java.lang.Deprecated // Use {@link #getListSharedAlbumsMethod()} instead.
public static final io.grpc.MethodDescriptor<
com.google.photos.library.v1.proto.ListSharedAlbumsRequest,
com.google.photos.library.v1.proto.ListSharedAlbumsResponse>
METHOD_LIST_SHARED_ALBUMS = getListSharedAlbumsMethodHelper();
private static volatile io.grpc.MethodDescriptor<
com.google.photos.library.v1.proto.ListSharedAlbumsRequest,
com.google.photos.library.v1.proto.ListSharedAlbumsResponse>
getListSharedAlbumsMethod;
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
public static io.grpc.MethodDescriptor<
com.google.photos.library.v1.proto.ListSharedAlbumsRequest,
com.google.photos.library.v1.proto.ListSharedAlbumsResponse>
getListSharedAlbumsMethod() {
return getListSharedAlbumsMethodHelper();
}
private static io.grpc.MethodDescriptor<
com.google.photos.library.v1.proto.ListSharedAlbumsRequest,
com.google.photos.library.v1.proto.ListSharedAlbumsResponse>
getListSharedAlbumsMethodHelper() {
io.grpc.MethodDescriptor<
com.google.photos.library.v1.proto.ListSharedAlbumsRequest,
com.google.photos.library.v1.proto.ListSharedAlbumsResponse>
getListSharedAlbumsMethod;
if ((getListSharedAlbumsMethod = PhotosLibraryGrpc.getListSharedAlbumsMethod) == null) {
synchronized (PhotosLibraryGrpc.class) {
if ((getListSharedAlbumsMethod = PhotosLibraryGrpc.getListSharedAlbumsMethod) == null) {
PhotosLibraryGrpc.getListSharedAlbumsMethod =
getListSharedAlbumsMethod =
io.grpc.MethodDescriptor
.
newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(
generateFullMethodName(
"google.photos.library.v1.PhotosLibrary", "ListSharedAlbums"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.photos.library.v1.proto.ListSharedAlbumsRequest
.getDefaultInstance()))
.setResponseMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.photos.library.v1.proto.ListSharedAlbumsResponse
.getDefaultInstance()))
.setSchemaDescriptor(
new PhotosLibraryMethodDescriptorSupplier("ListSharedAlbums"))
.build();
}
}
}
return getListSharedAlbumsMethod;
}
/** Creates a new async stub that supports all call types for the service */
public static PhotosLibraryStub newStub(io.grpc.Channel channel) {
return new PhotosLibraryStub(channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static PhotosLibraryBlockingStub newBlockingStub(io.grpc.Channel channel) {
return new PhotosLibraryBlockingStub(channel);
}
/** Creates a new ListenableFuture-style stub that supports unary calls on the service */
public static PhotosLibraryFutureStub newFutureStub(io.grpc.Channel channel) {
return new PhotosLibraryFutureStub(channel);
}
/**
*
*
*
* Service which allows developers to perform the following actions on behalf of
* the user:
* - upload media items directly to their Google Photos library
* - create albums
* - add media items (including album enrichments) to albums
* - list and download content from their Google Photos library
* - filter results by media type, date range or content category
* - create, join, and access shared albums
*
*/
public abstract static class PhotosLibraryImplBase implements io.grpc.BindableService {
/**
*
*
*
* Creates an album in a user's Google Photos library.
*
*/
public void createAlbum(
com.google.photos.library.v1.proto.CreateAlbumRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(getCreateAlbumMethodHelper(), responseObserver);
}
/**
*
*
*
* Creates one or more media items in a user's Google Photos library.
* This is the second step for creating a media item. For details regarding
* Step 1, uploading the raw bytes to a Google Server, see
* <a href="/photos/library/guides/upload-media">Uploading media</a>.
* This call adds the media item to the library. If an album `id` is
* specified, the call adds the media item to the album too. By default, the
* media item will be added to the end of the library or album.
* If an album `id` and position are both defined, the media item is
* added to the album at the specified position.
* If the call contains multiple media items, they're added at the specified
* position.
* If you are creating a media item in a shared album where you are not the
* owner, you are not allowed to position the media item. Doing so will result
* in a `BAD REQUEST` error.
*
*/
public void batchCreateMediaItems(
com.google.photos.library.v1.proto.BatchCreateMediaItemsRequest request,
io.grpc.stub.StreamObserver<
com.google.photos.library.v1.proto.BatchCreateMediaItemsResponse>
responseObserver) {
asyncUnimplementedUnaryCall(getBatchCreateMediaItemsMethodHelper(), responseObserver);
}
/**
*
*
*
* Searches for media items in a user's Google Photos library.
* If no filters are set, then all media items in the user's library are
* returned.
* If an album is set, all media items in the specified album are returned.
* If filters are specified, media items that match the filters from the user's
* library are listed.
* If you set both the album and the filters, the request results in an error.
*
*/
public void searchMediaItems(
com.google.photos.library.v1.proto.SearchMediaItemsRequest request,
io.grpc.stub.StreamObserver
responseObserver) {
asyncUnimplementedUnaryCall(getSearchMediaItemsMethodHelper(), responseObserver);
}
/**
*
*
*
* List all media items from a user's Google Photos library.
*
*/
public void listMediaItems(
com.google.photos.library.v1.proto.ListMediaItemsRequest request,
io.grpc.stub.StreamObserver
responseObserver) {
asyncUnimplementedUnaryCall(getListMediaItemsMethodHelper(), responseObserver);
}
/**
*
*
*
* Returns the media item for the specified media item `id`.
*
*/
public void getMediaItem(
com.google.photos.library.v1.proto.GetMediaItemRequest request,
io.grpc.stub.StreamObserver
responseObserver) {
asyncUnimplementedUnaryCall(getGetMediaItemMethodHelper(), responseObserver);
}
/**
*
*
*
* Lists all albums shown to a user in the Albums tab of the Google
* Photos app.
*
*/
public void listAlbums(
com.google.photos.library.v1.proto.ListAlbumsRequest request,
io.grpc.stub.StreamObserver
responseObserver) {
asyncUnimplementedUnaryCall(getListAlbumsMethodHelper(), responseObserver);
}
/**
*
*
*
* Returns the album based on the specified `albumId` or `shareToken`.
* Exactly one of `albumId` and `shareToken` must be set.
* The `albumId` should be the ID of an album owned by the user or a shared
* album that the user has joined.
*
*/
public void getAlbum(
com.google.photos.library.v1.proto.GetAlbumRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(getGetAlbumMethodHelper(), responseObserver);
}
/**
*
*
*
* Adds an enrichment at a specified position in a defined album.
*
*/
public void addEnrichmentToAlbum(
com.google.photos.library.v1.proto.AddEnrichmentToAlbumRequest request,
io.grpc.stub.StreamObserver
responseObserver) {
asyncUnimplementedUnaryCall(getAddEnrichmentToAlbumMethodHelper(), responseObserver);
}
/**
*
*
*
* Joins a shared album on behalf of the Google Photos user.
*
*/
public void joinSharedAlbum(
com.google.photos.library.v1.proto.JoinSharedAlbumRequest request,
io.grpc.stub.StreamObserver
responseObserver) {
asyncUnimplementedUnaryCall(getJoinSharedAlbumMethodHelper(), responseObserver);
}
/**
*
*
*
* Marks an album as shared and accessible to other users. This action can
* only be performed on albums which were created by the developer via the
* API.
*
*/
public void shareAlbum(
com.google.photos.library.v1.proto.ShareAlbumRequest request,
io.grpc.stub.StreamObserver
responseObserver) {
asyncUnimplementedUnaryCall(getShareAlbumMethodHelper(), responseObserver);
}
/**
*
*
*
* Lists all shared albums available in the Sharing tab of the
* user's Google Photos app.
*
*/
public void listSharedAlbums(
com.google.photos.library.v1.proto.ListSharedAlbumsRequest request,
io.grpc.stub.StreamObserver
responseObserver) {
asyncUnimplementedUnaryCall(getListSharedAlbumsMethodHelper(), responseObserver);
}
@java.lang.Override
public final io.grpc.ServerServiceDefinition bindService() {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
getCreateAlbumMethodHelper(),
asyncUnaryCall(
new MethodHandlers<
com.google.photos.library.v1.proto.CreateAlbumRequest,
com.google.photos.library.v1.proto.Album>(this, METHODID_CREATE_ALBUM)))
.addMethod(
getBatchCreateMediaItemsMethodHelper(),
asyncUnaryCall(
new MethodHandlers<
com.google.photos.library.v1.proto.BatchCreateMediaItemsRequest,
com.google.photos.library.v1.proto.BatchCreateMediaItemsResponse>(
this, METHODID_BATCH_CREATE_MEDIA_ITEMS)))
.addMethod(
getSearchMediaItemsMethodHelper(),
asyncUnaryCall(
new MethodHandlers<
com.google.photos.library.v1.proto.SearchMediaItemsRequest,
com.google.photos.library.v1.proto.SearchMediaItemsResponse>(
this, METHODID_SEARCH_MEDIA_ITEMS)))
.addMethod(
getListMediaItemsMethodHelper(),
asyncUnaryCall(
new MethodHandlers<
com.google.photos.library.v1.proto.ListMediaItemsRequest,
com.google.photos.library.v1.proto.ListMediaItemsResponse>(
this, METHODID_LIST_MEDIA_ITEMS)))
.addMethod(
getGetMediaItemMethodHelper(),
asyncUnaryCall(
new MethodHandlers<
com.google.photos.library.v1.proto.GetMediaItemRequest,
com.google.photos.library.v1.proto.MediaItem>(this, METHODID_GET_MEDIA_ITEM)))
.addMethod(
getListAlbumsMethodHelper(),
asyncUnaryCall(
new MethodHandlers<
com.google.photos.library.v1.proto.ListAlbumsRequest,
com.google.photos.library.v1.proto.ListAlbumsResponse>(
this, METHODID_LIST_ALBUMS)))
.addMethod(
getGetAlbumMethodHelper(),
asyncUnaryCall(
new MethodHandlers<
com.google.photos.library.v1.proto.GetAlbumRequest,
com.google.photos.library.v1.proto.Album>(this, METHODID_GET_ALBUM)))
.addMethod(
getAddEnrichmentToAlbumMethodHelper(),
asyncUnaryCall(
new MethodHandlers<
com.google.photos.library.v1.proto.AddEnrichmentToAlbumRequest,
com.google.photos.library.v1.proto.AddEnrichmentToAlbumResponse>(
this, METHODID_ADD_ENRICHMENT_TO_ALBUM)))
.addMethod(
getJoinSharedAlbumMethodHelper(),
asyncUnaryCall(
new MethodHandlers<
com.google.photos.library.v1.proto.JoinSharedAlbumRequest,
com.google.photos.library.v1.proto.JoinSharedAlbumResponse>(
this, METHODID_JOIN_SHARED_ALBUM)))
.addMethod(
getShareAlbumMethodHelper(),
asyncUnaryCall(
new MethodHandlers<
com.google.photos.library.v1.proto.ShareAlbumRequest,
com.google.photos.library.v1.proto.ShareAlbumResponse>(
this, METHODID_SHARE_ALBUM)))
.addMethod(
getListSharedAlbumsMethodHelper(),
asyncUnaryCall(
new MethodHandlers<
com.google.photos.library.v1.proto.ListSharedAlbumsRequest,
com.google.photos.library.v1.proto.ListSharedAlbumsResponse>(
this, METHODID_LIST_SHARED_ALBUMS)))
.build();
}
}
/**
*
*
*
* Service which allows developers to perform the following actions on behalf of
* the user:
* - upload media items directly to their Google Photos library
* - create albums
* - add media items (including album enrichments) to albums
* - list and download content from their Google Photos library
* - filter results by media type, date range or content category
* - create, join, and access shared albums
*
*/
public static final class PhotosLibraryStub extends io.grpc.stub.AbstractStub {
private PhotosLibraryStub(io.grpc.Channel channel) {
super(channel);
}
private PhotosLibraryStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected PhotosLibraryStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new PhotosLibraryStub(channel, callOptions);
}
/**
*
*
*
* Creates an album in a user's Google Photos library.
*
*/
public void createAlbum(
com.google.photos.library.v1.proto.CreateAlbumRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnaryCall(
getChannel().newCall(getCreateAlbumMethodHelper(), getCallOptions()),
request,
responseObserver);
}
/**
*
*
*
* Creates one or more media items in a user's Google Photos library.
* This is the second step for creating a media item. For details regarding
* Step 1, uploading the raw bytes to a Google Server, see
* <a href="/photos/library/guides/upload-media">Uploading media</a>.
* This call adds the media item to the library. If an album `id` is
* specified, the call adds the media item to the album too. By default, the
* media item will be added to the end of the library or album.
* If an album `id` and position are both defined, the media item is
* added to the album at the specified position.
* If the call contains multiple media items, they're added at the specified
* position.
* If you are creating a media item in a shared album where you are not the
* owner, you are not allowed to position the media item. Doing so will result
* in a `BAD REQUEST` error.
*
*/
public void batchCreateMediaItems(
com.google.photos.library.v1.proto.BatchCreateMediaItemsRequest request,
io.grpc.stub.StreamObserver<
com.google.photos.library.v1.proto.BatchCreateMediaItemsResponse>
responseObserver) {
asyncUnaryCall(
getChannel().newCall(getBatchCreateMediaItemsMethodHelper(), getCallOptions()),
request,
responseObserver);
}
/**
*
*
*
* Searches for media items in a user's Google Photos library.
* If no filters are set, then all media items in the user's library are
* returned.
* If an album is set, all media items in the specified album are returned.
* If filters are specified, media items that match the filters from the user's
* library are listed.
* If you set both the album and the filters, the request results in an error.
*
*/
public void searchMediaItems(
com.google.photos.library.v1.proto.SearchMediaItemsRequest request,
io.grpc.stub.StreamObserver
responseObserver) {
asyncUnaryCall(
getChannel().newCall(getSearchMediaItemsMethodHelper(), getCallOptions()),
request,
responseObserver);
}
/**
*
*
*
* List all media items from a user's Google Photos library.
*
*/
public void listMediaItems(
com.google.photos.library.v1.proto.ListMediaItemsRequest request,
io.grpc.stub.StreamObserver
responseObserver) {
asyncUnaryCall(
getChannel().newCall(getListMediaItemsMethodHelper(), getCallOptions()),
request,
responseObserver);
}
/**
*
*
*
* Returns the media item for the specified media item `id`.
*
*/
public void getMediaItem(
com.google.photos.library.v1.proto.GetMediaItemRequest request,
io.grpc.stub.StreamObserver
responseObserver) {
asyncUnaryCall(
getChannel().newCall(getGetMediaItemMethodHelper(), getCallOptions()),
request,
responseObserver);
}
/**
*
*
*
* Lists all albums shown to a user in the Albums tab of the Google
* Photos app.
*
*/
public void listAlbums(
com.google.photos.library.v1.proto.ListAlbumsRequest request,
io.grpc.stub.StreamObserver
responseObserver) {
asyncUnaryCall(
getChannel().newCall(getListAlbumsMethodHelper(), getCallOptions()),
request,
responseObserver);
}
/**
*
*
*
* Returns the album based on the specified `albumId` or `shareToken`.
* Exactly one of `albumId` and `shareToken` must be set.
* The `albumId` should be the ID of an album owned by the user or a shared
* album that the user has joined.
*
*/
public void getAlbum(
com.google.photos.library.v1.proto.GetAlbumRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnaryCall(
getChannel().newCall(getGetAlbumMethodHelper(), getCallOptions()),
request,
responseObserver);
}
/**
*
*
*
* Adds an enrichment at a specified position in a defined album.
*
*/
public void addEnrichmentToAlbum(
com.google.photos.library.v1.proto.AddEnrichmentToAlbumRequest request,
io.grpc.stub.StreamObserver
responseObserver) {
asyncUnaryCall(
getChannel().newCall(getAddEnrichmentToAlbumMethodHelper(), getCallOptions()),
request,
responseObserver);
}
/**
*
*
*
* Joins a shared album on behalf of the Google Photos user.
*
*/
public void joinSharedAlbum(
com.google.photos.library.v1.proto.JoinSharedAlbumRequest request,
io.grpc.stub.StreamObserver
responseObserver) {
asyncUnaryCall(
getChannel().newCall(getJoinSharedAlbumMethodHelper(), getCallOptions()),
request,
responseObserver);
}
/**
*
*
*
* Marks an album as shared and accessible to other users. This action can
* only be performed on albums which were created by the developer via the
* API.
*
*/
public void shareAlbum(
com.google.photos.library.v1.proto.ShareAlbumRequest request,
io.grpc.stub.StreamObserver
responseObserver) {
asyncUnaryCall(
getChannel().newCall(getShareAlbumMethodHelper(), getCallOptions()),
request,
responseObserver);
}
/**
*
*
*
* Lists all shared albums available in the Sharing tab of the
* user's Google Photos app.
*
*/
public void listSharedAlbums(
com.google.photos.library.v1.proto.ListSharedAlbumsRequest request,
io.grpc.stub.StreamObserver
responseObserver) {
asyncUnaryCall(
getChannel().newCall(getListSharedAlbumsMethodHelper(), getCallOptions()),
request,
responseObserver);
}
}
/**
*
*
*
* Service which allows developers to perform the following actions on behalf of
* the user:
* - upload media items directly to their Google Photos library
* - create albums
* - add media items (including album enrichments) to albums
* - list and download content from their Google Photos library
* - filter results by media type, date range or content category
* - create, join, and access shared albums
*
*/
public static final class PhotosLibraryBlockingStub
extends io.grpc.stub.AbstractStub {
private PhotosLibraryBlockingStub(io.grpc.Channel channel) {
super(channel);
}
private PhotosLibraryBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected PhotosLibraryBlockingStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new PhotosLibraryBlockingStub(channel, callOptions);
}
/**
*
*
*
* Creates an album in a user's Google Photos library.
*
*/
public com.google.photos.library.v1.proto.Album createAlbum(
com.google.photos.library.v1.proto.CreateAlbumRequest request) {
return blockingUnaryCall(
getChannel(), getCreateAlbumMethodHelper(), getCallOptions(), request);
}
/**
*
*
*
* Creates one or more media items in a user's Google Photos library.
* This is the second step for creating a media item. For details regarding
* Step 1, uploading the raw bytes to a Google Server, see
* <a href="/photos/library/guides/upload-media">Uploading media</a>.
* This call adds the media item to the library. If an album `id` is
* specified, the call adds the media item to the album too. By default, the
* media item will be added to the end of the library or album.
* If an album `id` and position are both defined, the media item is
* added to the album at the specified position.
* If the call contains multiple media items, they're added at the specified
* position.
* If you are creating a media item in a shared album where you are not the
* owner, you are not allowed to position the media item. Doing so will result
* in a `BAD REQUEST` error.
*
*/
public com.google.photos.library.v1.proto.BatchCreateMediaItemsResponse batchCreateMediaItems(
com.google.photos.library.v1.proto.BatchCreateMediaItemsRequest request) {
return blockingUnaryCall(
getChannel(), getBatchCreateMediaItemsMethodHelper(), getCallOptions(), request);
}
/**
*
*
*
* Searches for media items in a user's Google Photos library.
* If no filters are set, then all media items in the user's library are
* returned.
* If an album is set, all media items in the specified album are returned.
* If filters are specified, media items that match the filters from the user's
* library are listed.
* If you set both the album and the filters, the request results in an error.
*
*/
public com.google.photos.library.v1.proto.SearchMediaItemsResponse searchMediaItems(
com.google.photos.library.v1.proto.SearchMediaItemsRequest request) {
return blockingUnaryCall(
getChannel(), getSearchMediaItemsMethodHelper(), getCallOptions(), request);
}
/**
*
*
*
* List all media items from a user's Google Photos library.
*
*/
public com.google.photos.library.v1.proto.ListMediaItemsResponse listMediaItems(
com.google.photos.library.v1.proto.ListMediaItemsRequest request) {
return blockingUnaryCall(
getChannel(), getListMediaItemsMethodHelper(), getCallOptions(), request);
}
/**
*
*
*
* Returns the media item for the specified media item `id`.
*
*/
public com.google.photos.library.v1.proto.MediaItem getMediaItem(
com.google.photos.library.v1.proto.GetMediaItemRequest request) {
return blockingUnaryCall(
getChannel(), getGetMediaItemMethodHelper(), getCallOptions(), request);
}
/**
*
*
*
* Lists all albums shown to a user in the Albums tab of the Google
* Photos app.
*
*/
public com.google.photos.library.v1.proto.ListAlbumsResponse listAlbums(
com.google.photos.library.v1.proto.ListAlbumsRequest request) {
return blockingUnaryCall(
getChannel(), getListAlbumsMethodHelper(), getCallOptions(), request);
}
/**
*
*
*
* Returns the album based on the specified `albumId` or `shareToken`.
* Exactly one of `albumId` and `shareToken` must be set.
* The `albumId` should be the ID of an album owned by the user or a shared
* album that the user has joined.
*
*/
public com.google.photos.library.v1.proto.Album getAlbum(
com.google.photos.library.v1.proto.GetAlbumRequest request) {
return blockingUnaryCall(getChannel(), getGetAlbumMethodHelper(), getCallOptions(), request);
}
/**
*
*
*
* Adds an enrichment at a specified position in a defined album.
*
*/
public com.google.photos.library.v1.proto.AddEnrichmentToAlbumResponse addEnrichmentToAlbum(
com.google.photos.library.v1.proto.AddEnrichmentToAlbumRequest request) {
return blockingUnaryCall(
getChannel(), getAddEnrichmentToAlbumMethodHelper(), getCallOptions(), request);
}
/**
*
*
*
* Joins a shared album on behalf of the Google Photos user.
*
*/
public com.google.photos.library.v1.proto.JoinSharedAlbumResponse joinSharedAlbum(
com.google.photos.library.v1.proto.JoinSharedAlbumRequest request) {
return blockingUnaryCall(
getChannel(), getJoinSharedAlbumMethodHelper(), getCallOptions(), request);
}
/**
*
*
*
* Marks an album as shared and accessible to other users. This action can
* only be performed on albums which were created by the developer via the
* API.
*
*/
public com.google.photos.library.v1.proto.ShareAlbumResponse shareAlbum(
com.google.photos.library.v1.proto.ShareAlbumRequest request) {
return blockingUnaryCall(
getChannel(), getShareAlbumMethodHelper(), getCallOptions(), request);
}
/**
*
*
*
* Lists all shared albums available in the Sharing tab of the
* user's Google Photos app.
*
*/
public com.google.photos.library.v1.proto.ListSharedAlbumsResponse listSharedAlbums(
com.google.photos.library.v1.proto.ListSharedAlbumsRequest request) {
return blockingUnaryCall(
getChannel(), getListSharedAlbumsMethodHelper(), getCallOptions(), request);
}
}
/**
*
*
*
* Service which allows developers to perform the following actions on behalf of
* the user:
* - upload media items directly to their Google Photos library
* - create albums
* - add media items (including album enrichments) to albums
* - list and download content from their Google Photos library
* - filter results by media type, date range or content category
* - create, join, and access shared albums
*
*/
public static final class PhotosLibraryFutureStub
extends io.grpc.stub.AbstractStub {
private PhotosLibraryFutureStub(io.grpc.Channel channel) {
super(channel);
}
private PhotosLibraryFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected PhotosLibraryFutureStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new PhotosLibraryFutureStub(channel, callOptions);
}
/**
*
*
*
* Creates an album in a user's Google Photos library.
*
*/
public com.google.common.util.concurrent.ListenableFuture<
com.google.photos.library.v1.proto.Album>
createAlbum(com.google.photos.library.v1.proto.CreateAlbumRequest request) {
return futureUnaryCall(
getChannel().newCall(getCreateAlbumMethodHelper(), getCallOptions()), request);
}
/**
*
*
*
* Creates one or more media items in a user's Google Photos library.
* This is the second step for creating a media item. For details regarding
* Step 1, uploading the raw bytes to a Google Server, see
* <a href="/photos/library/guides/upload-media">Uploading media</a>.
* This call adds the media item to the library. If an album `id` is
* specified, the call adds the media item to the album too. By default, the
* media item will be added to the end of the library or album.
* If an album `id` and position are both defined, the media item is
* added to the album at the specified position.
* If the call contains multiple media items, they're added at the specified
* position.
* If you are creating a media item in a shared album where you are not the
* owner, you are not allowed to position the media item. Doing so will result
* in a `BAD REQUEST` error.
*
*/
public com.google.common.util.concurrent.ListenableFuture<
com.google.photos.library.v1.proto.BatchCreateMediaItemsResponse>
batchCreateMediaItems(
com.google.photos.library.v1.proto.BatchCreateMediaItemsRequest request) {
return futureUnaryCall(
getChannel().newCall(getBatchCreateMediaItemsMethodHelper(), getCallOptions()), request);
}
/**
*
*
*
* Searches for media items in a user's Google Photos library.
* If no filters are set, then all media items in the user's library are
* returned.
* If an album is set, all media items in the specified album are returned.
* If filters are specified, media items that match the filters from the user's
* library are listed.
* If you set both the album and the filters, the request results in an error.
*
*/
public com.google.common.util.concurrent.ListenableFuture<
com.google.photos.library.v1.proto.SearchMediaItemsResponse>
searchMediaItems(com.google.photos.library.v1.proto.SearchMediaItemsRequest request) {
return futureUnaryCall(
getChannel().newCall(getSearchMediaItemsMethodHelper(), getCallOptions()), request);
}
/**
*
*
*
* List all media items from a user's Google Photos library.
*
*/
public com.google.common.util.concurrent.ListenableFuture<
com.google.photos.library.v1.proto.ListMediaItemsResponse>
listMediaItems(com.google.photos.library.v1.proto.ListMediaItemsRequest request) {
return futureUnaryCall(
getChannel().newCall(getListMediaItemsMethodHelper(), getCallOptions()), request);
}
/**
*
*
*
* Returns the media item for the specified media item `id`.
*
*/
public com.google.common.util.concurrent.ListenableFuture<
com.google.photos.library.v1.proto.MediaItem>
getMediaItem(com.google.photos.library.v1.proto.GetMediaItemRequest request) {
return futureUnaryCall(
getChannel().newCall(getGetMediaItemMethodHelper(), getCallOptions()), request);
}
/**
*
*
*
* Lists all albums shown to a user in the Albums tab of the Google
* Photos app.
*
*/
public com.google.common.util.concurrent.ListenableFuture<
com.google.photos.library.v1.proto.ListAlbumsResponse>
listAlbums(com.google.photos.library.v1.proto.ListAlbumsRequest request) {
return futureUnaryCall(
getChannel().newCall(getListAlbumsMethodHelper(), getCallOptions()), request);
}
/**
*
*
*
* Returns the album based on the specified `albumId` or `shareToken`.
* Exactly one of `albumId` and `shareToken` must be set.
* The `albumId` should be the ID of an album owned by the user or a shared
* album that the user has joined.
*
*/
public com.google.common.util.concurrent.ListenableFuture<
com.google.photos.library.v1.proto.Album>
getAlbum(com.google.photos.library.v1.proto.GetAlbumRequest request) {
return futureUnaryCall(
getChannel().newCall(getGetAlbumMethodHelper(), getCallOptions()), request);
}
/**
*
*
*
* Adds an enrichment at a specified position in a defined album.
*
*/
public com.google.common.util.concurrent.ListenableFuture<
com.google.photos.library.v1.proto.AddEnrichmentToAlbumResponse>
addEnrichmentToAlbum(
com.google.photos.library.v1.proto.AddEnrichmentToAlbumRequest request) {
return futureUnaryCall(
getChannel().newCall(getAddEnrichmentToAlbumMethodHelper(), getCallOptions()), request);
}
/**
*
*
*
* Joins a shared album on behalf of the Google Photos user.
*
*/
public com.google.common.util.concurrent.ListenableFuture<
com.google.photos.library.v1.proto.JoinSharedAlbumResponse>
joinSharedAlbum(com.google.photos.library.v1.proto.JoinSharedAlbumRequest request) {
return futureUnaryCall(
getChannel().newCall(getJoinSharedAlbumMethodHelper(), getCallOptions()), request);
}
/**
*
*
*
* Marks an album as shared and accessible to other users. This action can
* only be performed on albums which were created by the developer via the
* API.
*
*/
public com.google.common.util.concurrent.ListenableFuture<
com.google.photos.library.v1.proto.ShareAlbumResponse>
shareAlbum(com.google.photos.library.v1.proto.ShareAlbumRequest request) {
return futureUnaryCall(
getChannel().newCall(getShareAlbumMethodHelper(), getCallOptions()), request);
}
/**
*
*
*
* Lists all shared albums available in the Sharing tab of the
* user's Google Photos app.
*
*/
public com.google.common.util.concurrent.ListenableFuture<
com.google.photos.library.v1.proto.ListSharedAlbumsResponse>
listSharedAlbums(com.google.photos.library.v1.proto.ListSharedAlbumsRequest request) {
return futureUnaryCall(
getChannel().newCall(getListSharedAlbumsMethodHelper(), getCallOptions()), request);
}
}
private static final int METHODID_CREATE_ALBUM = 0;
private static final int METHODID_BATCH_CREATE_MEDIA_ITEMS = 1;
private static final int METHODID_SEARCH_MEDIA_ITEMS = 2;
private static final int METHODID_LIST_MEDIA_ITEMS = 3;
private static final int METHODID_GET_MEDIA_ITEM = 4;
private static final int METHODID_LIST_ALBUMS = 5;
private static final int METHODID_GET_ALBUM = 6;
private static final int METHODID_ADD_ENRICHMENT_TO_ALBUM = 7;
private static final int METHODID_JOIN_SHARED_ALBUM = 8;
private static final int METHODID_SHARE_ALBUM = 9;
private static final int METHODID_LIST_SHARED_ALBUMS = 10;
private static final class MethodHandlers
implements io.grpc.stub.ServerCalls.UnaryMethod,
io.grpc.stub.ServerCalls.ServerStreamingMethod,
io.grpc.stub.ServerCalls.ClientStreamingMethod,
io.grpc.stub.ServerCalls.BidiStreamingMethod {
private final PhotosLibraryImplBase serviceImpl;
private final int methodId;
MethodHandlers(PhotosLibraryImplBase serviceImpl, int methodId) {
this.serviceImpl = serviceImpl;
this.methodId = methodId;
}
@java.lang.Override
@java.lang.SuppressWarnings("unchecked")
public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) {
switch (methodId) {
case METHODID_CREATE_ALBUM:
serviceImpl.createAlbum(
(com.google.photos.library.v1.proto.CreateAlbumRequest) request,
(io.grpc.stub.StreamObserver)
responseObserver);
break;
case METHODID_BATCH_CREATE_MEDIA_ITEMS:
serviceImpl.batchCreateMediaItems(
(com.google.photos.library.v1.proto.BatchCreateMediaItemsRequest) request,
(io.grpc.stub.StreamObserver<
com.google.photos.library.v1.proto.BatchCreateMediaItemsResponse>)
responseObserver);
break;
case METHODID_SEARCH_MEDIA_ITEMS:
serviceImpl.searchMediaItems(
(com.google.photos.library.v1.proto.SearchMediaItemsRequest) request,
(io.grpc.stub.StreamObserver<
com.google.photos.library.v1.proto.SearchMediaItemsResponse>)
responseObserver);
break;
case METHODID_LIST_MEDIA_ITEMS:
serviceImpl.listMediaItems(
(com.google.photos.library.v1.proto.ListMediaItemsRequest) request,
(io.grpc.stub.StreamObserver<
com.google.photos.library.v1.proto.ListMediaItemsResponse>)
responseObserver);
break;
case METHODID_GET_MEDIA_ITEM:
serviceImpl.getMediaItem(
(com.google.photos.library.v1.proto.GetMediaItemRequest) request,
(io.grpc.stub.StreamObserver)
responseObserver);
break;
case METHODID_LIST_ALBUMS:
serviceImpl.listAlbums(
(com.google.photos.library.v1.proto.ListAlbumsRequest) request,
(io.grpc.stub.StreamObserver)
responseObserver);
break;
case METHODID_GET_ALBUM:
serviceImpl.getAlbum(
(com.google.photos.library.v1.proto.GetAlbumRequest) request,
(io.grpc.stub.StreamObserver)
responseObserver);
break;
case METHODID_ADD_ENRICHMENT_TO_ALBUM:
serviceImpl.addEnrichmentToAlbum(
(com.google.photos.library.v1.proto.AddEnrichmentToAlbumRequest) request,
(io.grpc.stub.StreamObserver<
com.google.photos.library.v1.proto.AddEnrichmentToAlbumResponse>)
responseObserver);
break;
case METHODID_JOIN_SHARED_ALBUM:
serviceImpl.joinSharedAlbum(
(com.google.photos.library.v1.proto.JoinSharedAlbumRequest) request,
(io.grpc.stub.StreamObserver<
com.google.photos.library.v1.proto.JoinSharedAlbumResponse>)
responseObserver);
break;
case METHODID_SHARE_ALBUM:
serviceImpl.shareAlbum(
(com.google.photos.library.v1.proto.ShareAlbumRequest) request,
(io.grpc.stub.StreamObserver)
responseObserver);
break;
case METHODID_LIST_SHARED_ALBUMS:
serviceImpl.listSharedAlbums(
(com.google.photos.library.v1.proto.ListSharedAlbumsRequest) request,
(io.grpc.stub.StreamObserver<
com.google.photos.library.v1.proto.ListSharedAlbumsResponse>)
responseObserver);
break;
default:
throw new AssertionError();
}
}
@java.lang.Override
@java.lang.SuppressWarnings("unchecked")
public io.grpc.stub.StreamObserver invoke(
io.grpc.stub.StreamObserver responseObserver) {
switch (methodId) {
default:
throw new AssertionError();
}
}
}
private abstract static class PhotosLibraryBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoFileDescriptorSupplier,
io.grpc.protobuf.ProtoServiceDescriptorSupplier {
PhotosLibraryBaseDescriptorSupplier() {}
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return com.google.photos.library.v1.proto.LibraryServiceProto.getDescriptor();
}
@java.lang.Override
public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
return getFileDescriptor().findServiceByName("PhotosLibrary");
}
}
private static final class PhotosLibraryFileDescriptorSupplier
extends PhotosLibraryBaseDescriptorSupplier {
PhotosLibraryFileDescriptorSupplier() {}
}
private static final class PhotosLibraryMethodDescriptorSupplier
extends PhotosLibraryBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
private final String methodName;
PhotosLibraryMethodDescriptorSupplier(String methodName) {
this.methodName = methodName;
}
@java.lang.Override
public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() {
return getServiceDescriptor().findMethodByName(methodName);
}
}
private static volatile io.grpc.ServiceDescriptor serviceDescriptor;
public static io.grpc.ServiceDescriptor getServiceDescriptor() {
io.grpc.ServiceDescriptor result = serviceDescriptor;
if (result == null) {
synchronized (PhotosLibraryGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor =
result =
io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new PhotosLibraryFileDescriptorSupplier())
.addMethod(getCreateAlbumMethodHelper())
.addMethod(getBatchCreateMediaItemsMethodHelper())
.addMethod(getSearchMediaItemsMethodHelper())
.addMethod(getListMediaItemsMethodHelper())
.addMethod(getGetMediaItemMethodHelper())
.addMethod(getListAlbumsMethodHelper())
.addMethod(getGetAlbumMethodHelper())
.addMethod(getAddEnrichmentToAlbumMethodHelper())
.addMethod(getJoinSharedAlbumMethodHelper())
.addMethod(getShareAlbumMethodHelper())
.addMethod(getListSharedAlbumsMethodHelper())
.build();
}
}
}
return result;
}
}