All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.photos.library.v1.proto.BatchCreateMediaItemsRequest Maven / Gradle / Ivy

There is a newer version: 1.7.3
Show newest version
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/photos/library/v1/photos_library.proto

package com.google.photos.library.v1.proto;

/**
 *
 *
 * 
 * Request to create one or more media items in a user's Google Photos library.
 * If an `albumid` is specified, the media items are also added to that album.
 * `albumPosition` is optional and can only be specified if an `albumId` is set.
 * 
* * Protobuf type {@code google.photos.library.v1.BatchCreateMediaItemsRequest} */ public final class BatchCreateMediaItemsRequest extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.photos.library.v1.BatchCreateMediaItemsRequest) BatchCreateMediaItemsRequestOrBuilder { private static final long serialVersionUID = 0L; // Use BatchCreateMediaItemsRequest.newBuilder() to construct. private BatchCreateMediaItemsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private BatchCreateMediaItemsRequest() { albumId_ = ""; newMediaItems_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new BatchCreateMediaItemsRequest(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private BatchCreateMediaItemsRequest( 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: { java.lang.String s = input.readStringRequireUtf8(); albumId_ = s; break; } case 18: { if (!((mutable_bitField0_ & 0x00000001) != 0)) { newMediaItems_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } newMediaItems_.add( input.readMessage( com.google.photos.library.v1.proto.NewMediaItem.parser(), extensionRegistry)); break; } case 34: { com.google.photos.library.v1.proto.AlbumPosition.Builder subBuilder = null; if (albumPosition_ != null) { subBuilder = albumPosition_.toBuilder(); } albumPosition_ = input.readMessage( com.google.photos.library.v1.proto.AlbumPosition.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(albumPosition_); albumPosition_ = subBuilder.buildPartial(); } 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)) { newMediaItems_ = java.util.Collections.unmodifiableList(newMediaItems_); } 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_BatchCreateMediaItemsRequest_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_BatchCreateMediaItemsRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.photos.library.v1.proto.BatchCreateMediaItemsRequest.class, com.google.photos.library.v1.proto.BatchCreateMediaItemsRequest.Builder.class); } public static final int ALBUM_ID_FIELD_NUMBER = 1; private volatile java.lang.Object albumId_; /** * * *
   * Identifier of the album where the media items are added. The media items
   * are also added to the user's library. This is an optional field.
   * 
* * string album_id = 1; * * @return The albumId. */ public java.lang.String getAlbumId() { java.lang.Object ref = albumId_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); albumId_ = s; return s; } } /** * * *
   * Identifier of the album where the media items are added. The media items
   * are also added to the user's library. This is an optional field.
   * 
* * string album_id = 1; * * @return The bytes for albumId. */ public com.google.protobuf.ByteString getAlbumIdBytes() { java.lang.Object ref = albumId_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); albumId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int NEW_MEDIA_ITEMS_FIELD_NUMBER = 2; private java.util.List newMediaItems_; /** * * *
   * List of media items to be created.
   * 
* * repeated .google.photos.library.v1.NewMediaItem new_media_items = 2; */ public java.util.List getNewMediaItemsList() { return newMediaItems_; } /** * * *
   * List of media items to be created.
   * 
* * repeated .google.photos.library.v1.NewMediaItem new_media_items = 2; */ public java.util.List getNewMediaItemsOrBuilderList() { return newMediaItems_; } /** * * *
   * List of media items to be created.
   * 
* * repeated .google.photos.library.v1.NewMediaItem new_media_items = 2; */ public int getNewMediaItemsCount() { return newMediaItems_.size(); } /** * * *
   * List of media items to be created.
   * 
* * repeated .google.photos.library.v1.NewMediaItem new_media_items = 2; */ public com.google.photos.library.v1.proto.NewMediaItem getNewMediaItems(int index) { return newMediaItems_.get(index); } /** * * *
   * List of media items to be created.
   * 
* * repeated .google.photos.library.v1.NewMediaItem new_media_items = 2; */ public com.google.photos.library.v1.proto.NewMediaItemOrBuilder getNewMediaItemsOrBuilder( int index) { return newMediaItems_.get(index); } public static final int ALBUM_POSITION_FIELD_NUMBER = 4; private com.google.photos.library.v1.proto.AlbumPosition albumPosition_; /** * * *
   * Position in the album where the media items are added. If not
   * specified, the media items are added to the end of the album (as per
   * the default value, that is, `LAST_IN_ALBUM`). The request fails if this
   * field is set and the `albumId` is not specified. The request will also fail
   * if you set the field and are not the owner of the shared album.
   * 
* * .google.photos.library.v1.AlbumPosition album_position = 4; * * @return Whether the albumPosition field is set. */ public boolean hasAlbumPosition() { return albumPosition_ != null; } /** * * *
   * Position in the album where the media items are added. If not
   * specified, the media items are added to the end of the album (as per
   * the default value, that is, `LAST_IN_ALBUM`). The request fails if this
   * field is set and the `albumId` is not specified. The request will also fail
   * if you set the field and are not the owner of the shared album.
   * 
* * .google.photos.library.v1.AlbumPosition album_position = 4; * * @return The albumPosition. */ public com.google.photos.library.v1.proto.AlbumPosition getAlbumPosition() { return albumPosition_ == null ? com.google.photos.library.v1.proto.AlbumPosition.getDefaultInstance() : albumPosition_; } /** * * *
   * Position in the album where the media items are added. If not
   * specified, the media items are added to the end of the album (as per
   * the default value, that is, `LAST_IN_ALBUM`). The request fails if this
   * field is set and the `albumId` is not specified. The request will also fail
   * if you set the field and are not the owner of the shared album.
   * 
* * .google.photos.library.v1.AlbumPosition album_position = 4; */ public com.google.photos.library.v1.proto.AlbumPositionOrBuilder getAlbumPositionOrBuilder() { return getAlbumPosition(); } 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 { if (!getAlbumIdBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, albumId_); } for (int i = 0; i < newMediaItems_.size(); i++) { output.writeMessage(2, newMediaItems_.get(i)); } if (albumPosition_ != null) { output.writeMessage(4, getAlbumPosition()); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getAlbumIdBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, albumId_); } for (int i = 0; i < newMediaItems_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, newMediaItems_.get(i)); } if (albumPosition_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getAlbumPosition()); } 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.BatchCreateMediaItemsRequest)) { return super.equals(obj); } com.google.photos.library.v1.proto.BatchCreateMediaItemsRequest other = (com.google.photos.library.v1.proto.BatchCreateMediaItemsRequest) obj; if (!getAlbumId().equals(other.getAlbumId())) return false; if (!getNewMediaItemsList().equals(other.getNewMediaItemsList())) return false; if (hasAlbumPosition() != other.hasAlbumPosition()) return false; if (hasAlbumPosition()) { if (!getAlbumPosition().equals(other.getAlbumPosition())) 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(); hash = (37 * hash) + ALBUM_ID_FIELD_NUMBER; hash = (53 * hash) + getAlbumId().hashCode(); if (getNewMediaItemsCount() > 0) { hash = (37 * hash) + NEW_MEDIA_ITEMS_FIELD_NUMBER; hash = (53 * hash) + getNewMediaItemsList().hashCode(); } if (hasAlbumPosition()) { hash = (37 * hash) + ALBUM_POSITION_FIELD_NUMBER; hash = (53 * hash) + getAlbumPosition().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static com.google.photos.library.v1.proto.BatchCreateMediaItemsRequest parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.photos.library.v1.proto.BatchCreateMediaItemsRequest 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.BatchCreateMediaItemsRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.photos.library.v1.proto.BatchCreateMediaItemsRequest 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.BatchCreateMediaItemsRequest parseFrom( byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.photos.library.v1.proto.BatchCreateMediaItemsRequest 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.BatchCreateMediaItemsRequest 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.BatchCreateMediaItemsRequest 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.BatchCreateMediaItemsRequest 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.BatchCreateMediaItemsRequest 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.BatchCreateMediaItemsRequest 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.BatchCreateMediaItemsRequest 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.BatchCreateMediaItemsRequest 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; } /** * * *
   * Request to create one or more media items in a user's Google Photos library.
   * If an `albumid` is specified, the media items are also added to that album.
   * `albumPosition` is optional and can only be specified if an `albumId` is set.
   * 
* * Protobuf type {@code google.photos.library.v1.BatchCreateMediaItemsRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.photos.library.v1.BatchCreateMediaItemsRequest) com.google.photos.library.v1.proto.BatchCreateMediaItemsRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.photos.library.v1.proto.LibraryServiceProto .internal_static_google_photos_library_v1_BatchCreateMediaItemsRequest_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_BatchCreateMediaItemsRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.photos.library.v1.proto.BatchCreateMediaItemsRequest.class, com.google.photos.library.v1.proto.BatchCreateMediaItemsRequest.Builder.class); } // Construct using com.google.photos.library.v1.proto.BatchCreateMediaItemsRequest.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { getNewMediaItemsFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); albumId_ = ""; if (newMediaItemsBuilder_ == null) { newMediaItems_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); } else { newMediaItemsBuilder_.clear(); } if (albumPositionBuilder_ == null) { albumPosition_ = null; } else { albumPosition_ = null; albumPositionBuilder_ = null; } 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_BatchCreateMediaItemsRequest_descriptor; } @java.lang.Override public com.google.photos.library.v1.proto.BatchCreateMediaItemsRequest getDefaultInstanceForType() { return com.google.photos.library.v1.proto.BatchCreateMediaItemsRequest.getDefaultInstance(); } @java.lang.Override public com.google.photos.library.v1.proto.BatchCreateMediaItemsRequest build() { com.google.photos.library.v1.proto.BatchCreateMediaItemsRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.photos.library.v1.proto.BatchCreateMediaItemsRequest buildPartial() { com.google.photos.library.v1.proto.BatchCreateMediaItemsRequest result = new com.google.photos.library.v1.proto.BatchCreateMediaItemsRequest(this); int from_bitField0_ = bitField0_; result.albumId_ = albumId_; if (newMediaItemsBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { newMediaItems_ = java.util.Collections.unmodifiableList(newMediaItems_); bitField0_ = (bitField0_ & ~0x00000001); } result.newMediaItems_ = newMediaItems_; } else { result.newMediaItems_ = newMediaItemsBuilder_.build(); } if (albumPositionBuilder_ == null) { result.albumPosition_ = albumPosition_; } else { result.albumPosition_ = albumPositionBuilder_.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.BatchCreateMediaItemsRequest) { return mergeFrom((com.google.photos.library.v1.proto.BatchCreateMediaItemsRequest) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom( com.google.photos.library.v1.proto.BatchCreateMediaItemsRequest other) { if (other == com.google.photos.library.v1.proto.BatchCreateMediaItemsRequest.getDefaultInstance()) return this; if (!other.getAlbumId().isEmpty()) { albumId_ = other.albumId_; onChanged(); } if (newMediaItemsBuilder_ == null) { if (!other.newMediaItems_.isEmpty()) { if (newMediaItems_.isEmpty()) { newMediaItems_ = other.newMediaItems_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureNewMediaItemsIsMutable(); newMediaItems_.addAll(other.newMediaItems_); } onChanged(); } } else { if (!other.newMediaItems_.isEmpty()) { if (newMediaItemsBuilder_.isEmpty()) { newMediaItemsBuilder_.dispose(); newMediaItemsBuilder_ = null; newMediaItems_ = other.newMediaItems_; bitField0_ = (bitField0_ & ~0x00000001); newMediaItemsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getNewMediaItemsFieldBuilder() : null; } else { newMediaItemsBuilder_.addAllMessages(other.newMediaItems_); } } } if (other.hasAlbumPosition()) { mergeAlbumPosition(other.getAlbumPosition()); } 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.BatchCreateMediaItemsRequest parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.google.photos.library.v1.proto.BatchCreateMediaItemsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private java.lang.Object albumId_ = ""; /** * * *
     * Identifier of the album where the media items are added. The media items
     * are also added to the user's library. This is an optional field.
     * 
* * string album_id = 1; * * @return The albumId. */ public java.lang.String getAlbumId() { java.lang.Object ref = albumId_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); albumId_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * Identifier of the album where the media items are added. The media items
     * are also added to the user's library. This is an optional field.
     * 
* * string album_id = 1; * * @return The bytes for albumId. */ public com.google.protobuf.ByteString getAlbumIdBytes() { java.lang.Object ref = albumId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); albumId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * Identifier of the album where the media items are added. The media items
     * are also added to the user's library. This is an optional field.
     * 
* * string album_id = 1; * * @param value The albumId to set. * @return This builder for chaining. */ public Builder setAlbumId(java.lang.String value) { if (value == null) { throw new NullPointerException(); } albumId_ = value; onChanged(); return this; } /** * * *
     * Identifier of the album where the media items are added. The media items
     * are also added to the user's library. This is an optional field.
     * 
* * string album_id = 1; * * @return This builder for chaining. */ public Builder clearAlbumId() { albumId_ = getDefaultInstance().getAlbumId(); onChanged(); return this; } /** * * *
     * Identifier of the album where the media items are added. The media items
     * are also added to the user's library. This is an optional field.
     * 
* * string album_id = 1; * * @param value The bytes for albumId to set. * @return This builder for chaining. */ public Builder setAlbumIdBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); albumId_ = value; onChanged(); return this; } private java.util.List newMediaItems_ = java.util.Collections.emptyList(); private void ensureNewMediaItemsIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { newMediaItems_ = new java.util.ArrayList( newMediaItems_); bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.photos.library.v1.proto.NewMediaItem, com.google.photos.library.v1.proto.NewMediaItem.Builder, com.google.photos.library.v1.proto.NewMediaItemOrBuilder> newMediaItemsBuilder_; /** * * *
     * List of media items to be created.
     * 
* * repeated .google.photos.library.v1.NewMediaItem new_media_items = 2; */ public java.util.List getNewMediaItemsList() { if (newMediaItemsBuilder_ == null) { return java.util.Collections.unmodifiableList(newMediaItems_); } else { return newMediaItemsBuilder_.getMessageList(); } } /** * * *
     * List of media items to be created.
     * 
* * repeated .google.photos.library.v1.NewMediaItem new_media_items = 2; */ public int getNewMediaItemsCount() { if (newMediaItemsBuilder_ == null) { return newMediaItems_.size(); } else { return newMediaItemsBuilder_.getCount(); } } /** * * *
     * List of media items to be created.
     * 
* * repeated .google.photos.library.v1.NewMediaItem new_media_items = 2; */ public com.google.photos.library.v1.proto.NewMediaItem getNewMediaItems(int index) { if (newMediaItemsBuilder_ == null) { return newMediaItems_.get(index); } else { return newMediaItemsBuilder_.getMessage(index); } } /** * * *
     * List of media items to be created.
     * 
* * repeated .google.photos.library.v1.NewMediaItem new_media_items = 2; */ public Builder setNewMediaItems( int index, com.google.photos.library.v1.proto.NewMediaItem value) { if (newMediaItemsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureNewMediaItemsIsMutable(); newMediaItems_.set(index, value); onChanged(); } else { newMediaItemsBuilder_.setMessage(index, value); } return this; } /** * * *
     * List of media items to be created.
     * 
* * repeated .google.photos.library.v1.NewMediaItem new_media_items = 2; */ public Builder setNewMediaItems( int index, com.google.photos.library.v1.proto.NewMediaItem.Builder builderForValue) { if (newMediaItemsBuilder_ == null) { ensureNewMediaItemsIsMutable(); newMediaItems_.set(index, builderForValue.build()); onChanged(); } else { newMediaItemsBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * * *
     * List of media items to be created.
     * 
* * repeated .google.photos.library.v1.NewMediaItem new_media_items = 2; */ public Builder addNewMediaItems(com.google.photos.library.v1.proto.NewMediaItem value) { if (newMediaItemsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureNewMediaItemsIsMutable(); newMediaItems_.add(value); onChanged(); } else { newMediaItemsBuilder_.addMessage(value); } return this; } /** * * *
     * List of media items to be created.
     * 
* * repeated .google.photos.library.v1.NewMediaItem new_media_items = 2; */ public Builder addNewMediaItems( int index, com.google.photos.library.v1.proto.NewMediaItem value) { if (newMediaItemsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureNewMediaItemsIsMutable(); newMediaItems_.add(index, value); onChanged(); } else { newMediaItemsBuilder_.addMessage(index, value); } return this; } /** * * *
     * List of media items to be created.
     * 
* * repeated .google.photos.library.v1.NewMediaItem new_media_items = 2; */ public Builder addNewMediaItems( com.google.photos.library.v1.proto.NewMediaItem.Builder builderForValue) { if (newMediaItemsBuilder_ == null) { ensureNewMediaItemsIsMutable(); newMediaItems_.add(builderForValue.build()); onChanged(); } else { newMediaItemsBuilder_.addMessage(builderForValue.build()); } return this; } /** * * *
     * List of media items to be created.
     * 
* * repeated .google.photos.library.v1.NewMediaItem new_media_items = 2; */ public Builder addNewMediaItems( int index, com.google.photos.library.v1.proto.NewMediaItem.Builder builderForValue) { if (newMediaItemsBuilder_ == null) { ensureNewMediaItemsIsMutable(); newMediaItems_.add(index, builderForValue.build()); onChanged(); } else { newMediaItemsBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * * *
     * List of media items to be created.
     * 
* * repeated .google.photos.library.v1.NewMediaItem new_media_items = 2; */ public Builder addAllNewMediaItems( java.lang.Iterable values) { if (newMediaItemsBuilder_ == null) { ensureNewMediaItemsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, newMediaItems_); onChanged(); } else { newMediaItemsBuilder_.addAllMessages(values); } return this; } /** * * *
     * List of media items to be created.
     * 
* * repeated .google.photos.library.v1.NewMediaItem new_media_items = 2; */ public Builder clearNewMediaItems() { if (newMediaItemsBuilder_ == null) { newMediaItems_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { newMediaItemsBuilder_.clear(); } return this; } /** * * *
     * List of media items to be created.
     * 
* * repeated .google.photos.library.v1.NewMediaItem new_media_items = 2; */ public Builder removeNewMediaItems(int index) { if (newMediaItemsBuilder_ == null) { ensureNewMediaItemsIsMutable(); newMediaItems_.remove(index); onChanged(); } else { newMediaItemsBuilder_.remove(index); } return this; } /** * * *
     * List of media items to be created.
     * 
* * repeated .google.photos.library.v1.NewMediaItem new_media_items = 2; */ public com.google.photos.library.v1.proto.NewMediaItem.Builder getNewMediaItemsBuilder( int index) { return getNewMediaItemsFieldBuilder().getBuilder(index); } /** * * *
     * List of media items to be created.
     * 
* * repeated .google.photos.library.v1.NewMediaItem new_media_items = 2; */ public com.google.photos.library.v1.proto.NewMediaItemOrBuilder getNewMediaItemsOrBuilder( int index) { if (newMediaItemsBuilder_ == null) { return newMediaItems_.get(index); } else { return newMediaItemsBuilder_.getMessageOrBuilder(index); } } /** * * *
     * List of media items to be created.
     * 
* * repeated .google.photos.library.v1.NewMediaItem new_media_items = 2; */ public java.util.List getNewMediaItemsOrBuilderList() { if (newMediaItemsBuilder_ != null) { return newMediaItemsBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(newMediaItems_); } } /** * * *
     * List of media items to be created.
     * 
* * repeated .google.photos.library.v1.NewMediaItem new_media_items = 2; */ public com.google.photos.library.v1.proto.NewMediaItem.Builder addNewMediaItemsBuilder() { return getNewMediaItemsFieldBuilder() .addBuilder(com.google.photos.library.v1.proto.NewMediaItem.getDefaultInstance()); } /** * * *
     * List of media items to be created.
     * 
* * repeated .google.photos.library.v1.NewMediaItem new_media_items = 2; */ public com.google.photos.library.v1.proto.NewMediaItem.Builder addNewMediaItemsBuilder( int index) { return getNewMediaItemsFieldBuilder() .addBuilder(index, com.google.photos.library.v1.proto.NewMediaItem.getDefaultInstance()); } /** * * *
     * List of media items to be created.
     * 
* * repeated .google.photos.library.v1.NewMediaItem new_media_items = 2; */ public java.util.List getNewMediaItemsBuilderList() { return getNewMediaItemsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.photos.library.v1.proto.NewMediaItem, com.google.photos.library.v1.proto.NewMediaItem.Builder, com.google.photos.library.v1.proto.NewMediaItemOrBuilder> getNewMediaItemsFieldBuilder() { if (newMediaItemsBuilder_ == null) { newMediaItemsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.google.photos.library.v1.proto.NewMediaItem, com.google.photos.library.v1.proto.NewMediaItem.Builder, com.google.photos.library.v1.proto.NewMediaItemOrBuilder>( newMediaItems_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); newMediaItems_ = null; } return newMediaItemsBuilder_; } private com.google.photos.library.v1.proto.AlbumPosition albumPosition_; private com.google.protobuf.SingleFieldBuilderV3< com.google.photos.library.v1.proto.AlbumPosition, com.google.photos.library.v1.proto.AlbumPosition.Builder, com.google.photos.library.v1.proto.AlbumPositionOrBuilder> albumPositionBuilder_; /** * * *
     * Position in the album where the media items are added. If not
     * specified, the media items are added to the end of the album (as per
     * the default value, that is, `LAST_IN_ALBUM`). The request fails if this
     * field is set and the `albumId` is not specified. The request will also fail
     * if you set the field and are not the owner of the shared album.
     * 
* * .google.photos.library.v1.AlbumPosition album_position = 4; * * @return Whether the albumPosition field is set. */ public boolean hasAlbumPosition() { return albumPositionBuilder_ != null || albumPosition_ != null; } /** * * *
     * Position in the album where the media items are added. If not
     * specified, the media items are added to the end of the album (as per
     * the default value, that is, `LAST_IN_ALBUM`). The request fails if this
     * field is set and the `albumId` is not specified. The request will also fail
     * if you set the field and are not the owner of the shared album.
     * 
* * .google.photos.library.v1.AlbumPosition album_position = 4; * * @return The albumPosition. */ public com.google.photos.library.v1.proto.AlbumPosition getAlbumPosition() { if (albumPositionBuilder_ == null) { return albumPosition_ == null ? com.google.photos.library.v1.proto.AlbumPosition.getDefaultInstance() : albumPosition_; } else { return albumPositionBuilder_.getMessage(); } } /** * * *
     * Position in the album where the media items are added. If not
     * specified, the media items are added to the end of the album (as per
     * the default value, that is, `LAST_IN_ALBUM`). The request fails if this
     * field is set and the `albumId` is not specified. The request will also fail
     * if you set the field and are not the owner of the shared album.
     * 
* * .google.photos.library.v1.AlbumPosition album_position = 4; */ public Builder setAlbumPosition(com.google.photos.library.v1.proto.AlbumPosition value) { if (albumPositionBuilder_ == null) { if (value == null) { throw new NullPointerException(); } albumPosition_ = value; onChanged(); } else { albumPositionBuilder_.setMessage(value); } return this; } /** * * *
     * Position in the album where the media items are added. If not
     * specified, the media items are added to the end of the album (as per
     * the default value, that is, `LAST_IN_ALBUM`). The request fails if this
     * field is set and the `albumId` is not specified. The request will also fail
     * if you set the field and are not the owner of the shared album.
     * 
* * .google.photos.library.v1.AlbumPosition album_position = 4; */ public Builder setAlbumPosition( com.google.photos.library.v1.proto.AlbumPosition.Builder builderForValue) { if (albumPositionBuilder_ == null) { albumPosition_ = builderForValue.build(); onChanged(); } else { albumPositionBuilder_.setMessage(builderForValue.build()); } return this; } /** * * *
     * Position in the album where the media items are added. If not
     * specified, the media items are added to the end of the album (as per
     * the default value, that is, `LAST_IN_ALBUM`). The request fails if this
     * field is set and the `albumId` is not specified. The request will also fail
     * if you set the field and are not the owner of the shared album.
     * 
* * .google.photos.library.v1.AlbumPosition album_position = 4; */ public Builder mergeAlbumPosition(com.google.photos.library.v1.proto.AlbumPosition value) { if (albumPositionBuilder_ == null) { if (albumPosition_ != null) { albumPosition_ = com.google.photos.library.v1.proto.AlbumPosition.newBuilder(albumPosition_) .mergeFrom(value) .buildPartial(); } else { albumPosition_ = value; } onChanged(); } else { albumPositionBuilder_.mergeFrom(value); } return this; } /** * * *
     * Position in the album where the media items are added. If not
     * specified, the media items are added to the end of the album (as per
     * the default value, that is, `LAST_IN_ALBUM`). The request fails if this
     * field is set and the `albumId` is not specified. The request will also fail
     * if you set the field and are not the owner of the shared album.
     * 
* * .google.photos.library.v1.AlbumPosition album_position = 4; */ public Builder clearAlbumPosition() { if (albumPositionBuilder_ == null) { albumPosition_ = null; onChanged(); } else { albumPosition_ = null; albumPositionBuilder_ = null; } return this; } /** * * *
     * Position in the album where the media items are added. If not
     * specified, the media items are added to the end of the album (as per
     * the default value, that is, `LAST_IN_ALBUM`). The request fails if this
     * field is set and the `albumId` is not specified. The request will also fail
     * if you set the field and are not the owner of the shared album.
     * 
* * .google.photos.library.v1.AlbumPosition album_position = 4; */ public com.google.photos.library.v1.proto.AlbumPosition.Builder getAlbumPositionBuilder() { onChanged(); return getAlbumPositionFieldBuilder().getBuilder(); } /** * * *
     * Position in the album where the media items are added. If not
     * specified, the media items are added to the end of the album (as per
     * the default value, that is, `LAST_IN_ALBUM`). The request fails if this
     * field is set and the `albumId` is not specified. The request will also fail
     * if you set the field and are not the owner of the shared album.
     * 
* * .google.photos.library.v1.AlbumPosition album_position = 4; */ public com.google.photos.library.v1.proto.AlbumPositionOrBuilder getAlbumPositionOrBuilder() { if (albumPositionBuilder_ != null) { return albumPositionBuilder_.getMessageOrBuilder(); } else { return albumPosition_ == null ? com.google.photos.library.v1.proto.AlbumPosition.getDefaultInstance() : albumPosition_; } } /** * * *
     * Position in the album where the media items are added. If not
     * specified, the media items are added to the end of the album (as per
     * the default value, that is, `LAST_IN_ALBUM`). The request fails if this
     * field is set and the `albumId` is not specified. The request will also fail
     * if you set the field and are not the owner of the shared album.
     * 
* * .google.photos.library.v1.AlbumPosition album_position = 4; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.photos.library.v1.proto.AlbumPosition, com.google.photos.library.v1.proto.AlbumPosition.Builder, com.google.photos.library.v1.proto.AlbumPositionOrBuilder> getAlbumPositionFieldBuilder() { if (albumPositionBuilder_ == null) { albumPositionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.photos.library.v1.proto.AlbumPosition, com.google.photos.library.v1.proto.AlbumPosition.Builder, com.google.photos.library.v1.proto.AlbumPositionOrBuilder>( getAlbumPosition(), getParentForChildren(), isClean()); albumPosition_ = null; } return albumPositionBuilder_; } @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.BatchCreateMediaItemsRequest) } // @@protoc_insertion_point(class_scope:google.photos.library.v1.BatchCreateMediaItemsRequest) private static final com.google.photos.library.v1.proto.BatchCreateMediaItemsRequest DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.photos.library.v1.proto.BatchCreateMediaItemsRequest(); } public static com.google.photos.library.v1.proto.BatchCreateMediaItemsRequest getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public BatchCreateMediaItemsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new BatchCreateMediaItemsRequest(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.BatchCreateMediaItemsRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy