Class Album.Builder

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

    public static final class Album.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<Album.Builder>
    implements AlbumOrBuilder
     Representation of an album in Google Photos.
     Albums are containers for media items. If an album has been shared by the
     application, it contains an extra `shareInfo` property.
     
    Protobuf type google.photos.types.Album
    • 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<Album.Builder>
      • clear

        public Album.Builder clear()
        Specified by:
        clear in interface com.google.protobuf.Message.Builder
        Specified by:
        clear in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clear in class com.google.protobuf.GeneratedMessageV3.Builder<Album.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<Album.Builder>
      • getDefaultInstanceForType

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

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

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

        public Album.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<Album.Builder>
      • setField

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

        public Album.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<Album.Builder>
      • clearOneof

        public Album.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<Album.Builder>
      • setRepeatedField

        public Album.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<Album.Builder>
      • addRepeatedField

        public Album.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<Album.Builder>
      • mergeFrom

        public Album.Builder mergeFrom​(com.google.protobuf.Message other)
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Album.Builder>
      • isInitialized

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

        public Album.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<Album.Builder>
        Throws:
        java.io.IOException
      • getId

        public java.lang.String getId()
         Identifier for the album. This is a persistent identifier that
         can be used between sessions to identify this album.
         
        string id = 1;
        Specified by:
        getId in interface AlbumOrBuilder
        Returns:
        The id.
      • getIdBytes

        public com.google.protobuf.ByteString getIdBytes()
         Identifier for the album. This is a persistent identifier that
         can be used between sessions to identify this album.
         
        string id = 1;
        Specified by:
        getIdBytes in interface AlbumOrBuilder
        Returns:
        The bytes for id.
      • setId

        public Album.Builder setId​(java.lang.String value)
         Identifier for the album. This is a persistent identifier that
         can be used between sessions to identify this album.
         
        string id = 1;
        Parameters:
        value - The id to set.
        Returns:
        This builder for chaining.
      • clearId

        public Album.Builder clearId()
         Identifier for the album. This is a persistent identifier that
         can be used between sessions to identify this album.
         
        string id = 1;
        Returns:
        This builder for chaining.
      • setIdBytes

        public Album.Builder setIdBytes​(com.google.protobuf.ByteString value)
         Identifier for the album. This is a persistent identifier that
         can be used between sessions to identify this album.
         
        string id = 1;
        Parameters:
        value - The bytes for id to set.
        Returns:
        This builder for chaining.
      • getTitle

        public java.lang.String getTitle()
         Name of the album displayed to the user in their Google Photos account.
         This string shouldn't be more than 500 characters.
         
        string title = 2;
        Specified by:
        getTitle in interface AlbumOrBuilder
        Returns:
        The title.
      • getTitleBytes

        public com.google.protobuf.ByteString getTitleBytes()
         Name of the album displayed to the user in their Google Photos account.
         This string shouldn't be more than 500 characters.
         
        string title = 2;
        Specified by:
        getTitleBytes in interface AlbumOrBuilder
        Returns:
        The bytes for title.
      • setTitle

        public Album.Builder setTitle​(java.lang.String value)
         Name of the album displayed to the user in their Google Photos account.
         This string shouldn't be more than 500 characters.
         
        string title = 2;
        Parameters:
        value - The title to set.
        Returns:
        This builder for chaining.
      • clearTitle

        public Album.Builder clearTitle()
         Name of the album displayed to the user in their Google Photos account.
         This string shouldn't be more than 500 characters.
         
        string title = 2;
        Returns:
        This builder for chaining.
      • setTitleBytes

        public Album.Builder setTitleBytes​(com.google.protobuf.ByteString value)
         Name of the album displayed to the user in their Google Photos account.
         This string shouldn't be more than 500 characters.
         
        string title = 2;
        Parameters:
        value - The bytes for title to set.
        Returns:
        This builder for chaining.
      • getProductUrl

        public java.lang.String getProductUrl()
         [Output only] Google Photos URL for the album. The user needs to be signed
         in to their Google Photos account to access this link.
         
        string product_url = 3;
        Specified by:
        getProductUrl in interface AlbumOrBuilder
        Returns:
        The productUrl.
      • getProductUrlBytes

        public com.google.protobuf.ByteString getProductUrlBytes()
         [Output only] Google Photos URL for the album. The user needs to be signed
         in to their Google Photos account to access this link.
         
        string product_url = 3;
        Specified by:
        getProductUrlBytes in interface AlbumOrBuilder
        Returns:
        The bytes for productUrl.
      • setProductUrl

        public Album.Builder setProductUrl​(java.lang.String value)
         [Output only] Google Photos URL for the album. The user needs to be signed
         in to their Google Photos account to access this link.
         
        string product_url = 3;
        Parameters:
        value - The productUrl to set.
        Returns:
        This builder for chaining.
      • clearProductUrl

        public Album.Builder clearProductUrl()
         [Output only] Google Photos URL for the album. The user needs to be signed
         in to their Google Photos account to access this link.
         
        string product_url = 3;
        Returns:
        This builder for chaining.
      • setProductUrlBytes

        public Album.Builder setProductUrlBytes​(com.google.protobuf.ByteString value)
         [Output only] Google Photos URL for the album. The user needs to be signed
         in to their Google Photos account to access this link.
         
        string product_url = 3;
        Parameters:
        value - The bytes for productUrl to set.
        Returns:
        This builder for chaining.
      • getIsWriteable

        public boolean getIsWriteable()
         [Output only] True if you can create media items in this album.
         This field is based on the scopes granted and permissions of the album. If
         the scopes are changed or permissions of the album are changed, this field
         is updated.
         
        bool is_writeable = 4;
        Specified by:
        getIsWriteable in interface AlbumOrBuilder
        Returns:
        The isWriteable.
      • setIsWriteable

        public Album.Builder setIsWriteable​(boolean value)
         [Output only] True if you can create media items in this album.
         This field is based on the scopes granted and permissions of the album. If
         the scopes are changed or permissions of the album are changed, this field
         is updated.
         
        bool is_writeable = 4;
        Parameters:
        value - The isWriteable to set.
        Returns:
        This builder for chaining.
      • clearIsWriteable

        public Album.Builder clearIsWriteable()
         [Output only] True if you can create media items in this album.
         This field is based on the scopes granted and permissions of the album. If
         the scopes are changed or permissions of the album are changed, this field
         is updated.
         
        bool is_writeable = 4;
        Returns:
        This builder for chaining.
      • hasShareInfo

        public boolean hasShareInfo()
         [Output only] Information related to shared albums.
         This field is only populated if the album is a shared album, the
         developer created the album and the user has granted the
         `photoslibrary.sharing` scope.
         
        .google.photos.types.ShareInfo share_info = 5;
        Specified by:
        hasShareInfo in interface AlbumOrBuilder
        Returns:
        Whether the shareInfo field is set.
      • getShareInfo

        public ShareInfo getShareInfo()
         [Output only] Information related to shared albums.
         This field is only populated if the album is a shared album, the
         developer created the album and the user has granted the
         `photoslibrary.sharing` scope.
         
        .google.photos.types.ShareInfo share_info = 5;
        Specified by:
        getShareInfo in interface AlbumOrBuilder
        Returns:
        The shareInfo.
      • setShareInfo

        public Album.Builder setShareInfo​(ShareInfo value)
         [Output only] Information related to shared albums.
         This field is only populated if the album is a shared album, the
         developer created the album and the user has granted the
         `photoslibrary.sharing` scope.
         
        .google.photos.types.ShareInfo share_info = 5;
      • setShareInfo

        public Album.Builder setShareInfo​(ShareInfo.Builder builderForValue)
         [Output only] Information related to shared albums.
         This field is only populated if the album is a shared album, the
         developer created the album and the user has granted the
         `photoslibrary.sharing` scope.
         
        .google.photos.types.ShareInfo share_info = 5;
      • mergeShareInfo

        public Album.Builder mergeShareInfo​(ShareInfo value)
         [Output only] Information related to shared albums.
         This field is only populated if the album is a shared album, the
         developer created the album and the user has granted the
         `photoslibrary.sharing` scope.
         
        .google.photos.types.ShareInfo share_info = 5;
      • clearShareInfo

        public Album.Builder clearShareInfo()
         [Output only] Information related to shared albums.
         This field is only populated if the album is a shared album, the
         developer created the album and the user has granted the
         `photoslibrary.sharing` scope.
         
        .google.photos.types.ShareInfo share_info = 5;
      • getShareInfoBuilder

        public ShareInfo.Builder getShareInfoBuilder()
         [Output only] Information related to shared albums.
         This field is only populated if the album is a shared album, the
         developer created the album and the user has granted the
         `photoslibrary.sharing` scope.
         
        .google.photos.types.ShareInfo share_info = 5;
      • getShareInfoOrBuilder

        public ShareInfoOrBuilder getShareInfoOrBuilder()
         [Output only] Information related to shared albums.
         This field is only populated if the album is a shared album, the
         developer created the album and the user has granted the
         `photoslibrary.sharing` scope.
         
        .google.photos.types.ShareInfo share_info = 5;
        Specified by:
        getShareInfoOrBuilder in interface AlbumOrBuilder
      • getMediaItemsCount

        public long getMediaItemsCount()
         [Output only] The number of media items in the album.
         
        int64 media_items_count = 6;
        Specified by:
        getMediaItemsCount in interface AlbumOrBuilder
        Returns:
        The mediaItemsCount.
      • setMediaItemsCount

        public Album.Builder setMediaItemsCount​(long value)
         [Output only] The number of media items in the album.
         
        int64 media_items_count = 6;
        Parameters:
        value - The mediaItemsCount to set.
        Returns:
        This builder for chaining.
      • clearMediaItemsCount

        public Album.Builder clearMediaItemsCount()
         [Output only] The number of media items in the album.
         
        int64 media_items_count = 6;
        Returns:
        This builder for chaining.
      • getCoverPhotoBaseUrl

        public java.lang.String getCoverPhotoBaseUrl()
         [Output only] A URL to the cover photo's bytes. This shouldn't be used as
         is. Parameters should be appended to this URL before use. See the
         [developer
         documentation](https://developers.google.com/photos/library/guides/access-media-items#base-urls)
         for a complete list of supported parameters. For example,
         `'=w2048-h1024'` sets the dimensions of the cover photo to have a width of
         2048 px and height of 1024 px.
         
        string cover_photo_base_url = 7;
        Specified by:
        getCoverPhotoBaseUrl in interface AlbumOrBuilder
        Returns:
        The coverPhotoBaseUrl.
      • getCoverPhotoBaseUrlBytes

        public com.google.protobuf.ByteString getCoverPhotoBaseUrlBytes()
         [Output only] A URL to the cover photo's bytes. This shouldn't be used as
         is. Parameters should be appended to this URL before use. See the
         [developer
         documentation](https://developers.google.com/photos/library/guides/access-media-items#base-urls)
         for a complete list of supported parameters. For example,
         `'=w2048-h1024'` sets the dimensions of the cover photo to have a width of
         2048 px and height of 1024 px.
         
        string cover_photo_base_url = 7;
        Specified by:
        getCoverPhotoBaseUrlBytes in interface AlbumOrBuilder
        Returns:
        The bytes for coverPhotoBaseUrl.
      • setCoverPhotoBaseUrl

        public Album.Builder setCoverPhotoBaseUrl​(java.lang.String value)
         [Output only] A URL to the cover photo's bytes. This shouldn't be used as
         is. Parameters should be appended to this URL before use. See the
         [developer
         documentation](https://developers.google.com/photos/library/guides/access-media-items#base-urls)
         for a complete list of supported parameters. For example,
         `'=w2048-h1024'` sets the dimensions of the cover photo to have a width of
         2048 px and height of 1024 px.
         
        string cover_photo_base_url = 7;
        Parameters:
        value - The coverPhotoBaseUrl to set.
        Returns:
        This builder for chaining.
      • clearCoverPhotoBaseUrl

        public Album.Builder clearCoverPhotoBaseUrl()
         [Output only] A URL to the cover photo's bytes. This shouldn't be used as
         is. Parameters should be appended to this URL before use. See the
         [developer
         documentation](https://developers.google.com/photos/library/guides/access-media-items#base-urls)
         for a complete list of supported parameters. For example,
         `'=w2048-h1024'` sets the dimensions of the cover photo to have a width of
         2048 px and height of 1024 px.
         
        string cover_photo_base_url = 7;
        Returns:
        This builder for chaining.
      • setCoverPhotoBaseUrlBytes

        public Album.Builder setCoverPhotoBaseUrlBytes​(com.google.protobuf.ByteString value)
         [Output only] A URL to the cover photo's bytes. This shouldn't be used as
         is. Parameters should be appended to this URL before use. See the
         [developer
         documentation](https://developers.google.com/photos/library/guides/access-media-items#base-urls)
         for a complete list of supported parameters. For example,
         `'=w2048-h1024'` sets the dimensions of the cover photo to have a width of
         2048 px and height of 1024 px.
         
        string cover_photo_base_url = 7;
        Parameters:
        value - The bytes for coverPhotoBaseUrl to set.
        Returns:
        This builder for chaining.
      • getCoverPhotoMediaItemId

        public java.lang.String getCoverPhotoMediaItemId()
         Identifier for the media item associated with the cover photo.
         
        string cover_photo_media_item_id = 8;
        Specified by:
        getCoverPhotoMediaItemId in interface AlbumOrBuilder
        Returns:
        The coverPhotoMediaItemId.
      • getCoverPhotoMediaItemIdBytes

        public com.google.protobuf.ByteString getCoverPhotoMediaItemIdBytes()
         Identifier for the media item associated with the cover photo.
         
        string cover_photo_media_item_id = 8;
        Specified by:
        getCoverPhotoMediaItemIdBytes in interface AlbumOrBuilder
        Returns:
        The bytes for coverPhotoMediaItemId.
      • setCoverPhotoMediaItemId

        public Album.Builder setCoverPhotoMediaItemId​(java.lang.String value)
         Identifier for the media item associated with the cover photo.
         
        string cover_photo_media_item_id = 8;
        Parameters:
        value - The coverPhotoMediaItemId to set.
        Returns:
        This builder for chaining.
      • clearCoverPhotoMediaItemId

        public Album.Builder clearCoverPhotoMediaItemId()
         Identifier for the media item associated with the cover photo.
         
        string cover_photo_media_item_id = 8;
        Returns:
        This builder for chaining.
      • setCoverPhotoMediaItemIdBytes

        public Album.Builder setCoverPhotoMediaItemIdBytes​(com.google.protobuf.ByteString value)
         Identifier for the media item associated with the cover photo.
         
        string cover_photo_media_item_id = 8;
        Parameters:
        value - The bytes for coverPhotoMediaItemId to set.
        Returns:
        This builder for chaining.
      • setUnknownFields

        public final Album.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Album.Builder>
      • mergeUnknownFields

        public final Album.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Album.Builder>