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

com.google.photos.library.v1.proto.MediaItem 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 a media item (such as a photo or video) in Google Photos.
 * 
* * Protobuf type {@code google.photos.library.v1.MediaItem} */ public final class MediaItem extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.photos.library.v1.MediaItem) MediaItemOrBuilder { private static final long serialVersionUID = 0L; // Use MediaItem.newBuilder() to construct. private MediaItem(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private MediaItem() { id_ = ""; description_ = ""; productUrl_ = ""; baseUrl_ = ""; mimeType_ = ""; filename_ = ""; } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private MediaItem( 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(); description_ = s; break; } case 26: { java.lang.String s = input.readStringRequireUtf8(); productUrl_ = s; break; } case 34: { java.lang.String s = input.readStringRequireUtf8(); baseUrl_ = s; break; } case 42: { java.lang.String s = input.readStringRequireUtf8(); mimeType_ = s; break; } case 50: { com.google.photos.library.v1.proto.MediaMetadata.Builder subBuilder = null; if (mediaMetadata_ != null) { subBuilder = mediaMetadata_.toBuilder(); } mediaMetadata_ = input.readMessage( com.google.photos.library.v1.proto.MediaMetadata.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(mediaMetadata_); mediaMetadata_ = subBuilder.buildPartial(); } break; } case 58: { com.google.photos.library.v1.proto.ContributorInfo.Builder subBuilder = null; if (contributorInfo_ != null) { subBuilder = contributorInfo_.toBuilder(); } contributorInfo_ = input.readMessage( com.google.photos.library.v1.proto.ContributorInfo.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(contributorInfo_); contributorInfo_ = subBuilder.buildPartial(); } break; } case 66: { java.lang.String s = input.readStringRequireUtf8(); filename_ = 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_MediaItem_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_MediaItem_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.photos.library.v1.proto.MediaItem.class, com.google.photos.library.v1.proto.MediaItem.Builder.class); } public static final int ID_FIELD_NUMBER = 1; private volatile java.lang.Object id_; /** * * *
   * Identifier for the media item. This is a persistent identifier that can be
   * used between sessions to identify this media item.
   * 
* * 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; } } /** * * *
   * Identifier for the media item. This is a persistent identifier that can be
   * used between sessions to identify this media item.
   * 
* * 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 DESCRIPTION_FIELD_NUMBER = 2; private volatile java.lang.Object description_; /** * * *
   * Description of the media item. This is shown to the user in the item's
   * info section in the Google Photos app.
   * 
* * string description = 2; */ public java.lang.String getDescription() { java.lang.Object ref = description_; 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(); description_ = s; return s; } } /** * * *
   * Description of the media item. This is shown to the user in the item's
   * info section in the Google Photos app.
   * 
* * string description = 2; */ public com.google.protobuf.ByteString getDescriptionBytes() { java.lang.Object ref = description_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); description_ = 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_; /** * * *
   * Google Photos URL for the media item. This link is available to
   * the user only if they're signed in.
   * 
* * 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; } } /** * * *
   * Google Photos URL for the media item. This link is available to
   * the user only if they're signed in.
   * 
* * 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 BASE_URL_FIELD_NUMBER = 4; private volatile java.lang.Object baseUrl_; /** * * *
   * A URL to the media item's bytes. This shouldn't be used directly to access
   * the media item. For example, `'=w2048-h1024'` will set the dimensions of a
   * media item of type photo to have a width of 2048 px and height of 1024 px.
   * 
* * string base_url = 4; */ public java.lang.String getBaseUrl() { java.lang.Object ref = baseUrl_; 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(); baseUrl_ = s; return s; } } /** * * *
   * A URL to the media item's bytes. This shouldn't be used directly to access
   * the media item. For example, `'=w2048-h1024'` will set the dimensions of a
   * media item of type photo to have a width of 2048 px and height of 1024 px.
   * 
* * string base_url = 4; */ public com.google.protobuf.ByteString getBaseUrlBytes() { java.lang.Object ref = baseUrl_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); baseUrl_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int MIME_TYPE_FIELD_NUMBER = 5; private volatile java.lang.Object mimeType_; /** * * *
   * MIME type of the media item. For example, `image/jpeg`.
   * 
* * string mime_type = 5; */ public java.lang.String getMimeType() { java.lang.Object ref = mimeType_; 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(); mimeType_ = s; return s; } } /** * * *
   * MIME type of the media item. For example, `image/jpeg`.
   * 
* * string mime_type = 5; */ public com.google.protobuf.ByteString getMimeTypeBytes() { java.lang.Object ref = mimeType_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); mimeType_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int MEDIA_METADATA_FIELD_NUMBER = 6; private com.google.photos.library.v1.proto.MediaMetadata mediaMetadata_; /** * * *
   * Metadata related to the media item, such as, height, width, or
   * creation time.
   * 
* * .google.photos.library.v1.MediaMetadata media_metadata = 6; */ public boolean hasMediaMetadata() { return mediaMetadata_ != null; } /** * * *
   * Metadata related to the media item, such as, height, width, or
   * creation time.
   * 
* * .google.photos.library.v1.MediaMetadata media_metadata = 6; */ public com.google.photos.library.v1.proto.MediaMetadata getMediaMetadata() { return mediaMetadata_ == null ? com.google.photos.library.v1.proto.MediaMetadata.getDefaultInstance() : mediaMetadata_; } /** * * *
   * Metadata related to the media item, such as, height, width, or
   * creation time.
   * 
* * .google.photos.library.v1.MediaMetadata media_metadata = 6; */ public com.google.photos.library.v1.proto.MediaMetadataOrBuilder getMediaMetadataOrBuilder() { return getMediaMetadata(); } public static final int CONTRIBUTOR_INFO_FIELD_NUMBER = 7; private com.google.photos.library.v1.proto.ContributorInfo contributorInfo_; /** * * *
   * Information about the user who created this media item.
   * 
* * .google.photos.library.v1.ContributorInfo contributor_info = 7; */ public boolean hasContributorInfo() { return contributorInfo_ != null; } /** * * *
   * Information about the user who created this media item.
   * 
* * .google.photos.library.v1.ContributorInfo contributor_info = 7; */ public com.google.photos.library.v1.proto.ContributorInfo getContributorInfo() { return contributorInfo_ == null ? com.google.photos.library.v1.proto.ContributorInfo.getDefaultInstance() : contributorInfo_; } /** * * *
   * Information about the user who created this media item.
   * 
* * .google.photos.library.v1.ContributorInfo contributor_info = 7; */ public com.google.photos.library.v1.proto.ContributorInfoOrBuilder getContributorInfoOrBuilder() { return getContributorInfo(); } public static final int FILENAME_FIELD_NUMBER = 8; private volatile java.lang.Object filename_; /** * * *
   * Filename of the media item. This is shown to the user in the item's info
   * section in the Google Photos app.
   * 
* * string filename = 8; */ public java.lang.String getFilename() { java.lang.Object ref = filename_; 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(); filename_ = s; return s; } } /** * * *
   * Filename of the media item. This is shown to the user in the item's info
   * section in the Google Photos app.
   * 
* * string filename = 8; */ public com.google.protobuf.ByteString getFilenameBytes() { java.lang.Object ref = filename_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); filename_ = 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 (!getDescriptionBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); } if (!getProductUrlBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, productUrl_); } if (!getBaseUrlBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, baseUrl_); } if (!getMimeTypeBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, mimeType_); } if (mediaMetadata_ != null) { output.writeMessage(6, getMediaMetadata()); } if (contributorInfo_ != null) { output.writeMessage(7, getContributorInfo()); } if (!getFilenameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 8, filename_); } 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 (!getDescriptionBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); } if (!getProductUrlBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, productUrl_); } if (!getBaseUrlBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, baseUrl_); } if (!getMimeTypeBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, mimeType_); } if (mediaMetadata_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getMediaMetadata()); } if (contributorInfo_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getContributorInfo()); } if (!getFilenameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, filename_); } 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.MediaItem)) { return super.equals(obj); } com.google.photos.library.v1.proto.MediaItem other = (com.google.photos.library.v1.proto.MediaItem) obj; boolean result = true; result = result && getId().equals(other.getId()); result = result && getDescription().equals(other.getDescription()); result = result && getProductUrl().equals(other.getProductUrl()); result = result && getBaseUrl().equals(other.getBaseUrl()); result = result && getMimeType().equals(other.getMimeType()); result = result && (hasMediaMetadata() == other.hasMediaMetadata()); if (hasMediaMetadata()) { result = result && getMediaMetadata().equals(other.getMediaMetadata()); } result = result && (hasContributorInfo() == other.hasContributorInfo()); if (hasContributorInfo()) { result = result && getContributorInfo().equals(other.getContributorInfo()); } result = result && getFilename().equals(other.getFilename()); 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) + DESCRIPTION_FIELD_NUMBER; hash = (53 * hash) + getDescription().hashCode(); hash = (37 * hash) + PRODUCT_URL_FIELD_NUMBER; hash = (53 * hash) + getProductUrl().hashCode(); hash = (37 * hash) + BASE_URL_FIELD_NUMBER; hash = (53 * hash) + getBaseUrl().hashCode(); hash = (37 * hash) + MIME_TYPE_FIELD_NUMBER; hash = (53 * hash) + getMimeType().hashCode(); if (hasMediaMetadata()) { hash = (37 * hash) + MEDIA_METADATA_FIELD_NUMBER; hash = (53 * hash) + getMediaMetadata().hashCode(); } if (hasContributorInfo()) { hash = (37 * hash) + CONTRIBUTOR_INFO_FIELD_NUMBER; hash = (53 * hash) + getContributorInfo().hashCode(); } hash = (37 * hash) + FILENAME_FIELD_NUMBER; hash = (53 * hash) + getFilename().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static com.google.photos.library.v1.proto.MediaItem parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.photos.library.v1.proto.MediaItem 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.MediaItem parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.photos.library.v1.proto.MediaItem 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.MediaItem parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.photos.library.v1.proto.MediaItem 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.MediaItem 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.MediaItem 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.MediaItem 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.MediaItem 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.MediaItem 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.MediaItem 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.MediaItem 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 a media item (such as a photo or video) in Google Photos.
   * 
* * Protobuf type {@code google.photos.library.v1.MediaItem} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.photos.library.v1.MediaItem) com.google.photos.library.v1.proto.MediaItemOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.photos.library.v1.proto.LibraryServiceProto .internal_static_google_photos_library_v1_MediaItem_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_MediaItem_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.photos.library.v1.proto.MediaItem.class, com.google.photos.library.v1.proto.MediaItem.Builder.class); } // Construct using com.google.photos.library.v1.proto.MediaItem.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_ = ""; description_ = ""; productUrl_ = ""; baseUrl_ = ""; mimeType_ = ""; if (mediaMetadataBuilder_ == null) { mediaMetadata_ = null; } else { mediaMetadata_ = null; mediaMetadataBuilder_ = null; } if (contributorInfoBuilder_ == null) { contributorInfo_ = null; } else { contributorInfo_ = null; contributorInfoBuilder_ = null; } filename_ = ""; 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_MediaItem_descriptor; } @java.lang.Override public com.google.photos.library.v1.proto.MediaItem getDefaultInstanceForType() { return com.google.photos.library.v1.proto.MediaItem.getDefaultInstance(); } @java.lang.Override public com.google.photos.library.v1.proto.MediaItem build() { com.google.photos.library.v1.proto.MediaItem result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.photos.library.v1.proto.MediaItem buildPartial() { com.google.photos.library.v1.proto.MediaItem result = new com.google.photos.library.v1.proto.MediaItem(this); result.id_ = id_; result.description_ = description_; result.productUrl_ = productUrl_; result.baseUrl_ = baseUrl_; result.mimeType_ = mimeType_; if (mediaMetadataBuilder_ == null) { result.mediaMetadata_ = mediaMetadata_; } else { result.mediaMetadata_ = mediaMetadataBuilder_.build(); } if (contributorInfoBuilder_ == null) { result.contributorInfo_ = contributorInfo_; } else { result.contributorInfo_ = contributorInfoBuilder_.build(); } result.filename_ = filename_; 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.MediaItem) { return mergeFrom((com.google.photos.library.v1.proto.MediaItem) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.photos.library.v1.proto.MediaItem other) { if (other == com.google.photos.library.v1.proto.MediaItem.getDefaultInstance()) return this; if (!other.getId().isEmpty()) { id_ = other.id_; onChanged(); } if (!other.getDescription().isEmpty()) { description_ = other.description_; onChanged(); } if (!other.getProductUrl().isEmpty()) { productUrl_ = other.productUrl_; onChanged(); } if (!other.getBaseUrl().isEmpty()) { baseUrl_ = other.baseUrl_; onChanged(); } if (!other.getMimeType().isEmpty()) { mimeType_ = other.mimeType_; onChanged(); } if (other.hasMediaMetadata()) { mergeMediaMetadata(other.getMediaMetadata()); } if (other.hasContributorInfo()) { mergeContributorInfo(other.getContributorInfo()); } if (!other.getFilename().isEmpty()) { filename_ = other.filename_; 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.MediaItem parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.google.photos.library.v1.proto.MediaItem) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private java.lang.Object id_ = ""; /** * * *
     * Identifier for the media item. This is a persistent identifier that can be
     * used between sessions to identify this media item.
     * 
* * 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; } } /** * * *
     * Identifier for the media item. This is a persistent identifier that can be
     * used between sessions to identify this media item.
     * 
* * 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; } } /** * * *
     * Identifier for the media item. This is a persistent identifier that can be
     * used between sessions to identify this media item.
     * 
* * string id = 1; */ public Builder setId(java.lang.String value) { if (value == null) { throw new NullPointerException(); } id_ = value; onChanged(); return this; } /** * * *
     * Identifier for the media item. This is a persistent identifier that can be
     * used between sessions to identify this media item.
     * 
* * string id = 1; */ public Builder clearId() { id_ = getDefaultInstance().getId(); onChanged(); return this; } /** * * *
     * Identifier for the media item. This is a persistent identifier that can be
     * used between sessions to identify this media item.
     * 
* * 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 description_ = ""; /** * * *
     * Description of the media item. This is shown to the user in the item's
     * info section in the Google Photos app.
     * 
* * string description = 2; */ public java.lang.String getDescription() { java.lang.Object ref = description_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); description_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * Description of the media item. This is shown to the user in the item's
     * info section in the Google Photos app.
     * 
* * string description = 2; */ public com.google.protobuf.ByteString getDescriptionBytes() { java.lang.Object ref = description_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); description_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * Description of the media item. This is shown to the user in the item's
     * info section in the Google Photos app.
     * 
* * string description = 2; */ public Builder setDescription(java.lang.String value) { if (value == null) { throw new NullPointerException(); } description_ = value; onChanged(); return this; } /** * * *
     * Description of the media item. This is shown to the user in the item's
     * info section in the Google Photos app.
     * 
* * string description = 2; */ public Builder clearDescription() { description_ = getDefaultInstance().getDescription(); onChanged(); return this; } /** * * *
     * Description of the media item. This is shown to the user in the item's
     * info section in the Google Photos app.
     * 
* * string description = 2; */ public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); description_ = value; onChanged(); return this; } private java.lang.Object productUrl_ = ""; /** * * *
     * Google Photos URL for the media item. This link is available to
     * the user only if they're signed in.
     * 
* * 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; } } /** * * *
     * Google Photos URL for the media item. This link is available to
     * the user only if they're signed in.
     * 
* * 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; } } /** * * *
     * Google Photos URL for the media item. This link is available to
     * the user only if they're signed in.
     * 
* * string product_url = 3; */ public Builder setProductUrl(java.lang.String value) { if (value == null) { throw new NullPointerException(); } productUrl_ = value; onChanged(); return this; } /** * * *
     * Google Photos URL for the media item. This link is available to
     * the user only if they're signed in.
     * 
* * string product_url = 3; */ public Builder clearProductUrl() { productUrl_ = getDefaultInstance().getProductUrl(); onChanged(); return this; } /** * * *
     * Google Photos URL for the media item. This link is available to
     * the user only if they're signed in.
     * 
* * 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 java.lang.Object baseUrl_ = ""; /** * * *
     * A URL to the media item's bytes. This shouldn't be used directly to access
     * the media item. For example, `'=w2048-h1024'` will set the dimensions of a
     * media item of type photo to have a width of 2048 px and height of 1024 px.
     * 
* * string base_url = 4; */ public java.lang.String getBaseUrl() { java.lang.Object ref = baseUrl_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); baseUrl_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * A URL to the media item's bytes. This shouldn't be used directly to access
     * the media item. For example, `'=w2048-h1024'` will set the dimensions of a
     * media item of type photo to have a width of 2048 px and height of 1024 px.
     * 
* * string base_url = 4; */ public com.google.protobuf.ByteString getBaseUrlBytes() { java.lang.Object ref = baseUrl_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); baseUrl_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * A URL to the media item's bytes. This shouldn't be used directly to access
     * the media item. For example, `'=w2048-h1024'` will set the dimensions of a
     * media item of type photo to have a width of 2048 px and height of 1024 px.
     * 
* * string base_url = 4; */ public Builder setBaseUrl(java.lang.String value) { if (value == null) { throw new NullPointerException(); } baseUrl_ = value; onChanged(); return this; } /** * * *
     * A URL to the media item's bytes. This shouldn't be used directly to access
     * the media item. For example, `'=w2048-h1024'` will set the dimensions of a
     * media item of type photo to have a width of 2048 px and height of 1024 px.
     * 
* * string base_url = 4; */ public Builder clearBaseUrl() { baseUrl_ = getDefaultInstance().getBaseUrl(); onChanged(); return this; } /** * * *
     * A URL to the media item's bytes. This shouldn't be used directly to access
     * the media item. For example, `'=w2048-h1024'` will set the dimensions of a
     * media item of type photo to have a width of 2048 px and height of 1024 px.
     * 
* * string base_url = 4; */ public Builder setBaseUrlBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); baseUrl_ = value; onChanged(); return this; } private java.lang.Object mimeType_ = ""; /** * * *
     * MIME type of the media item. For example, `image/jpeg`.
     * 
* * string mime_type = 5; */ public java.lang.String getMimeType() { java.lang.Object ref = mimeType_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); mimeType_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * MIME type of the media item. For example, `image/jpeg`.
     * 
* * string mime_type = 5; */ public com.google.protobuf.ByteString getMimeTypeBytes() { java.lang.Object ref = mimeType_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); mimeType_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * MIME type of the media item. For example, `image/jpeg`.
     * 
* * string mime_type = 5; */ public Builder setMimeType(java.lang.String value) { if (value == null) { throw new NullPointerException(); } mimeType_ = value; onChanged(); return this; } /** * * *
     * MIME type of the media item. For example, `image/jpeg`.
     * 
* * string mime_type = 5; */ public Builder clearMimeType() { mimeType_ = getDefaultInstance().getMimeType(); onChanged(); return this; } /** * * *
     * MIME type of the media item. For example, `image/jpeg`.
     * 
* * string mime_type = 5; */ public Builder setMimeTypeBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); mimeType_ = value; onChanged(); return this; } private com.google.photos.library.v1.proto.MediaMetadata mediaMetadata_ = null; private com.google.protobuf.SingleFieldBuilderV3< com.google.photos.library.v1.proto.MediaMetadata, com.google.photos.library.v1.proto.MediaMetadata.Builder, com.google.photos.library.v1.proto.MediaMetadataOrBuilder> mediaMetadataBuilder_; /** * * *
     * Metadata related to the media item, such as, height, width, or
     * creation time.
     * 
* * .google.photos.library.v1.MediaMetadata media_metadata = 6; */ public boolean hasMediaMetadata() { return mediaMetadataBuilder_ != null || mediaMetadata_ != null; } /** * * *
     * Metadata related to the media item, such as, height, width, or
     * creation time.
     * 
* * .google.photos.library.v1.MediaMetadata media_metadata = 6; */ public com.google.photos.library.v1.proto.MediaMetadata getMediaMetadata() { if (mediaMetadataBuilder_ == null) { return mediaMetadata_ == null ? com.google.photos.library.v1.proto.MediaMetadata.getDefaultInstance() : mediaMetadata_; } else { return mediaMetadataBuilder_.getMessage(); } } /** * * *
     * Metadata related to the media item, such as, height, width, or
     * creation time.
     * 
* * .google.photos.library.v1.MediaMetadata media_metadata = 6; */ public Builder setMediaMetadata(com.google.photos.library.v1.proto.MediaMetadata value) { if (mediaMetadataBuilder_ == null) { if (value == null) { throw new NullPointerException(); } mediaMetadata_ = value; onChanged(); } else { mediaMetadataBuilder_.setMessage(value); } return this; } /** * * *
     * Metadata related to the media item, such as, height, width, or
     * creation time.
     * 
* * .google.photos.library.v1.MediaMetadata media_metadata = 6; */ public Builder setMediaMetadata( com.google.photos.library.v1.proto.MediaMetadata.Builder builderForValue) { if (mediaMetadataBuilder_ == null) { mediaMetadata_ = builderForValue.build(); onChanged(); } else { mediaMetadataBuilder_.setMessage(builderForValue.build()); } return this; } /** * * *
     * Metadata related to the media item, such as, height, width, or
     * creation time.
     * 
* * .google.photos.library.v1.MediaMetadata media_metadata = 6; */ public Builder mergeMediaMetadata(com.google.photos.library.v1.proto.MediaMetadata value) { if (mediaMetadataBuilder_ == null) { if (mediaMetadata_ != null) { mediaMetadata_ = com.google.photos.library.v1.proto.MediaMetadata.newBuilder(mediaMetadata_) .mergeFrom(value) .buildPartial(); } else { mediaMetadata_ = value; } onChanged(); } else { mediaMetadataBuilder_.mergeFrom(value); } return this; } /** * * *
     * Metadata related to the media item, such as, height, width, or
     * creation time.
     * 
* * .google.photos.library.v1.MediaMetadata media_metadata = 6; */ public Builder clearMediaMetadata() { if (mediaMetadataBuilder_ == null) { mediaMetadata_ = null; onChanged(); } else { mediaMetadata_ = null; mediaMetadataBuilder_ = null; } return this; } /** * * *
     * Metadata related to the media item, such as, height, width, or
     * creation time.
     * 
* * .google.photos.library.v1.MediaMetadata media_metadata = 6; */ public com.google.photos.library.v1.proto.MediaMetadata.Builder getMediaMetadataBuilder() { onChanged(); return getMediaMetadataFieldBuilder().getBuilder(); } /** * * *
     * Metadata related to the media item, such as, height, width, or
     * creation time.
     * 
* * .google.photos.library.v1.MediaMetadata media_metadata = 6; */ public com.google.photos.library.v1.proto.MediaMetadataOrBuilder getMediaMetadataOrBuilder() { if (mediaMetadataBuilder_ != null) { return mediaMetadataBuilder_.getMessageOrBuilder(); } else { return mediaMetadata_ == null ? com.google.photos.library.v1.proto.MediaMetadata.getDefaultInstance() : mediaMetadata_; } } /** * * *
     * Metadata related to the media item, such as, height, width, or
     * creation time.
     * 
* * .google.photos.library.v1.MediaMetadata media_metadata = 6; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.photos.library.v1.proto.MediaMetadata, com.google.photos.library.v1.proto.MediaMetadata.Builder, com.google.photos.library.v1.proto.MediaMetadataOrBuilder> getMediaMetadataFieldBuilder() { if (mediaMetadataBuilder_ == null) { mediaMetadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.photos.library.v1.proto.MediaMetadata, com.google.photos.library.v1.proto.MediaMetadata.Builder, com.google.photos.library.v1.proto.MediaMetadataOrBuilder>( getMediaMetadata(), getParentForChildren(), isClean()); mediaMetadata_ = null; } return mediaMetadataBuilder_; } private com.google.photos.library.v1.proto.ContributorInfo contributorInfo_ = null; private com.google.protobuf.SingleFieldBuilderV3< com.google.photos.library.v1.proto.ContributorInfo, com.google.photos.library.v1.proto.ContributorInfo.Builder, com.google.photos.library.v1.proto.ContributorInfoOrBuilder> contributorInfoBuilder_; /** * * *
     * Information about the user who created this media item.
     * 
* * .google.photos.library.v1.ContributorInfo contributor_info = 7; */ public boolean hasContributorInfo() { return contributorInfoBuilder_ != null || contributorInfo_ != null; } /** * * *
     * Information about the user who created this media item.
     * 
* * .google.photos.library.v1.ContributorInfo contributor_info = 7; */ public com.google.photos.library.v1.proto.ContributorInfo getContributorInfo() { if (contributorInfoBuilder_ == null) { return contributorInfo_ == null ? com.google.photos.library.v1.proto.ContributorInfo.getDefaultInstance() : contributorInfo_; } else { return contributorInfoBuilder_.getMessage(); } } /** * * *
     * Information about the user who created this media item.
     * 
* * .google.photos.library.v1.ContributorInfo contributor_info = 7; */ public Builder setContributorInfo(com.google.photos.library.v1.proto.ContributorInfo value) { if (contributorInfoBuilder_ == null) { if (value == null) { throw new NullPointerException(); } contributorInfo_ = value; onChanged(); } else { contributorInfoBuilder_.setMessage(value); } return this; } /** * * *
     * Information about the user who created this media item.
     * 
* * .google.photos.library.v1.ContributorInfo contributor_info = 7; */ public Builder setContributorInfo( com.google.photos.library.v1.proto.ContributorInfo.Builder builderForValue) { if (contributorInfoBuilder_ == null) { contributorInfo_ = builderForValue.build(); onChanged(); } else { contributorInfoBuilder_.setMessage(builderForValue.build()); } return this; } /** * * *
     * Information about the user who created this media item.
     * 
* * .google.photos.library.v1.ContributorInfo contributor_info = 7; */ public Builder mergeContributorInfo(com.google.photos.library.v1.proto.ContributorInfo value) { if (contributorInfoBuilder_ == null) { if (contributorInfo_ != null) { contributorInfo_ = com.google.photos.library.v1.proto.ContributorInfo.newBuilder(contributorInfo_) .mergeFrom(value) .buildPartial(); } else { contributorInfo_ = value; } onChanged(); } else { contributorInfoBuilder_.mergeFrom(value); } return this; } /** * * *
     * Information about the user who created this media item.
     * 
* * .google.photos.library.v1.ContributorInfo contributor_info = 7; */ public Builder clearContributorInfo() { if (contributorInfoBuilder_ == null) { contributorInfo_ = null; onChanged(); } else { contributorInfo_ = null; contributorInfoBuilder_ = null; } return this; } /** * * *
     * Information about the user who created this media item.
     * 
* * .google.photos.library.v1.ContributorInfo contributor_info = 7; */ public com.google.photos.library.v1.proto.ContributorInfo.Builder getContributorInfoBuilder() { onChanged(); return getContributorInfoFieldBuilder().getBuilder(); } /** * * *
     * Information about the user who created this media item.
     * 
* * .google.photos.library.v1.ContributorInfo contributor_info = 7; */ public com.google.photos.library.v1.proto.ContributorInfoOrBuilder getContributorInfoOrBuilder() { if (contributorInfoBuilder_ != null) { return contributorInfoBuilder_.getMessageOrBuilder(); } else { return contributorInfo_ == null ? com.google.photos.library.v1.proto.ContributorInfo.getDefaultInstance() : contributorInfo_; } } /** * * *
     * Information about the user who created this media item.
     * 
* * .google.photos.library.v1.ContributorInfo contributor_info = 7; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.photos.library.v1.proto.ContributorInfo, com.google.photos.library.v1.proto.ContributorInfo.Builder, com.google.photos.library.v1.proto.ContributorInfoOrBuilder> getContributorInfoFieldBuilder() { if (contributorInfoBuilder_ == null) { contributorInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.photos.library.v1.proto.ContributorInfo, com.google.photos.library.v1.proto.ContributorInfo.Builder, com.google.photos.library.v1.proto.ContributorInfoOrBuilder>( getContributorInfo(), getParentForChildren(), isClean()); contributorInfo_ = null; } return contributorInfoBuilder_; } private java.lang.Object filename_ = ""; /** * * *
     * Filename of the media item. This is shown to the user in the item's info
     * section in the Google Photos app.
     * 
* * string filename = 8; */ public java.lang.String getFilename() { java.lang.Object ref = filename_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); filename_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * Filename of the media item. This is shown to the user in the item's info
     * section in the Google Photos app.
     * 
* * string filename = 8; */ public com.google.protobuf.ByteString getFilenameBytes() { java.lang.Object ref = filename_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); filename_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * Filename of the media item. This is shown to the user in the item's info
     * section in the Google Photos app.
     * 
* * string filename = 8; */ public Builder setFilename(java.lang.String value) { if (value == null) { throw new NullPointerException(); } filename_ = value; onChanged(); return this; } /** * * *
     * Filename of the media item. This is shown to the user in the item's info
     * section in the Google Photos app.
     * 
* * string filename = 8; */ public Builder clearFilename() { filename_ = getDefaultInstance().getFilename(); onChanged(); return this; } /** * * *
     * Filename of the media item. This is shown to the user in the item's info
     * section in the Google Photos app.
     * 
* * string filename = 8; */ public Builder setFilenameBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); filename_ = 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.MediaItem) } // @@protoc_insertion_point(class_scope:google.photos.library.v1.MediaItem) private static final com.google.photos.library.v1.proto.MediaItem DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.photos.library.v1.proto.MediaItem(); } public static com.google.photos.library.v1.proto.MediaItem getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public MediaItem parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new MediaItem(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.MediaItem getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy