com.google.photos.library.v1.proto.BatchGetMediaItemsResponse 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
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/photos/library/v1/photos_library.proto
package com.google.photos.library.v1.proto;
/**
*
*
*
* Response to retrieve a list of media items.
*
*
* Protobuf type {@code google.photos.library.v1.BatchGetMediaItemsResponse}
*/
public final class BatchGetMediaItemsResponse extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.photos.library.v1.BatchGetMediaItemsResponse)
BatchGetMediaItemsResponseOrBuilder {
private static final long serialVersionUID = 0L;
// Use BatchGetMediaItemsResponse.newBuilder() to construct.
private BatchGetMediaItemsResponse(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private BatchGetMediaItemsResponse() {
mediaItemResults_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new BatchGetMediaItemsResponse();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
private BatchGetMediaItemsResponse(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
mediaItemResults_ =
new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
mediaItemResults_.add(
input.readMessage(
com.google.photos.library.v1.proto.MediaItemResult.parser(),
extensionRegistry));
break;
}
default:
{
if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
mediaItemResults_ = java.util.Collections.unmodifiableList(mediaItemResults_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.photos.library.v1.proto.LibraryServiceProto
.internal_static_google_photos_library_v1_BatchGetMediaItemsResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.photos.library.v1.proto.LibraryServiceProto
.internal_static_google_photos_library_v1_BatchGetMediaItemsResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.photos.library.v1.proto.BatchGetMediaItemsResponse.class,
com.google.photos.library.v1.proto.BatchGetMediaItemsResponse.Builder.class);
}
public static final int MEDIA_ITEM_RESULTS_FIELD_NUMBER = 1;
private java.util.List mediaItemResults_;
/**
*
*
*
* Output only. List of media items retrieved.
* Note that even if the call to BatchGetMediaItems succeeds, there may have
* been failures for some media items in the batch. These failures are
* indicated in each
* [MediaItemResult.status][google.photos.library.v1.MediaItemResult.status].
*
*
* repeated .google.photos.library.v1.MediaItemResult media_item_results = 1;
*/
public java.util.List
getMediaItemResultsList() {
return mediaItemResults_;
}
/**
*
*
*
* Output only. List of media items retrieved.
* Note that even if the call to BatchGetMediaItems succeeds, there may have
* been failures for some media items in the batch. These failures are
* indicated in each
* [MediaItemResult.status][google.photos.library.v1.MediaItemResult.status].
*
*
* repeated .google.photos.library.v1.MediaItemResult media_item_results = 1;
*/
public java.util.List extends com.google.photos.library.v1.proto.MediaItemResultOrBuilder>
getMediaItemResultsOrBuilderList() {
return mediaItemResults_;
}
/**
*
*
*
* Output only. List of media items retrieved.
* Note that even if the call to BatchGetMediaItems succeeds, there may have
* been failures for some media items in the batch. These failures are
* indicated in each
* [MediaItemResult.status][google.photos.library.v1.MediaItemResult.status].
*
*
* repeated .google.photos.library.v1.MediaItemResult media_item_results = 1;
*/
public int getMediaItemResultsCount() {
return mediaItemResults_.size();
}
/**
*
*
*
* Output only. List of media items retrieved.
* Note that even if the call to BatchGetMediaItems succeeds, there may have
* been failures for some media items in the batch. These failures are
* indicated in each
* [MediaItemResult.status][google.photos.library.v1.MediaItemResult.status].
*
*
* repeated .google.photos.library.v1.MediaItemResult media_item_results = 1;
*/
public com.google.photos.library.v1.proto.MediaItemResult getMediaItemResults(int index) {
return mediaItemResults_.get(index);
}
/**
*
*
*
* Output only. List of media items retrieved.
* Note that even if the call to BatchGetMediaItems succeeds, there may have
* been failures for some media items in the batch. These failures are
* indicated in each
* [MediaItemResult.status][google.photos.library.v1.MediaItemResult.status].
*
*
* repeated .google.photos.library.v1.MediaItemResult media_item_results = 1;
*/
public com.google.photos.library.v1.proto.MediaItemResultOrBuilder getMediaItemResultsOrBuilder(
int index) {
return mediaItemResults_.get(index);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
for (int i = 0; i < mediaItemResults_.size(); i++) {
output.writeMessage(1, mediaItemResults_.get(i));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < mediaItemResults_.size(); i++) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, mediaItemResults_.get(i));
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.photos.library.v1.proto.BatchGetMediaItemsResponse)) {
return super.equals(obj);
}
com.google.photos.library.v1.proto.BatchGetMediaItemsResponse other =
(com.google.photos.library.v1.proto.BatchGetMediaItemsResponse) obj;
if (!getMediaItemResultsList().equals(other.getMediaItemResultsList())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (getMediaItemResultsCount() > 0) {
hash = (37 * hash) + MEDIA_ITEM_RESULTS_FIELD_NUMBER;
hash = (53 * hash) + getMediaItemResultsList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.photos.library.v1.proto.BatchGetMediaItemsResponse parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.photos.library.v1.proto.BatchGetMediaItemsResponse parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.photos.library.v1.proto.BatchGetMediaItemsResponse parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.photos.library.v1.proto.BatchGetMediaItemsResponse parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.photos.library.v1.proto.BatchGetMediaItemsResponse parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.photos.library.v1.proto.BatchGetMediaItemsResponse parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.photos.library.v1.proto.BatchGetMediaItemsResponse parseFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.photos.library.v1.proto.BatchGetMediaItemsResponse parseFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
public static com.google.photos.library.v1.proto.BatchGetMediaItemsResponse parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.photos.library.v1.proto.BatchGetMediaItemsResponse parseDelimitedFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
}
public static com.google.photos.library.v1.proto.BatchGetMediaItemsResponse parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.photos.library.v1.proto.BatchGetMediaItemsResponse parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(
com.google.photos.library.v1.proto.BatchGetMediaItemsResponse prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* Response to retrieve a list of media items.
*
*
* Protobuf type {@code google.photos.library.v1.BatchGetMediaItemsResponse}
*/
public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.photos.library.v1.BatchGetMediaItemsResponse)
com.google.photos.library.v1.proto.BatchGetMediaItemsResponseOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.photos.library.v1.proto.LibraryServiceProto
.internal_static_google_photos_library_v1_BatchGetMediaItemsResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.photos.library.v1.proto.LibraryServiceProto
.internal_static_google_photos_library_v1_BatchGetMediaItemsResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.photos.library.v1.proto.BatchGetMediaItemsResponse.class,
com.google.photos.library.v1.proto.BatchGetMediaItemsResponse.Builder.class);
}
// Construct using com.google.photos.library.v1.proto.BatchGetMediaItemsResponse.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getMediaItemResultsFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (mediaItemResultsBuilder_ == null) {
mediaItemResults_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
mediaItemResultsBuilder_.clear();
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.photos.library.v1.proto.LibraryServiceProto
.internal_static_google_photos_library_v1_BatchGetMediaItemsResponse_descriptor;
}
@java.lang.Override
public com.google.photos.library.v1.proto.BatchGetMediaItemsResponse
getDefaultInstanceForType() {
return com.google.photos.library.v1.proto.BatchGetMediaItemsResponse.getDefaultInstance();
}
@java.lang.Override
public com.google.photos.library.v1.proto.BatchGetMediaItemsResponse build() {
com.google.photos.library.v1.proto.BatchGetMediaItemsResponse result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.photos.library.v1.proto.BatchGetMediaItemsResponse buildPartial() {
com.google.photos.library.v1.proto.BatchGetMediaItemsResponse result =
new com.google.photos.library.v1.proto.BatchGetMediaItemsResponse(this);
int from_bitField0_ = bitField0_;
if (mediaItemResultsBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
mediaItemResults_ = java.util.Collections.unmodifiableList(mediaItemResults_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.mediaItemResults_ = mediaItemResults_;
} else {
result.mediaItemResults_ = mediaItemResultsBuilder_.build();
}
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.photos.library.v1.proto.BatchGetMediaItemsResponse) {
return mergeFrom((com.google.photos.library.v1.proto.BatchGetMediaItemsResponse) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.photos.library.v1.proto.BatchGetMediaItemsResponse other) {
if (other
== com.google.photos.library.v1.proto.BatchGetMediaItemsResponse.getDefaultInstance())
return this;
if (mediaItemResultsBuilder_ == null) {
if (!other.mediaItemResults_.isEmpty()) {
if (mediaItemResults_.isEmpty()) {
mediaItemResults_ = other.mediaItemResults_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureMediaItemResultsIsMutable();
mediaItemResults_.addAll(other.mediaItemResults_);
}
onChanged();
}
} else {
if (!other.mediaItemResults_.isEmpty()) {
if (mediaItemResultsBuilder_.isEmpty()) {
mediaItemResultsBuilder_.dispose();
mediaItemResultsBuilder_ = null;
mediaItemResults_ = other.mediaItemResults_;
bitField0_ = (bitField0_ & ~0x00000001);
mediaItemResultsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
? getMediaItemResultsFieldBuilder()
: null;
} else {
mediaItemResultsBuilder_.addAllMessages(other.mediaItemResults_);
}
}
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.google.photos.library.v1.proto.BatchGetMediaItemsResponse parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage =
(com.google.photos.library.v1.proto.BatchGetMediaItemsResponse)
e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.util.List mediaItemResults_ =
java.util.Collections.emptyList();
private void ensureMediaItemResultsIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
mediaItemResults_ =
new java.util.ArrayList(
mediaItemResults_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.photos.library.v1.proto.MediaItemResult,
com.google.photos.library.v1.proto.MediaItemResult.Builder,
com.google.photos.library.v1.proto.MediaItemResultOrBuilder>
mediaItemResultsBuilder_;
/**
*
*
*
* Output only. List of media items retrieved.
* Note that even if the call to BatchGetMediaItems succeeds, there may have
* been failures for some media items in the batch. These failures are
* indicated in each
* [MediaItemResult.status][google.photos.library.v1.MediaItemResult.status].
*
*
* repeated .google.photos.library.v1.MediaItemResult media_item_results = 1;
*/
public java.util.List
getMediaItemResultsList() {
if (mediaItemResultsBuilder_ == null) {
return java.util.Collections.unmodifiableList(mediaItemResults_);
} else {
return mediaItemResultsBuilder_.getMessageList();
}
}
/**
*
*
*
* Output only. List of media items retrieved.
* Note that even if the call to BatchGetMediaItems succeeds, there may have
* been failures for some media items in the batch. These failures are
* indicated in each
* [MediaItemResult.status][google.photos.library.v1.MediaItemResult.status].
*
*
* repeated .google.photos.library.v1.MediaItemResult media_item_results = 1;
*/
public int getMediaItemResultsCount() {
if (mediaItemResultsBuilder_ == null) {
return mediaItemResults_.size();
} else {
return mediaItemResultsBuilder_.getCount();
}
}
/**
*
*
*
* Output only. List of media items retrieved.
* Note that even if the call to BatchGetMediaItems succeeds, there may have
* been failures for some media items in the batch. These failures are
* indicated in each
* [MediaItemResult.status][google.photos.library.v1.MediaItemResult.status].
*
*
* repeated .google.photos.library.v1.MediaItemResult media_item_results = 1;
*/
public com.google.photos.library.v1.proto.MediaItemResult getMediaItemResults(int index) {
if (mediaItemResultsBuilder_ == null) {
return mediaItemResults_.get(index);
} else {
return mediaItemResultsBuilder_.getMessage(index);
}
}
/**
*
*
*
* Output only. List of media items retrieved.
* Note that even if the call to BatchGetMediaItems succeeds, there may have
* been failures for some media items in the batch. These failures are
* indicated in each
* [MediaItemResult.status][google.photos.library.v1.MediaItemResult.status].
*
*
* repeated .google.photos.library.v1.MediaItemResult media_item_results = 1;
*/
public Builder setMediaItemResults(
int index, com.google.photos.library.v1.proto.MediaItemResult value) {
if (mediaItemResultsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureMediaItemResultsIsMutable();
mediaItemResults_.set(index, value);
onChanged();
} else {
mediaItemResultsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
*
*
* Output only. List of media items retrieved.
* Note that even if the call to BatchGetMediaItems succeeds, there may have
* been failures for some media items in the batch. These failures are
* indicated in each
* [MediaItemResult.status][google.photos.library.v1.MediaItemResult.status].
*
*
* repeated .google.photos.library.v1.MediaItemResult media_item_results = 1;
*/
public Builder setMediaItemResults(
int index, com.google.photos.library.v1.proto.MediaItemResult.Builder builderForValue) {
if (mediaItemResultsBuilder_ == null) {
ensureMediaItemResultsIsMutable();
mediaItemResults_.set(index, builderForValue.build());
onChanged();
} else {
mediaItemResultsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* Output only. List of media items retrieved.
* Note that even if the call to BatchGetMediaItems succeeds, there may have
* been failures for some media items in the batch. These failures are
* indicated in each
* [MediaItemResult.status][google.photos.library.v1.MediaItemResult.status].
*
*
* repeated .google.photos.library.v1.MediaItemResult media_item_results = 1;
*/
public Builder addMediaItemResults(com.google.photos.library.v1.proto.MediaItemResult value) {
if (mediaItemResultsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureMediaItemResultsIsMutable();
mediaItemResults_.add(value);
onChanged();
} else {
mediaItemResultsBuilder_.addMessage(value);
}
return this;
}
/**
*
*
*
* Output only. List of media items retrieved.
* Note that even if the call to BatchGetMediaItems succeeds, there may have
* been failures for some media items in the batch. These failures are
* indicated in each
* [MediaItemResult.status][google.photos.library.v1.MediaItemResult.status].
*
*
* repeated .google.photos.library.v1.MediaItemResult media_item_results = 1;
*/
public Builder addMediaItemResults(
int index, com.google.photos.library.v1.proto.MediaItemResult value) {
if (mediaItemResultsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureMediaItemResultsIsMutable();
mediaItemResults_.add(index, value);
onChanged();
} else {
mediaItemResultsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
*
*
* Output only. List of media items retrieved.
* Note that even if the call to BatchGetMediaItems succeeds, there may have
* been failures for some media items in the batch. These failures are
* indicated in each
* [MediaItemResult.status][google.photos.library.v1.MediaItemResult.status].
*
*
* repeated .google.photos.library.v1.MediaItemResult media_item_results = 1;
*/
public Builder addMediaItemResults(
com.google.photos.library.v1.proto.MediaItemResult.Builder builderForValue) {
if (mediaItemResultsBuilder_ == null) {
ensureMediaItemResultsIsMutable();
mediaItemResults_.add(builderForValue.build());
onChanged();
} else {
mediaItemResultsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
*
*
* Output only. List of media items retrieved.
* Note that even if the call to BatchGetMediaItems succeeds, there may have
* been failures for some media items in the batch. These failures are
* indicated in each
* [MediaItemResult.status][google.photos.library.v1.MediaItemResult.status].
*
*
* repeated .google.photos.library.v1.MediaItemResult media_item_results = 1;
*/
public Builder addMediaItemResults(
int index, com.google.photos.library.v1.proto.MediaItemResult.Builder builderForValue) {
if (mediaItemResultsBuilder_ == null) {
ensureMediaItemResultsIsMutable();
mediaItemResults_.add(index, builderForValue.build());
onChanged();
} else {
mediaItemResultsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* Output only. List of media items retrieved.
* Note that even if the call to BatchGetMediaItems succeeds, there may have
* been failures for some media items in the batch. These failures are
* indicated in each
* [MediaItemResult.status][google.photos.library.v1.MediaItemResult.status].
*
*
* repeated .google.photos.library.v1.MediaItemResult media_item_results = 1;
*/
public Builder addAllMediaItemResults(
java.lang.Iterable extends com.google.photos.library.v1.proto.MediaItemResult> values) {
if (mediaItemResultsBuilder_ == null) {
ensureMediaItemResultsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, mediaItemResults_);
onChanged();
} else {
mediaItemResultsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
*
*
* Output only. List of media items retrieved.
* Note that even if the call to BatchGetMediaItems succeeds, there may have
* been failures for some media items in the batch. These failures are
* indicated in each
* [MediaItemResult.status][google.photos.library.v1.MediaItemResult.status].
*
*
* repeated .google.photos.library.v1.MediaItemResult media_item_results = 1;
*/
public Builder clearMediaItemResults() {
if (mediaItemResultsBuilder_ == null) {
mediaItemResults_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
mediaItemResultsBuilder_.clear();
}
return this;
}
/**
*
*
*
* Output only. List of media items retrieved.
* Note that even if the call to BatchGetMediaItems succeeds, there may have
* been failures for some media items in the batch. These failures are
* indicated in each
* [MediaItemResult.status][google.photos.library.v1.MediaItemResult.status].
*
*
* repeated .google.photos.library.v1.MediaItemResult media_item_results = 1;
*/
public Builder removeMediaItemResults(int index) {
if (mediaItemResultsBuilder_ == null) {
ensureMediaItemResultsIsMutable();
mediaItemResults_.remove(index);
onChanged();
} else {
mediaItemResultsBuilder_.remove(index);
}
return this;
}
/**
*
*
*
* Output only. List of media items retrieved.
* Note that even if the call to BatchGetMediaItems succeeds, there may have
* been failures for some media items in the batch. These failures are
* indicated in each
* [MediaItemResult.status][google.photos.library.v1.MediaItemResult.status].
*
*
* repeated .google.photos.library.v1.MediaItemResult media_item_results = 1;
*/
public com.google.photos.library.v1.proto.MediaItemResult.Builder getMediaItemResultsBuilder(
int index) {
return getMediaItemResultsFieldBuilder().getBuilder(index);
}
/**
*
*
*
* Output only. List of media items retrieved.
* Note that even if the call to BatchGetMediaItems succeeds, there may have
* been failures for some media items in the batch. These failures are
* indicated in each
* [MediaItemResult.status][google.photos.library.v1.MediaItemResult.status].
*
*
* repeated .google.photos.library.v1.MediaItemResult media_item_results = 1;
*/
public com.google.photos.library.v1.proto.MediaItemResultOrBuilder getMediaItemResultsOrBuilder(
int index) {
if (mediaItemResultsBuilder_ == null) {
return mediaItemResults_.get(index);
} else {
return mediaItemResultsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
*
*
* Output only. List of media items retrieved.
* Note that even if the call to BatchGetMediaItems succeeds, there may have
* been failures for some media items in the batch. These failures are
* indicated in each
* [MediaItemResult.status][google.photos.library.v1.MediaItemResult.status].
*
*
* repeated .google.photos.library.v1.MediaItemResult media_item_results = 1;
*/
public java.util.List extends com.google.photos.library.v1.proto.MediaItemResultOrBuilder>
getMediaItemResultsOrBuilderList() {
if (mediaItemResultsBuilder_ != null) {
return mediaItemResultsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(mediaItemResults_);
}
}
/**
*
*
*
* Output only. List of media items retrieved.
* Note that even if the call to BatchGetMediaItems succeeds, there may have
* been failures for some media items in the batch. These failures are
* indicated in each
* [MediaItemResult.status][google.photos.library.v1.MediaItemResult.status].
*
*
* repeated .google.photos.library.v1.MediaItemResult media_item_results = 1;
*/
public com.google.photos.library.v1.proto.MediaItemResult.Builder addMediaItemResultsBuilder() {
return getMediaItemResultsFieldBuilder()
.addBuilder(com.google.photos.library.v1.proto.MediaItemResult.getDefaultInstance());
}
/**
*
*
*
* Output only. List of media items retrieved.
* Note that even if the call to BatchGetMediaItems succeeds, there may have
* been failures for some media items in the batch. These failures are
* indicated in each
* [MediaItemResult.status][google.photos.library.v1.MediaItemResult.status].
*
*
* repeated .google.photos.library.v1.MediaItemResult media_item_results = 1;
*/
public com.google.photos.library.v1.proto.MediaItemResult.Builder addMediaItemResultsBuilder(
int index) {
return getMediaItemResultsFieldBuilder()
.addBuilder(
index, com.google.photos.library.v1.proto.MediaItemResult.getDefaultInstance());
}
/**
*
*
*
* Output only. List of media items retrieved.
* Note that even if the call to BatchGetMediaItems succeeds, there may have
* been failures for some media items in the batch. These failures are
* indicated in each
* [MediaItemResult.status][google.photos.library.v1.MediaItemResult.status].
*
*
* repeated .google.photos.library.v1.MediaItemResult media_item_results = 1;
*/
public java.util.List
getMediaItemResultsBuilderList() {
return getMediaItemResultsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.photos.library.v1.proto.MediaItemResult,
com.google.photos.library.v1.proto.MediaItemResult.Builder,
com.google.photos.library.v1.proto.MediaItemResultOrBuilder>
getMediaItemResultsFieldBuilder() {
if (mediaItemResultsBuilder_ == null) {
mediaItemResultsBuilder_ =
new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.photos.library.v1.proto.MediaItemResult,
com.google.photos.library.v1.proto.MediaItemResult.Builder,
com.google.photos.library.v1.proto.MediaItemResultOrBuilder>(
mediaItemResults_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
mediaItemResults_ = null;
}
return mediaItemResultsBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.photos.library.v1.BatchGetMediaItemsResponse)
}
// @@protoc_insertion_point(class_scope:google.photos.library.v1.BatchGetMediaItemsResponse)
private static final com.google.photos.library.v1.proto.BatchGetMediaItemsResponse
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.photos.library.v1.proto.BatchGetMediaItemsResponse();
}
public static com.google.photos.library.v1.proto.BatchGetMediaItemsResponse getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public BatchGetMediaItemsResponse parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new BatchGetMediaItemsResponse(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.photos.library.v1.proto.BatchGetMediaItemsResponse getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}