Class BatchCreateMediaItemsRequest.Builder

  • All Implemented Interfaces:
    BatchCreateMediaItemsRequestOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, java.lang.Cloneable
    Enclosing class:
    BatchCreateMediaItemsRequest

    public static final class BatchCreateMediaItemsRequest.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<BatchCreateMediaItemsRequest.Builder>
    implements BatchCreateMediaItemsRequestOrBuilder
     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 google.photos.library.v1.BatchCreateMediaItemsRequest
    • Method Detail

      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<BatchCreateMediaItemsRequest.Builder>
      • getDescriptorForType

        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface com.google.protobuf.Message.Builder
        Specified by:
        getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<BatchCreateMediaItemsRequest.Builder>
      • getDefaultInstanceForType

        public BatchCreateMediaItemsRequest getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
      • build

        public BatchCreateMediaItemsRequest build()
        Specified by:
        build in interface com.google.protobuf.Message.Builder
        Specified by:
        build in interface com.google.protobuf.MessageLite.Builder
      • buildPartial

        public BatchCreateMediaItemsRequest buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
      • setRepeatedField

        public BatchCreateMediaItemsRequest.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                                     int index,
                                                                     java.lang.Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<BatchCreateMediaItemsRequest.Builder>
      • addRepeatedField

        public BatchCreateMediaItemsRequest.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                                     java.lang.Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<BatchCreateMediaItemsRequest.Builder>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<BatchCreateMediaItemsRequest.Builder>
      • mergeFrom

        public BatchCreateMediaItemsRequest.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                                              com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                                       throws java.io.IOException
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Specified by:
        mergeFrom in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<BatchCreateMediaItemsRequest.Builder>
        Throws:
        java.io.IOException
      • getAlbumId

        public java.lang.String getAlbumId()
         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;
        Specified by:
        getAlbumId in interface BatchCreateMediaItemsRequestOrBuilder
        Returns:
        The albumId.
      • getAlbumIdBytes

        public com.google.protobuf.ByteString getAlbumIdBytes()
         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;
        Specified by:
        getAlbumIdBytes in interface BatchCreateMediaItemsRequestOrBuilder
        Returns:
        The bytes for albumId.
      • setAlbumId

        public BatchCreateMediaItemsRequest.Builder setAlbumId​(java.lang.String value)
         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;
        Parameters:
        value - The albumId to set.
        Returns:
        This builder for chaining.
      • clearAlbumId

        public BatchCreateMediaItemsRequest.Builder clearAlbumId()
         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;
        Returns:
        This builder for chaining.
      • setAlbumIdBytes

        public BatchCreateMediaItemsRequest.Builder setAlbumIdBytes​(com.google.protobuf.ByteString value)
         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;
        Parameters:
        value - The bytes for albumId to set.
        Returns:
        This builder for chaining.
      • addAllNewMediaItems

        public BatchCreateMediaItemsRequest.Builder addAllNewMediaItems​(java.lang.Iterable<? extends NewMediaItem> values)
         List of media items to be created.
         
        repeated .google.photos.library.v1.NewMediaItem new_media_items = 2;
      • clearNewMediaItems

        public BatchCreateMediaItemsRequest.Builder clearNewMediaItems()
         List of media items to be created.
         
        repeated .google.photos.library.v1.NewMediaItem new_media_items = 2;
      • removeNewMediaItems

        public BatchCreateMediaItemsRequest.Builder removeNewMediaItems​(int index)
         List of media items to be created.
         
        repeated .google.photos.library.v1.NewMediaItem new_media_items = 2;
      • getNewMediaItemsBuilder

        public NewMediaItem.Builder getNewMediaItemsBuilder​(int index)
         List of media items to be created.
         
        repeated .google.photos.library.v1.NewMediaItem new_media_items = 2;
      • addNewMediaItemsBuilder

        public NewMediaItem.Builder addNewMediaItemsBuilder()
         List of media items to be created.
         
        repeated .google.photos.library.v1.NewMediaItem new_media_items = 2;
      • addNewMediaItemsBuilder

        public NewMediaItem.Builder addNewMediaItemsBuilder​(int index)
         List of media items to be created.
         
        repeated .google.photos.library.v1.NewMediaItem new_media_items = 2;
      • getNewMediaItemsBuilderList

        public java.util.List<NewMediaItem.Builder> getNewMediaItemsBuilderList()
         List of media items to be created.
         
        repeated .google.photos.library.v1.NewMediaItem new_media_items = 2;
      • hasAlbumPosition

        public boolean hasAlbumPosition()
         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;
        Specified by:
        hasAlbumPosition in interface BatchCreateMediaItemsRequestOrBuilder
        Returns:
        Whether the albumPosition field is set.
      • getAlbumPosition

        public AlbumPosition getAlbumPosition()
         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;
        Specified by:
        getAlbumPosition in interface BatchCreateMediaItemsRequestOrBuilder
        Returns:
        The albumPosition.
      • setAlbumPosition

        public BatchCreateMediaItemsRequest.Builder setAlbumPosition​(AlbumPosition value)
         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;
      • setAlbumPosition

        public BatchCreateMediaItemsRequest.Builder setAlbumPosition​(AlbumPosition.Builder builderForValue)
         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;
      • mergeAlbumPosition

        public BatchCreateMediaItemsRequest.Builder mergeAlbumPosition​(AlbumPosition value)
         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;
      • clearAlbumPosition

        public BatchCreateMediaItemsRequest.Builder clearAlbumPosition()
         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;
      • getAlbumPositionBuilder

        public AlbumPosition.Builder getAlbumPositionBuilder()
         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;
      • getAlbumPositionOrBuilder

        public AlbumPositionOrBuilder getAlbumPositionOrBuilder()
         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;
        Specified by:
        getAlbumPositionOrBuilder in interface BatchCreateMediaItemsRequestOrBuilder