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

com.google.photos.library.v1.proto.Album 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;

/**
 *
 *
 * 
 * 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 {@code google.photos.library.v1.Album} */ public final class Album extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.photos.library.v1.Album) AlbumOrBuilder { private static final long serialVersionUID = 0L; // Use Album.newBuilder() to construct. private Album(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private Album() { id_ = ""; title_ = ""; productUrl_ = ""; isWriteable_ = false; mediaItemsCount_ = 0L; coverPhotoBaseUrl_ = ""; coverPhotoMediaItemId_ = ""; } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private Album( 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(); id_ = s; break; } case 18: { java.lang.String s = input.readStringRequireUtf8(); title_ = s; break; } case 26: { java.lang.String s = input.readStringRequireUtf8(); productUrl_ = s; break; } case 32: { isWriteable_ = input.readBool(); break; } case 42: { com.google.photos.library.v1.proto.ShareInfo.Builder subBuilder = null; if (shareInfo_ != null) { subBuilder = shareInfo_.toBuilder(); } shareInfo_ = input.readMessage( com.google.photos.library.v1.proto.ShareInfo.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(shareInfo_); shareInfo_ = subBuilder.buildPartial(); } break; } case 48: { mediaItemsCount_ = input.readInt64(); break; } case 58: { java.lang.String s = input.readStringRequireUtf8(); coverPhotoBaseUrl_ = s; break; } case 66: { java.lang.String s = input.readStringRequireUtf8(); coverPhotoMediaItemId_ = s; break; } default: { if (!parseUnknownFieldProto3(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 { 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_Album_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_Album_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.photos.library.v1.proto.Album.class, com.google.photos.library.v1.proto.Album.Builder.class); } public static final int ID_FIELD_NUMBER = 1; private volatile java.lang.Object id_; /** * * *
   * [Ouput only] Identifier for the album. This is a persistent identifier that
   * can be used between sessions to identify this album.
   * 
* * string id = 1; */ public java.lang.String getId() { java.lang.Object ref = id_; 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(); id_ = s; return s; } } /** * * *
   * [Ouput only] Identifier for the album. This is a persistent identifier that
   * can be used between sessions to identify this album.
   * 
* * string id = 1; */ public com.google.protobuf.ByteString getIdBytes() { java.lang.Object ref = id_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); id_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int TITLE_FIELD_NUMBER = 2; private volatile java.lang.Object title_; /** * * *
   * 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; */ public java.lang.String getTitle() { java.lang.Object ref = title_; 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(); title_ = s; return s; } } /** * * *
   * 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; */ public com.google.protobuf.ByteString getTitleBytes() { java.lang.Object ref = title_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); title_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int PRODUCT_URL_FIELD_NUMBER = 3; private volatile java.lang.Object productUrl_; /** * * *
   * [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; */ public java.lang.String getProductUrl() { java.lang.Object ref = productUrl_; 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(); productUrl_ = s; return s; } } /** * * *
   * [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; */ public com.google.protobuf.ByteString getProductUrlBytes() { java.lang.Object ref = productUrl_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); productUrl_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int IS_WRITEABLE_FIELD_NUMBER = 4; private boolean isWriteable_; /** * * *
   * [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; */ public boolean getIsWriteable() { return isWriteable_; } public static final int SHARE_INFO_FIELD_NUMBER = 5; private com.google.photos.library.v1.proto.ShareInfo shareInfo_; /** * * *
   * [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.library.v1.ShareInfo share_info = 5; */ public boolean hasShareInfo() { return shareInfo_ != null; } /** * * *
   * [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.library.v1.ShareInfo share_info = 5; */ public com.google.photos.library.v1.proto.ShareInfo getShareInfo() { return shareInfo_ == null ? com.google.photos.library.v1.proto.ShareInfo.getDefaultInstance() : shareInfo_; } /** * * *
   * [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.library.v1.ShareInfo share_info = 5; */ public com.google.photos.library.v1.proto.ShareInfoOrBuilder getShareInfoOrBuilder() { return getShareInfo(); } public static final int MEDIA_ITEMS_COUNT_FIELD_NUMBER = 6; private long mediaItemsCount_; /** * * *
   * [Output only] The number of media items in the album.
   * 
* * int64 media_items_count = 6; */ public long getMediaItemsCount() { return mediaItemsCount_; } public static final int COVER_PHOTO_BASE_URL_FIELD_NUMBER = 7; private volatile java.lang.Object coverPhotoBaseUrl_; /** * * *
   * [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. 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; */ public java.lang.String getCoverPhotoBaseUrl() { java.lang.Object ref = coverPhotoBaseUrl_; 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(); coverPhotoBaseUrl_ = s; return s; } } /** * * *
   * [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. 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; */ public com.google.protobuf.ByteString getCoverPhotoBaseUrlBytes() { java.lang.Object ref = coverPhotoBaseUrl_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); coverPhotoBaseUrl_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int COVER_PHOTO_MEDIA_ITEM_ID_FIELD_NUMBER = 8; private volatile java.lang.Object coverPhotoMediaItemId_; /** * * *
   * [Output only] Identifier for the media item associated with the cover
   * photo.
   * 
* * string cover_photo_media_item_id = 8; */ public java.lang.String getCoverPhotoMediaItemId() { java.lang.Object ref = coverPhotoMediaItemId_; 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(); coverPhotoMediaItemId_ = s; return s; } } /** * * *
   * [Output only] Identifier for the media item associated with the cover
   * photo.
   * 
* * string cover_photo_media_item_id = 8; */ public com.google.protobuf.ByteString getCoverPhotoMediaItemIdBytes() { java.lang.Object ref = coverPhotoMediaItemId_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); coverPhotoMediaItemId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } 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 (!getIdBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); } if (!getTitleBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, title_); } if (!getProductUrlBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, productUrl_); } if (isWriteable_ != false) { output.writeBool(4, isWriteable_); } if (shareInfo_ != null) { output.writeMessage(5, getShareInfo()); } if (mediaItemsCount_ != 0L) { output.writeInt64(6, mediaItemsCount_); } if (!getCoverPhotoBaseUrlBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 7, coverPhotoBaseUrl_); } if (!getCoverPhotoMediaItemIdBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 8, coverPhotoMediaItemId_); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getIdBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); } if (!getTitleBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, title_); } if (!getProductUrlBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, productUrl_); } if (isWriteable_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, isWriteable_); } if (shareInfo_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getShareInfo()); } if (mediaItemsCount_ != 0L) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(6, mediaItemsCount_); } if (!getCoverPhotoBaseUrlBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, coverPhotoBaseUrl_); } if (!getCoverPhotoMediaItemIdBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, coverPhotoMediaItemId_); } 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.Album)) { return super.equals(obj); } com.google.photos.library.v1.proto.Album other = (com.google.photos.library.v1.proto.Album) obj; boolean result = true; result = result && getId().equals(other.getId()); result = result && getTitle().equals(other.getTitle()); result = result && getProductUrl().equals(other.getProductUrl()); result = result && (getIsWriteable() == other.getIsWriteable()); result = result && (hasShareInfo() == other.hasShareInfo()); if (hasShareInfo()) { result = result && getShareInfo().equals(other.getShareInfo()); } result = result && (getMediaItemsCount() == other.getMediaItemsCount()); result = result && getCoverPhotoBaseUrl().equals(other.getCoverPhotoBaseUrl()); result = result && getCoverPhotoMediaItemId().equals(other.getCoverPhotoMediaItemId()); result = result && unknownFields.equals(other.unknownFields); return result; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + ID_FIELD_NUMBER; hash = (53 * hash) + getId().hashCode(); hash = (37 * hash) + TITLE_FIELD_NUMBER; hash = (53 * hash) + getTitle().hashCode(); hash = (37 * hash) + PRODUCT_URL_FIELD_NUMBER; hash = (53 * hash) + getProductUrl().hashCode(); hash = (37 * hash) + IS_WRITEABLE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIsWriteable()); if (hasShareInfo()) { hash = (37 * hash) + SHARE_INFO_FIELD_NUMBER; hash = (53 * hash) + getShareInfo().hashCode(); } hash = (37 * hash) + MEDIA_ITEMS_COUNT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getMediaItemsCount()); hash = (37 * hash) + COVER_PHOTO_BASE_URL_FIELD_NUMBER; hash = (53 * hash) + getCoverPhotoBaseUrl().hashCode(); hash = (37 * hash) + COVER_PHOTO_MEDIA_ITEM_ID_FIELD_NUMBER; hash = (53 * hash) + getCoverPhotoMediaItemId().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static com.google.photos.library.v1.proto.Album parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.photos.library.v1.proto.Album 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.Album parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.photos.library.v1.proto.Album 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.Album parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.photos.library.v1.proto.Album 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.Album 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.Album 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.Album 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.Album 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.Album 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.Album 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.Album 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; } /** * * *
   * 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 {@code google.photos.library.v1.Album} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.photos.library.v1.Album) com.google.photos.library.v1.proto.AlbumOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.photos.library.v1.proto.LibraryServiceProto .internal_static_google_photos_library_v1_Album_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_Album_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.photos.library.v1.proto.Album.class, com.google.photos.library.v1.proto.Album.Builder.class); } // Construct using com.google.photos.library.v1.proto.Album.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override public Builder clear() { super.clear(); id_ = ""; title_ = ""; productUrl_ = ""; isWriteable_ = false; if (shareInfoBuilder_ == null) { shareInfo_ = null; } else { shareInfo_ = null; shareInfoBuilder_ = null; } mediaItemsCount_ = 0L; coverPhotoBaseUrl_ = ""; coverPhotoMediaItemId_ = ""; 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_Album_descriptor; } @java.lang.Override public com.google.photos.library.v1.proto.Album getDefaultInstanceForType() { return com.google.photos.library.v1.proto.Album.getDefaultInstance(); } @java.lang.Override public com.google.photos.library.v1.proto.Album build() { com.google.photos.library.v1.proto.Album result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.photos.library.v1.proto.Album buildPartial() { com.google.photos.library.v1.proto.Album result = new com.google.photos.library.v1.proto.Album(this); result.id_ = id_; result.title_ = title_; result.productUrl_ = productUrl_; result.isWriteable_ = isWriteable_; if (shareInfoBuilder_ == null) { result.shareInfo_ = shareInfo_; } else { result.shareInfo_ = shareInfoBuilder_.build(); } result.mediaItemsCount_ = mediaItemsCount_; result.coverPhotoBaseUrl_ = coverPhotoBaseUrl_; result.coverPhotoMediaItemId_ = coverPhotoMediaItemId_; onBuilt(); return result; } @java.lang.Override public Builder clone() { return (Builder) super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.photos.library.v1.proto.Album) { return mergeFrom((com.google.photos.library.v1.proto.Album) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.photos.library.v1.proto.Album other) { if (other == com.google.photos.library.v1.proto.Album.getDefaultInstance()) return this; if (!other.getId().isEmpty()) { id_ = other.id_; onChanged(); } if (!other.getTitle().isEmpty()) { title_ = other.title_; onChanged(); } if (!other.getProductUrl().isEmpty()) { productUrl_ = other.productUrl_; onChanged(); } if (other.getIsWriteable() != false) { setIsWriteable(other.getIsWriteable()); } if (other.hasShareInfo()) { mergeShareInfo(other.getShareInfo()); } if (other.getMediaItemsCount() != 0L) { setMediaItemsCount(other.getMediaItemsCount()); } if (!other.getCoverPhotoBaseUrl().isEmpty()) { coverPhotoBaseUrl_ = other.coverPhotoBaseUrl_; onChanged(); } if (!other.getCoverPhotoMediaItemId().isEmpty()) { coverPhotoMediaItemId_ = other.coverPhotoMediaItemId_; onChanged(); } 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.Album parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.google.photos.library.v1.proto.Album) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private java.lang.Object id_ = ""; /** * * *
     * [Ouput only] Identifier for the album. This is a persistent identifier that
     * can be used between sessions to identify this album.
     * 
* * string id = 1; */ public java.lang.String getId() { java.lang.Object ref = id_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); id_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * [Ouput only] Identifier for the album. This is a persistent identifier that
     * can be used between sessions to identify this album.
     * 
* * string id = 1; */ public com.google.protobuf.ByteString getIdBytes() { java.lang.Object ref = id_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); id_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * [Ouput only] Identifier for the album. This is a persistent identifier that
     * can be used between sessions to identify this album.
     * 
* * string id = 1; */ public Builder setId(java.lang.String value) { if (value == null) { throw new NullPointerException(); } id_ = value; onChanged(); return this; } /** * * *
     * [Ouput only] Identifier for the album. This is a persistent identifier that
     * can be used between sessions to identify this album.
     * 
* * string id = 1; */ public Builder clearId() { id_ = getDefaultInstance().getId(); onChanged(); return this; } /** * * *
     * [Ouput only] Identifier for the album. This is a persistent identifier that
     * can be used between sessions to identify this album.
     * 
* * string id = 1; */ public Builder setIdBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); id_ = value; onChanged(); return this; } private java.lang.Object title_ = ""; /** * * *
     * 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; */ public java.lang.String getTitle() { java.lang.Object ref = title_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); title_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * 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; */ public com.google.protobuf.ByteString getTitleBytes() { java.lang.Object ref = title_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); title_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * 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; */ public Builder setTitle(java.lang.String value) { if (value == null) { throw new NullPointerException(); } title_ = value; onChanged(); return this; } /** * * *
     * 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; */ public Builder clearTitle() { title_ = getDefaultInstance().getTitle(); onChanged(); return this; } /** * * *
     * 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; */ public Builder setTitleBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); title_ = value; onChanged(); return this; } private java.lang.Object productUrl_ = ""; /** * * *
     * [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; */ public java.lang.String getProductUrl() { java.lang.Object ref = productUrl_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); productUrl_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * [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; */ public com.google.protobuf.ByteString getProductUrlBytes() { java.lang.Object ref = productUrl_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); productUrl_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * [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; */ public Builder setProductUrl(java.lang.String value) { if (value == null) { throw new NullPointerException(); } productUrl_ = value; onChanged(); return this; } /** * * *
     * [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; */ public Builder clearProductUrl() { productUrl_ = getDefaultInstance().getProductUrl(); onChanged(); return this; } /** * * *
     * [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; */ public Builder setProductUrlBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); productUrl_ = value; onChanged(); return this; } private boolean isWriteable_; /** * * *
     * [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; */ public boolean getIsWriteable() { return isWriteable_; } /** * * *
     * [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; */ public Builder setIsWriteable(boolean value) { isWriteable_ = value; onChanged(); return this; } /** * * *
     * [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; */ public Builder clearIsWriteable() { isWriteable_ = false; onChanged(); return this; } private com.google.photos.library.v1.proto.ShareInfo shareInfo_ = null; private com.google.protobuf.SingleFieldBuilderV3< com.google.photos.library.v1.proto.ShareInfo, com.google.photos.library.v1.proto.ShareInfo.Builder, com.google.photos.library.v1.proto.ShareInfoOrBuilder> shareInfoBuilder_; /** * * *
     * [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.library.v1.ShareInfo share_info = 5; */ public boolean hasShareInfo() { return shareInfoBuilder_ != null || shareInfo_ != null; } /** * * *
     * [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.library.v1.ShareInfo share_info = 5; */ public com.google.photos.library.v1.proto.ShareInfo getShareInfo() { if (shareInfoBuilder_ == null) { return shareInfo_ == null ? com.google.photos.library.v1.proto.ShareInfo.getDefaultInstance() : shareInfo_; } else { return shareInfoBuilder_.getMessage(); } } /** * * *
     * [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.library.v1.ShareInfo share_info = 5; */ public Builder setShareInfo(com.google.photos.library.v1.proto.ShareInfo value) { if (shareInfoBuilder_ == null) { if (value == null) { throw new NullPointerException(); } shareInfo_ = value; onChanged(); } else { shareInfoBuilder_.setMessage(value); } return this; } /** * * *
     * [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.library.v1.ShareInfo share_info = 5; */ public Builder setShareInfo( com.google.photos.library.v1.proto.ShareInfo.Builder builderForValue) { if (shareInfoBuilder_ == null) { shareInfo_ = builderForValue.build(); onChanged(); } else { shareInfoBuilder_.setMessage(builderForValue.build()); } return this; } /** * * *
     * [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.library.v1.ShareInfo share_info = 5; */ public Builder mergeShareInfo(com.google.photos.library.v1.proto.ShareInfo value) { if (shareInfoBuilder_ == null) { if (shareInfo_ != null) { shareInfo_ = com.google.photos.library.v1.proto.ShareInfo.newBuilder(shareInfo_) .mergeFrom(value) .buildPartial(); } else { shareInfo_ = value; } onChanged(); } else { shareInfoBuilder_.mergeFrom(value); } return this; } /** * * *
     * [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.library.v1.ShareInfo share_info = 5; */ public Builder clearShareInfo() { if (shareInfoBuilder_ == null) { shareInfo_ = null; onChanged(); } else { shareInfo_ = null; shareInfoBuilder_ = null; } return this; } /** * * *
     * [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.library.v1.ShareInfo share_info = 5; */ public com.google.photos.library.v1.proto.ShareInfo.Builder getShareInfoBuilder() { onChanged(); return getShareInfoFieldBuilder().getBuilder(); } /** * * *
     * [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.library.v1.ShareInfo share_info = 5; */ public com.google.photos.library.v1.proto.ShareInfoOrBuilder getShareInfoOrBuilder() { if (shareInfoBuilder_ != null) { return shareInfoBuilder_.getMessageOrBuilder(); } else { return shareInfo_ == null ? com.google.photos.library.v1.proto.ShareInfo.getDefaultInstance() : shareInfo_; } } /** * * *
     * [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.library.v1.ShareInfo share_info = 5; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.photos.library.v1.proto.ShareInfo, com.google.photos.library.v1.proto.ShareInfo.Builder, com.google.photos.library.v1.proto.ShareInfoOrBuilder> getShareInfoFieldBuilder() { if (shareInfoBuilder_ == null) { shareInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.photos.library.v1.proto.ShareInfo, com.google.photos.library.v1.proto.ShareInfo.Builder, com.google.photos.library.v1.proto.ShareInfoOrBuilder>( getShareInfo(), getParentForChildren(), isClean()); shareInfo_ = null; } return shareInfoBuilder_; } private long mediaItemsCount_; /** * * *
     * [Output only] The number of media items in the album.
     * 
* * int64 media_items_count = 6; */ public long getMediaItemsCount() { return mediaItemsCount_; } /** * * *
     * [Output only] The number of media items in the album.
     * 
* * int64 media_items_count = 6; */ public Builder setMediaItemsCount(long value) { mediaItemsCount_ = value; onChanged(); return this; } /** * * *
     * [Output only] The number of media items in the album.
     * 
* * int64 media_items_count = 6; */ public Builder clearMediaItemsCount() { mediaItemsCount_ = 0L; onChanged(); return this; } private java.lang.Object coverPhotoBaseUrl_ = ""; /** * * *
     * [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. 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; */ public java.lang.String getCoverPhotoBaseUrl() { java.lang.Object ref = coverPhotoBaseUrl_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); coverPhotoBaseUrl_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * [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. 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; */ public com.google.protobuf.ByteString getCoverPhotoBaseUrlBytes() { java.lang.Object ref = coverPhotoBaseUrl_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); coverPhotoBaseUrl_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * [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. 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; */ public Builder setCoverPhotoBaseUrl(java.lang.String value) { if (value == null) { throw new NullPointerException(); } coverPhotoBaseUrl_ = value; onChanged(); return this; } /** * * *
     * [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. 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; */ public Builder clearCoverPhotoBaseUrl() { coverPhotoBaseUrl_ = getDefaultInstance().getCoverPhotoBaseUrl(); onChanged(); return this; } /** * * *
     * [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. 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; */ public Builder setCoverPhotoBaseUrlBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); coverPhotoBaseUrl_ = value; onChanged(); return this; } private java.lang.Object coverPhotoMediaItemId_ = ""; /** * * *
     * [Output only] Identifier for the media item associated with the cover
     * photo.
     * 
* * string cover_photo_media_item_id = 8; */ public java.lang.String getCoverPhotoMediaItemId() { java.lang.Object ref = coverPhotoMediaItemId_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); coverPhotoMediaItemId_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * [Output only] Identifier for the media item associated with the cover
     * photo.
     * 
* * string cover_photo_media_item_id = 8; */ public com.google.protobuf.ByteString getCoverPhotoMediaItemIdBytes() { java.lang.Object ref = coverPhotoMediaItemId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); coverPhotoMediaItemId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * [Output only] Identifier for the media item associated with the cover
     * photo.
     * 
* * string cover_photo_media_item_id = 8; */ public Builder setCoverPhotoMediaItemId(java.lang.String value) { if (value == null) { throw new NullPointerException(); } coverPhotoMediaItemId_ = value; onChanged(); return this; } /** * * *
     * [Output only] Identifier for the media item associated with the cover
     * photo.
     * 
* * string cover_photo_media_item_id = 8; */ public Builder clearCoverPhotoMediaItemId() { coverPhotoMediaItemId_ = getDefaultInstance().getCoverPhotoMediaItemId(); onChanged(); return this; } /** * * *
     * [Output only] Identifier for the media item associated with the cover
     * photo.
     * 
* * string cover_photo_media_item_id = 8; */ public Builder setCoverPhotoMediaItemIdBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); coverPhotoMediaItemId_ = value; onChanged(); return this; } @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFieldsProto3(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.Album) } // @@protoc_insertion_point(class_scope:google.photos.library.v1.Album) private static final com.google.photos.library.v1.proto.Album DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.photos.library.v1.proto.Album(); } public static com.google.photos.library.v1.proto.Album getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public Album parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new Album(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.Album getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy