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

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

/**
 *
 *
 * 
 * Metadata for a media item.
 * 
* * Protobuf type {@code google.photos.library.v1.MediaMetadata} */ public final class MediaMetadata extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.photos.library.v1.MediaMetadata) MediaMetadataOrBuilder { private static final long serialVersionUID = 0L; // Use MediaMetadata.newBuilder() to construct. private MediaMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private MediaMetadata() { width_ = 0L; height_ = 0L; } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private MediaMetadata( 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: { com.google.protobuf.Timestamp.Builder subBuilder = null; if (creationTime_ != null) { subBuilder = creationTime_.toBuilder(); } creationTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(creationTime_); creationTime_ = subBuilder.buildPartial(); } break; } case 16: { width_ = input.readInt64(); break; } case 24: { height_ = input.readInt64(); break; } case 50: { com.google.photos.library.v1.proto.Photo.Builder subBuilder = null; if (metadataCase_ == 6) { subBuilder = ((com.google.photos.library.v1.proto.Photo) metadata_).toBuilder(); } metadata_ = input.readMessage( com.google.photos.library.v1.proto.Photo.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom((com.google.photos.library.v1.proto.Photo) metadata_); metadata_ = subBuilder.buildPartial(); } metadataCase_ = 6; break; } case 58: { com.google.photos.library.v1.proto.Video.Builder subBuilder = null; if (metadataCase_ == 7) { subBuilder = ((com.google.photos.library.v1.proto.Video) metadata_).toBuilder(); } metadata_ = input.readMessage( com.google.photos.library.v1.proto.Video.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom((com.google.photos.library.v1.proto.Video) metadata_); metadata_ = subBuilder.buildPartial(); } metadataCase_ = 7; 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_MediaMetadata_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_MediaMetadata_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.photos.library.v1.proto.MediaMetadata.class, com.google.photos.library.v1.proto.MediaMetadata.Builder.class); } private int metadataCase_ = 0; private java.lang.Object metadata_; public enum MetadataCase implements com.google.protobuf.Internal.EnumLite { PHOTO(6), VIDEO(7), METADATA_NOT_SET(0); private final int value; private MetadataCase(int value) { this.value = value; } /** @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static MetadataCase valueOf(int value) { return forNumber(value); } public static MetadataCase forNumber(int value) { switch (value) { case 6: return PHOTO; case 7: return VIDEO; case 0: return METADATA_NOT_SET; default: return null; } } public int getNumber() { return this.value; } }; public MetadataCase getMetadataCase() { return MetadataCase.forNumber(metadataCase_); } public static final int CREATION_TIME_FIELD_NUMBER = 1; private com.google.protobuf.Timestamp creationTime_; /** * * *
   * Time when the media item was first created (not when it was uploaded to
   * Google Photos).
   * 
* * .google.protobuf.Timestamp creation_time = 1; */ public boolean hasCreationTime() { return creationTime_ != null; } /** * * *
   * Time when the media item was first created (not when it was uploaded to
   * Google Photos).
   * 
* * .google.protobuf.Timestamp creation_time = 1; */ public com.google.protobuf.Timestamp getCreationTime() { return creationTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : creationTime_; } /** * * *
   * Time when the media item was first created (not when it was uploaded to
   * Google Photos).
   * 
* * .google.protobuf.Timestamp creation_time = 1; */ public com.google.protobuf.TimestampOrBuilder getCreationTimeOrBuilder() { return getCreationTime(); } public static final int WIDTH_FIELD_NUMBER = 2; private long width_; /** * * *
   * Original width (in pixels) of the media item.
   * 
* * int64 width = 2; */ public long getWidth() { return width_; } public static final int HEIGHT_FIELD_NUMBER = 3; private long height_; /** * * *
   * Original height (in pixels) of the media item.
   * 
* * int64 height = 3; */ public long getHeight() { return height_; } public static final int PHOTO_FIELD_NUMBER = 6; /** * * *
   * Metadata for a photo media type.
   * 
* * .google.photos.library.v1.Photo photo = 6; */ public boolean hasPhoto() { return metadataCase_ == 6; } /** * * *
   * Metadata for a photo media type.
   * 
* * .google.photos.library.v1.Photo photo = 6; */ public com.google.photos.library.v1.proto.Photo getPhoto() { if (metadataCase_ == 6) { return (com.google.photos.library.v1.proto.Photo) metadata_; } return com.google.photos.library.v1.proto.Photo.getDefaultInstance(); } /** * * *
   * Metadata for a photo media type.
   * 
* * .google.photos.library.v1.Photo photo = 6; */ public com.google.photos.library.v1.proto.PhotoOrBuilder getPhotoOrBuilder() { if (metadataCase_ == 6) { return (com.google.photos.library.v1.proto.Photo) metadata_; } return com.google.photos.library.v1.proto.Photo.getDefaultInstance(); } public static final int VIDEO_FIELD_NUMBER = 7; /** * * *
   * Metadata for a video media type.
   * 
* * .google.photos.library.v1.Video video = 7; */ public boolean hasVideo() { return metadataCase_ == 7; } /** * * *
   * Metadata for a video media type.
   * 
* * .google.photos.library.v1.Video video = 7; */ public com.google.photos.library.v1.proto.Video getVideo() { if (metadataCase_ == 7) { return (com.google.photos.library.v1.proto.Video) metadata_; } return com.google.photos.library.v1.proto.Video.getDefaultInstance(); } /** * * *
   * Metadata for a video media type.
   * 
* * .google.photos.library.v1.Video video = 7; */ public com.google.photos.library.v1.proto.VideoOrBuilder getVideoOrBuilder() { if (metadataCase_ == 7) { return (com.google.photos.library.v1.proto.Video) metadata_; } return com.google.photos.library.v1.proto.Video.getDefaultInstance(); } 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 (creationTime_ != null) { output.writeMessage(1, getCreationTime()); } if (width_ != 0L) { output.writeInt64(2, width_); } if (height_ != 0L) { output.writeInt64(3, height_); } if (metadataCase_ == 6) { output.writeMessage(6, (com.google.photos.library.v1.proto.Photo) metadata_); } if (metadataCase_ == 7) { output.writeMessage(7, (com.google.photos.library.v1.proto.Video) metadata_); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (creationTime_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCreationTime()); } if (width_ != 0L) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, width_); } if (height_ != 0L) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, height_); } if (metadataCase_ == 6) { size += com.google.protobuf.CodedOutputStream.computeMessageSize( 6, (com.google.photos.library.v1.proto.Photo) metadata_); } if (metadataCase_ == 7) { size += com.google.protobuf.CodedOutputStream.computeMessageSize( 7, (com.google.photos.library.v1.proto.Video) metadata_); } 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.MediaMetadata)) { return super.equals(obj); } com.google.photos.library.v1.proto.MediaMetadata other = (com.google.photos.library.v1.proto.MediaMetadata) obj; boolean result = true; result = result && (hasCreationTime() == other.hasCreationTime()); if (hasCreationTime()) { result = result && getCreationTime().equals(other.getCreationTime()); } result = result && (getWidth() == other.getWidth()); result = result && (getHeight() == other.getHeight()); result = result && getMetadataCase().equals(other.getMetadataCase()); if (!result) return false; switch (metadataCase_) { case 6: result = result && getPhoto().equals(other.getPhoto()); break; case 7: result = result && getVideo().equals(other.getVideo()); break; case 0: default: } 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(); if (hasCreationTime()) { hash = (37 * hash) + CREATION_TIME_FIELD_NUMBER; hash = (53 * hash) + getCreationTime().hashCode(); } hash = (37 * hash) + WIDTH_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getWidth()); hash = (37 * hash) + HEIGHT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getHeight()); switch (metadataCase_) { case 6: hash = (37 * hash) + PHOTO_FIELD_NUMBER; hash = (53 * hash) + getPhoto().hashCode(); break; case 7: hash = (37 * hash) + VIDEO_FIELD_NUMBER; hash = (53 * hash) + getVideo().hashCode(); break; case 0: default: } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static com.google.photos.library.v1.proto.MediaMetadata parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.photos.library.v1.proto.MediaMetadata 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.MediaMetadata parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.photos.library.v1.proto.MediaMetadata 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.MediaMetadata parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.photos.library.v1.proto.MediaMetadata 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.MediaMetadata 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.MediaMetadata 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.MediaMetadata 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.MediaMetadata 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.MediaMetadata 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.MediaMetadata 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.MediaMetadata 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; } /** * * *
   * Metadata for a media item.
   * 
* * Protobuf type {@code google.photos.library.v1.MediaMetadata} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.photos.library.v1.MediaMetadata) com.google.photos.library.v1.proto.MediaMetadataOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.photos.library.v1.proto.LibraryServiceProto .internal_static_google_photos_library_v1_MediaMetadata_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_MediaMetadata_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.photos.library.v1.proto.MediaMetadata.class, com.google.photos.library.v1.proto.MediaMetadata.Builder.class); } // Construct using com.google.photos.library.v1.proto.MediaMetadata.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(); if (creationTimeBuilder_ == null) { creationTime_ = null; } else { creationTime_ = null; creationTimeBuilder_ = null; } width_ = 0L; height_ = 0L; metadataCase_ = 0; metadata_ = null; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.photos.library.v1.proto.LibraryServiceProto .internal_static_google_photos_library_v1_MediaMetadata_descriptor; } @java.lang.Override public com.google.photos.library.v1.proto.MediaMetadata getDefaultInstanceForType() { return com.google.photos.library.v1.proto.MediaMetadata.getDefaultInstance(); } @java.lang.Override public com.google.photos.library.v1.proto.MediaMetadata build() { com.google.photos.library.v1.proto.MediaMetadata result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.photos.library.v1.proto.MediaMetadata buildPartial() { com.google.photos.library.v1.proto.MediaMetadata result = new com.google.photos.library.v1.proto.MediaMetadata(this); if (creationTimeBuilder_ == null) { result.creationTime_ = creationTime_; } else { result.creationTime_ = creationTimeBuilder_.build(); } result.width_ = width_; result.height_ = height_; if (metadataCase_ == 6) { if (photoBuilder_ == null) { result.metadata_ = metadata_; } else { result.metadata_ = photoBuilder_.build(); } } if (metadataCase_ == 7) { if (videoBuilder_ == null) { result.metadata_ = metadata_; } else { result.metadata_ = videoBuilder_.build(); } } result.metadataCase_ = metadataCase_; 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.MediaMetadata) { return mergeFrom((com.google.photos.library.v1.proto.MediaMetadata) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.photos.library.v1.proto.MediaMetadata other) { if (other == com.google.photos.library.v1.proto.MediaMetadata.getDefaultInstance()) return this; if (other.hasCreationTime()) { mergeCreationTime(other.getCreationTime()); } if (other.getWidth() != 0L) { setWidth(other.getWidth()); } if (other.getHeight() != 0L) { setHeight(other.getHeight()); } switch (other.getMetadataCase()) { case PHOTO: { mergePhoto(other.getPhoto()); break; } case VIDEO: { mergeVideo(other.getVideo()); break; } case METADATA_NOT_SET: { break; } } 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.MediaMetadata parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.google.photos.library.v1.proto.MediaMetadata) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int metadataCase_ = 0; private java.lang.Object metadata_; public MetadataCase getMetadataCase() { return MetadataCase.forNumber(metadataCase_); } public Builder clearMetadata() { metadataCase_ = 0; metadata_ = null; onChanged(); return this; } private com.google.protobuf.Timestamp creationTime_ = null; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> creationTimeBuilder_; /** * * *
     * Time when the media item was first created (not when it was uploaded to
     * Google Photos).
     * 
* * .google.protobuf.Timestamp creation_time = 1; */ public boolean hasCreationTime() { return creationTimeBuilder_ != null || creationTime_ != null; } /** * * *
     * Time when the media item was first created (not when it was uploaded to
     * Google Photos).
     * 
* * .google.protobuf.Timestamp creation_time = 1; */ public com.google.protobuf.Timestamp getCreationTime() { if (creationTimeBuilder_ == null) { return creationTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : creationTime_; } else { return creationTimeBuilder_.getMessage(); } } /** * * *
     * Time when the media item was first created (not when it was uploaded to
     * Google Photos).
     * 
* * .google.protobuf.Timestamp creation_time = 1; */ public Builder setCreationTime(com.google.protobuf.Timestamp value) { if (creationTimeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } creationTime_ = value; onChanged(); } else { creationTimeBuilder_.setMessage(value); } return this; } /** * * *
     * Time when the media item was first created (not when it was uploaded to
     * Google Photos).
     * 
* * .google.protobuf.Timestamp creation_time = 1; */ public Builder setCreationTime(com.google.protobuf.Timestamp.Builder builderForValue) { if (creationTimeBuilder_ == null) { creationTime_ = builderForValue.build(); onChanged(); } else { creationTimeBuilder_.setMessage(builderForValue.build()); } return this; } /** * * *
     * Time when the media item was first created (not when it was uploaded to
     * Google Photos).
     * 
* * .google.protobuf.Timestamp creation_time = 1; */ public Builder mergeCreationTime(com.google.protobuf.Timestamp value) { if (creationTimeBuilder_ == null) { if (creationTime_ != null) { creationTime_ = com.google.protobuf.Timestamp.newBuilder(creationTime_) .mergeFrom(value) .buildPartial(); } else { creationTime_ = value; } onChanged(); } else { creationTimeBuilder_.mergeFrom(value); } return this; } /** * * *
     * Time when the media item was first created (not when it was uploaded to
     * Google Photos).
     * 
* * .google.protobuf.Timestamp creation_time = 1; */ public Builder clearCreationTime() { if (creationTimeBuilder_ == null) { creationTime_ = null; onChanged(); } else { creationTime_ = null; creationTimeBuilder_ = null; } return this; } /** * * *
     * Time when the media item was first created (not when it was uploaded to
     * Google Photos).
     * 
* * .google.protobuf.Timestamp creation_time = 1; */ public com.google.protobuf.Timestamp.Builder getCreationTimeBuilder() { onChanged(); return getCreationTimeFieldBuilder().getBuilder(); } /** * * *
     * Time when the media item was first created (not when it was uploaded to
     * Google Photos).
     * 
* * .google.protobuf.Timestamp creation_time = 1; */ public com.google.protobuf.TimestampOrBuilder getCreationTimeOrBuilder() { if (creationTimeBuilder_ != null) { return creationTimeBuilder_.getMessageOrBuilder(); } else { return creationTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : creationTime_; } } /** * * *
     * Time when the media item was first created (not when it was uploaded to
     * Google Photos).
     * 
* * .google.protobuf.Timestamp creation_time = 1; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> getCreationTimeFieldBuilder() { if (creationTimeBuilder_ == null) { creationTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( getCreationTime(), getParentForChildren(), isClean()); creationTime_ = null; } return creationTimeBuilder_; } private long width_; /** * * *
     * Original width (in pixels) of the media item.
     * 
* * int64 width = 2; */ public long getWidth() { return width_; } /** * * *
     * Original width (in pixels) of the media item.
     * 
* * int64 width = 2; */ public Builder setWidth(long value) { width_ = value; onChanged(); return this; } /** * * *
     * Original width (in pixels) of the media item.
     * 
* * int64 width = 2; */ public Builder clearWidth() { width_ = 0L; onChanged(); return this; } private long height_; /** * * *
     * Original height (in pixels) of the media item.
     * 
* * int64 height = 3; */ public long getHeight() { return height_; } /** * * *
     * Original height (in pixels) of the media item.
     * 
* * int64 height = 3; */ public Builder setHeight(long value) { height_ = value; onChanged(); return this; } /** * * *
     * Original height (in pixels) of the media item.
     * 
* * int64 height = 3; */ public Builder clearHeight() { height_ = 0L; onChanged(); return this; } private com.google.protobuf.SingleFieldBuilderV3< com.google.photos.library.v1.proto.Photo, com.google.photos.library.v1.proto.Photo.Builder, com.google.photos.library.v1.proto.PhotoOrBuilder> photoBuilder_; /** * * *
     * Metadata for a photo media type.
     * 
* * .google.photos.library.v1.Photo photo = 6; */ public boolean hasPhoto() { return metadataCase_ == 6; } /** * * *
     * Metadata for a photo media type.
     * 
* * .google.photos.library.v1.Photo photo = 6; */ public com.google.photos.library.v1.proto.Photo getPhoto() { if (photoBuilder_ == null) { if (metadataCase_ == 6) { return (com.google.photos.library.v1.proto.Photo) metadata_; } return com.google.photos.library.v1.proto.Photo.getDefaultInstance(); } else { if (metadataCase_ == 6) { return photoBuilder_.getMessage(); } return com.google.photos.library.v1.proto.Photo.getDefaultInstance(); } } /** * * *
     * Metadata for a photo media type.
     * 
* * .google.photos.library.v1.Photo photo = 6; */ public Builder setPhoto(com.google.photos.library.v1.proto.Photo value) { if (photoBuilder_ == null) { if (value == null) { throw new NullPointerException(); } metadata_ = value; onChanged(); } else { photoBuilder_.setMessage(value); } metadataCase_ = 6; return this; } /** * * *
     * Metadata for a photo media type.
     * 
* * .google.photos.library.v1.Photo photo = 6; */ public Builder setPhoto(com.google.photos.library.v1.proto.Photo.Builder builderForValue) { if (photoBuilder_ == null) { metadata_ = builderForValue.build(); onChanged(); } else { photoBuilder_.setMessage(builderForValue.build()); } metadataCase_ = 6; return this; } /** * * *
     * Metadata for a photo media type.
     * 
* * .google.photos.library.v1.Photo photo = 6; */ public Builder mergePhoto(com.google.photos.library.v1.proto.Photo value) { if (photoBuilder_ == null) { if (metadataCase_ == 6 && metadata_ != com.google.photos.library.v1.proto.Photo.getDefaultInstance()) { metadata_ = com.google.photos.library.v1.proto.Photo.newBuilder( (com.google.photos.library.v1.proto.Photo) metadata_) .mergeFrom(value) .buildPartial(); } else { metadata_ = value; } onChanged(); } else { if (metadataCase_ == 6) { photoBuilder_.mergeFrom(value); } photoBuilder_.setMessage(value); } metadataCase_ = 6; return this; } /** * * *
     * Metadata for a photo media type.
     * 
* * .google.photos.library.v1.Photo photo = 6; */ public Builder clearPhoto() { if (photoBuilder_ == null) { if (metadataCase_ == 6) { metadataCase_ = 0; metadata_ = null; onChanged(); } } else { if (metadataCase_ == 6) { metadataCase_ = 0; metadata_ = null; } photoBuilder_.clear(); } return this; } /** * * *
     * Metadata for a photo media type.
     * 
* * .google.photos.library.v1.Photo photo = 6; */ public com.google.photos.library.v1.proto.Photo.Builder getPhotoBuilder() { return getPhotoFieldBuilder().getBuilder(); } /** * * *
     * Metadata for a photo media type.
     * 
* * .google.photos.library.v1.Photo photo = 6; */ public com.google.photos.library.v1.proto.PhotoOrBuilder getPhotoOrBuilder() { if ((metadataCase_ == 6) && (photoBuilder_ != null)) { return photoBuilder_.getMessageOrBuilder(); } else { if (metadataCase_ == 6) { return (com.google.photos.library.v1.proto.Photo) metadata_; } return com.google.photos.library.v1.proto.Photo.getDefaultInstance(); } } /** * * *
     * Metadata for a photo media type.
     * 
* * .google.photos.library.v1.Photo photo = 6; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.photos.library.v1.proto.Photo, com.google.photos.library.v1.proto.Photo.Builder, com.google.photos.library.v1.proto.PhotoOrBuilder> getPhotoFieldBuilder() { if (photoBuilder_ == null) { if (!(metadataCase_ == 6)) { metadata_ = com.google.photos.library.v1.proto.Photo.getDefaultInstance(); } photoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.photos.library.v1.proto.Photo, com.google.photos.library.v1.proto.Photo.Builder, com.google.photos.library.v1.proto.PhotoOrBuilder>( (com.google.photos.library.v1.proto.Photo) metadata_, getParentForChildren(), isClean()); metadata_ = null; } metadataCase_ = 6; onChanged(); ; return photoBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< com.google.photos.library.v1.proto.Video, com.google.photos.library.v1.proto.Video.Builder, com.google.photos.library.v1.proto.VideoOrBuilder> videoBuilder_; /** * * *
     * Metadata for a video media type.
     * 
* * .google.photos.library.v1.Video video = 7; */ public boolean hasVideo() { return metadataCase_ == 7; } /** * * *
     * Metadata for a video media type.
     * 
* * .google.photos.library.v1.Video video = 7; */ public com.google.photos.library.v1.proto.Video getVideo() { if (videoBuilder_ == null) { if (metadataCase_ == 7) { return (com.google.photos.library.v1.proto.Video) metadata_; } return com.google.photos.library.v1.proto.Video.getDefaultInstance(); } else { if (metadataCase_ == 7) { return videoBuilder_.getMessage(); } return com.google.photos.library.v1.proto.Video.getDefaultInstance(); } } /** * * *
     * Metadata for a video media type.
     * 
* * .google.photos.library.v1.Video video = 7; */ public Builder setVideo(com.google.photos.library.v1.proto.Video value) { if (videoBuilder_ == null) { if (value == null) { throw new NullPointerException(); } metadata_ = value; onChanged(); } else { videoBuilder_.setMessage(value); } metadataCase_ = 7; return this; } /** * * *
     * Metadata for a video media type.
     * 
* * .google.photos.library.v1.Video video = 7; */ public Builder setVideo(com.google.photos.library.v1.proto.Video.Builder builderForValue) { if (videoBuilder_ == null) { metadata_ = builderForValue.build(); onChanged(); } else { videoBuilder_.setMessage(builderForValue.build()); } metadataCase_ = 7; return this; } /** * * *
     * Metadata for a video media type.
     * 
* * .google.photos.library.v1.Video video = 7; */ public Builder mergeVideo(com.google.photos.library.v1.proto.Video value) { if (videoBuilder_ == null) { if (metadataCase_ == 7 && metadata_ != com.google.photos.library.v1.proto.Video.getDefaultInstance()) { metadata_ = com.google.photos.library.v1.proto.Video.newBuilder( (com.google.photos.library.v1.proto.Video) metadata_) .mergeFrom(value) .buildPartial(); } else { metadata_ = value; } onChanged(); } else { if (metadataCase_ == 7) { videoBuilder_.mergeFrom(value); } videoBuilder_.setMessage(value); } metadataCase_ = 7; return this; } /** * * *
     * Metadata for a video media type.
     * 
* * .google.photos.library.v1.Video video = 7; */ public Builder clearVideo() { if (videoBuilder_ == null) { if (metadataCase_ == 7) { metadataCase_ = 0; metadata_ = null; onChanged(); } } else { if (metadataCase_ == 7) { metadataCase_ = 0; metadata_ = null; } videoBuilder_.clear(); } return this; } /** * * *
     * Metadata for a video media type.
     * 
* * .google.photos.library.v1.Video video = 7; */ public com.google.photos.library.v1.proto.Video.Builder getVideoBuilder() { return getVideoFieldBuilder().getBuilder(); } /** * * *
     * Metadata for a video media type.
     * 
* * .google.photos.library.v1.Video video = 7; */ public com.google.photos.library.v1.proto.VideoOrBuilder getVideoOrBuilder() { if ((metadataCase_ == 7) && (videoBuilder_ != null)) { return videoBuilder_.getMessageOrBuilder(); } else { if (metadataCase_ == 7) { return (com.google.photos.library.v1.proto.Video) metadata_; } return com.google.photos.library.v1.proto.Video.getDefaultInstance(); } } /** * * *
     * Metadata for a video media type.
     * 
* * .google.photos.library.v1.Video video = 7; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.photos.library.v1.proto.Video, com.google.photos.library.v1.proto.Video.Builder, com.google.photos.library.v1.proto.VideoOrBuilder> getVideoFieldBuilder() { if (videoBuilder_ == null) { if (!(metadataCase_ == 7)) { metadata_ = com.google.photos.library.v1.proto.Video.getDefaultInstance(); } videoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.photos.library.v1.proto.Video, com.google.photos.library.v1.proto.Video.Builder, com.google.photos.library.v1.proto.VideoOrBuilder>( (com.google.photos.library.v1.proto.Video) metadata_, getParentForChildren(), isClean()); metadata_ = null; } metadataCase_ = 7; onChanged(); ; return videoBuilder_; } @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.MediaMetadata) } // @@protoc_insertion_point(class_scope:google.photos.library.v1.MediaMetadata) private static final com.google.photos.library.v1.proto.MediaMetadata DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.photos.library.v1.proto.MediaMetadata(); } public static com.google.photos.library.v1.proto.MediaMetadata getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public MediaMetadata parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new MediaMetadata(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.MediaMetadata getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy