com.google.photos.library.v1.proto.NewEnrichmentItem Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of google-photos-library-client Show documentation
Show all versions of google-photos-library-client Show documentation
Google Photos Library API Client Library for Java
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/photos/library/v1/photos_library.proto
package com.google.photos.library.v1.proto;
/**
*
*
*
* A new enrichment item to be added to an album, used by the
* `albums.addEnrichment` call.
*
*
* Protobuf type {@code google.photos.library.v1.NewEnrichmentItem}
*/
public final class NewEnrichmentItem extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.photos.library.v1.NewEnrichmentItem)
NewEnrichmentItemOrBuilder {
private static final long serialVersionUID = 0L;
// Use NewEnrichmentItem.newBuilder() to construct.
private NewEnrichmentItem(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private NewEnrichmentItem() {}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
private NewEnrichmentItem(
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.photos.library.v1.proto.TextEnrichment.Builder subBuilder = null;
if (enrichmentCase_ == 1) {
subBuilder =
((com.google.photos.library.v1.proto.TextEnrichment) enrichment_).toBuilder();
}
enrichment_ =
input.readMessage(
com.google.photos.library.v1.proto.TextEnrichment.parser(),
extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(
(com.google.photos.library.v1.proto.TextEnrichment) enrichment_);
enrichment_ = subBuilder.buildPartial();
}
enrichmentCase_ = 1;
break;
}
case 18:
{
com.google.photos.library.v1.proto.LocationEnrichment.Builder subBuilder = null;
if (enrichmentCase_ == 2) {
subBuilder =
((com.google.photos.library.v1.proto.LocationEnrichment) enrichment_)
.toBuilder();
}
enrichment_ =
input.readMessage(
com.google.photos.library.v1.proto.LocationEnrichment.parser(),
extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(
(com.google.photos.library.v1.proto.LocationEnrichment) enrichment_);
enrichment_ = subBuilder.buildPartial();
}
enrichmentCase_ = 2;
break;
}
case 26:
{
com.google.photos.library.v1.proto.MapEnrichment.Builder subBuilder = null;
if (enrichmentCase_ == 3) {
subBuilder =
((com.google.photos.library.v1.proto.MapEnrichment) enrichment_).toBuilder();
}
enrichment_ =
input.readMessage(
com.google.photos.library.v1.proto.MapEnrichment.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(
(com.google.photos.library.v1.proto.MapEnrichment) enrichment_);
enrichment_ = subBuilder.buildPartial();
}
enrichmentCase_ = 3;
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_NewEnrichmentItem_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_NewEnrichmentItem_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.photos.library.v1.proto.NewEnrichmentItem.class,
com.google.photos.library.v1.proto.NewEnrichmentItem.Builder.class);
}
private int enrichmentCase_ = 0;
private java.lang.Object enrichment_;
public enum EnrichmentCase implements com.google.protobuf.Internal.EnumLite {
TEXT_ENRICHMENT(1),
LOCATION_ENRICHMENT(2),
MAP_ENRICHMENT(3),
ENRICHMENT_NOT_SET(0);
private final int value;
private EnrichmentCase(int value) {
this.value = value;
}
/** @deprecated Use {@link #forNumber(int)} instead. */
@java.lang.Deprecated
public static EnrichmentCase valueOf(int value) {
return forNumber(value);
}
public static EnrichmentCase forNumber(int value) {
switch (value) {
case 1:
return TEXT_ENRICHMENT;
case 2:
return LOCATION_ENRICHMENT;
case 3:
return MAP_ENRICHMENT;
case 0:
return ENRICHMENT_NOT_SET;
default:
return null;
}
}
public int getNumber() {
return this.value;
}
};
public EnrichmentCase getEnrichmentCase() {
return EnrichmentCase.forNumber(enrichmentCase_);
}
public static final int TEXT_ENRICHMENT_FIELD_NUMBER = 1;
/**
*
*
*
* Text to be added to the album.
*
*
* .google.photos.library.v1.TextEnrichment text_enrichment = 1;
*/
public boolean hasTextEnrichment() {
return enrichmentCase_ == 1;
}
/**
*
*
*
* Text to be added to the album.
*
*
* .google.photos.library.v1.TextEnrichment text_enrichment = 1;
*/
public com.google.photos.library.v1.proto.TextEnrichment getTextEnrichment() {
if (enrichmentCase_ == 1) {
return (com.google.photos.library.v1.proto.TextEnrichment) enrichment_;
}
return com.google.photos.library.v1.proto.TextEnrichment.getDefaultInstance();
}
/**
*
*
*
* Text to be added to the album.
*
*
* .google.photos.library.v1.TextEnrichment text_enrichment = 1;
*/
public com.google.photos.library.v1.proto.TextEnrichmentOrBuilder getTextEnrichmentOrBuilder() {
if (enrichmentCase_ == 1) {
return (com.google.photos.library.v1.proto.TextEnrichment) enrichment_;
}
return com.google.photos.library.v1.proto.TextEnrichment.getDefaultInstance();
}
public static final int LOCATION_ENRICHMENT_FIELD_NUMBER = 2;
/**
*
*
*
* Location to be added to the album.
*
*
* .google.photos.library.v1.LocationEnrichment location_enrichment = 2;
*/
public boolean hasLocationEnrichment() {
return enrichmentCase_ == 2;
}
/**
*
*
*
* Location to be added to the album.
*
*
* .google.photos.library.v1.LocationEnrichment location_enrichment = 2;
*/
public com.google.photos.library.v1.proto.LocationEnrichment getLocationEnrichment() {
if (enrichmentCase_ == 2) {
return (com.google.photos.library.v1.proto.LocationEnrichment) enrichment_;
}
return com.google.photos.library.v1.proto.LocationEnrichment.getDefaultInstance();
}
/**
*
*
*
* Location to be added to the album.
*
*
* .google.photos.library.v1.LocationEnrichment location_enrichment = 2;
*/
public com.google.photos.library.v1.proto.LocationEnrichmentOrBuilder
getLocationEnrichmentOrBuilder() {
if (enrichmentCase_ == 2) {
return (com.google.photos.library.v1.proto.LocationEnrichment) enrichment_;
}
return com.google.photos.library.v1.proto.LocationEnrichment.getDefaultInstance();
}
public static final int MAP_ENRICHMENT_FIELD_NUMBER = 3;
/**
*
*
*
* Map to be added to the album.
*
*
* .google.photos.library.v1.MapEnrichment map_enrichment = 3;
*/
public boolean hasMapEnrichment() {
return enrichmentCase_ == 3;
}
/**
*
*
*
* Map to be added to the album.
*
*
* .google.photos.library.v1.MapEnrichment map_enrichment = 3;
*/
public com.google.photos.library.v1.proto.MapEnrichment getMapEnrichment() {
if (enrichmentCase_ == 3) {
return (com.google.photos.library.v1.proto.MapEnrichment) enrichment_;
}
return com.google.photos.library.v1.proto.MapEnrichment.getDefaultInstance();
}
/**
*
*
*
* Map to be added to the album.
*
*
* .google.photos.library.v1.MapEnrichment map_enrichment = 3;
*/
public com.google.photos.library.v1.proto.MapEnrichmentOrBuilder getMapEnrichmentOrBuilder() {
if (enrichmentCase_ == 3) {
return (com.google.photos.library.v1.proto.MapEnrichment) enrichment_;
}
return com.google.photos.library.v1.proto.MapEnrichment.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 (enrichmentCase_ == 1) {
output.writeMessage(1, (com.google.photos.library.v1.proto.TextEnrichment) enrichment_);
}
if (enrichmentCase_ == 2) {
output.writeMessage(2, (com.google.photos.library.v1.proto.LocationEnrichment) enrichment_);
}
if (enrichmentCase_ == 3) {
output.writeMessage(3, (com.google.photos.library.v1.proto.MapEnrichment) enrichment_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (enrichmentCase_ == 1) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
1, (com.google.photos.library.v1.proto.TextEnrichment) enrichment_);
}
if (enrichmentCase_ == 2) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
2, (com.google.photos.library.v1.proto.LocationEnrichment) enrichment_);
}
if (enrichmentCase_ == 3) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
3, (com.google.photos.library.v1.proto.MapEnrichment) enrichment_);
}
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.NewEnrichmentItem)) {
return super.equals(obj);
}
com.google.photos.library.v1.proto.NewEnrichmentItem other =
(com.google.photos.library.v1.proto.NewEnrichmentItem) obj;
boolean result = true;
result = result && getEnrichmentCase().equals(other.getEnrichmentCase());
if (!result) return false;
switch (enrichmentCase_) {
case 1:
result = result && getTextEnrichment().equals(other.getTextEnrichment());
break;
case 2:
result = result && getLocationEnrichment().equals(other.getLocationEnrichment());
break;
case 3:
result = result && getMapEnrichment().equals(other.getMapEnrichment());
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();
switch (enrichmentCase_) {
case 1:
hash = (37 * hash) + TEXT_ENRICHMENT_FIELD_NUMBER;
hash = (53 * hash) + getTextEnrichment().hashCode();
break;
case 2:
hash = (37 * hash) + LOCATION_ENRICHMENT_FIELD_NUMBER;
hash = (53 * hash) + getLocationEnrichment().hashCode();
break;
case 3:
hash = (37 * hash) + MAP_ENRICHMENT_FIELD_NUMBER;
hash = (53 * hash) + getMapEnrichment().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.photos.library.v1.proto.NewEnrichmentItem parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.photos.library.v1.proto.NewEnrichmentItem 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.NewEnrichmentItem parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.photos.library.v1.proto.NewEnrichmentItem 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.NewEnrichmentItem parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.photos.library.v1.proto.NewEnrichmentItem 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.NewEnrichmentItem 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.NewEnrichmentItem 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.NewEnrichmentItem 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.NewEnrichmentItem 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.NewEnrichmentItem 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.NewEnrichmentItem 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.NewEnrichmentItem 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;
}
/**
*
*
*
* A new enrichment item to be added to an album, used by the
* `albums.addEnrichment` call.
*
*
* Protobuf type {@code google.photos.library.v1.NewEnrichmentItem}
*/
public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.photos.library.v1.NewEnrichmentItem)
com.google.photos.library.v1.proto.NewEnrichmentItemOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.photos.library.v1.proto.LibraryServiceProto
.internal_static_google_photos_library_v1_NewEnrichmentItem_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_NewEnrichmentItem_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.photos.library.v1.proto.NewEnrichmentItem.class,
com.google.photos.library.v1.proto.NewEnrichmentItem.Builder.class);
}
// Construct using com.google.photos.library.v1.proto.NewEnrichmentItem.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();
enrichmentCase_ = 0;
enrichment_ = 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_NewEnrichmentItem_descriptor;
}
@java.lang.Override
public com.google.photos.library.v1.proto.NewEnrichmentItem getDefaultInstanceForType() {
return com.google.photos.library.v1.proto.NewEnrichmentItem.getDefaultInstance();
}
@java.lang.Override
public com.google.photos.library.v1.proto.NewEnrichmentItem build() {
com.google.photos.library.v1.proto.NewEnrichmentItem result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.photos.library.v1.proto.NewEnrichmentItem buildPartial() {
com.google.photos.library.v1.proto.NewEnrichmentItem result =
new com.google.photos.library.v1.proto.NewEnrichmentItem(this);
if (enrichmentCase_ == 1) {
if (textEnrichmentBuilder_ == null) {
result.enrichment_ = enrichment_;
} else {
result.enrichment_ = textEnrichmentBuilder_.build();
}
}
if (enrichmentCase_ == 2) {
if (locationEnrichmentBuilder_ == null) {
result.enrichment_ = enrichment_;
} else {
result.enrichment_ = locationEnrichmentBuilder_.build();
}
}
if (enrichmentCase_ == 3) {
if (mapEnrichmentBuilder_ == null) {
result.enrichment_ = enrichment_;
} else {
result.enrichment_ = mapEnrichmentBuilder_.build();
}
}
result.enrichmentCase_ = enrichmentCase_;
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.NewEnrichmentItem) {
return mergeFrom((com.google.photos.library.v1.proto.NewEnrichmentItem) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.photos.library.v1.proto.NewEnrichmentItem other) {
if (other == com.google.photos.library.v1.proto.NewEnrichmentItem.getDefaultInstance())
return this;
switch (other.getEnrichmentCase()) {
case TEXT_ENRICHMENT:
{
mergeTextEnrichment(other.getTextEnrichment());
break;
}
case LOCATION_ENRICHMENT:
{
mergeLocationEnrichment(other.getLocationEnrichment());
break;
}
case MAP_ENRICHMENT:
{
mergeMapEnrichment(other.getMapEnrichment());
break;
}
case ENRICHMENT_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.NewEnrichmentItem parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage =
(com.google.photos.library.v1.proto.NewEnrichmentItem) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int enrichmentCase_ = 0;
private java.lang.Object enrichment_;
public EnrichmentCase getEnrichmentCase() {
return EnrichmentCase.forNumber(enrichmentCase_);
}
public Builder clearEnrichment() {
enrichmentCase_ = 0;
enrichment_ = null;
onChanged();
return this;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.photos.library.v1.proto.TextEnrichment,
com.google.photos.library.v1.proto.TextEnrichment.Builder,
com.google.photos.library.v1.proto.TextEnrichmentOrBuilder>
textEnrichmentBuilder_;
/**
*
*
*
* Text to be added to the album.
*
*
* .google.photos.library.v1.TextEnrichment text_enrichment = 1;
*/
public boolean hasTextEnrichment() {
return enrichmentCase_ == 1;
}
/**
*
*
*
* Text to be added to the album.
*
*
* .google.photos.library.v1.TextEnrichment text_enrichment = 1;
*/
public com.google.photos.library.v1.proto.TextEnrichment getTextEnrichment() {
if (textEnrichmentBuilder_ == null) {
if (enrichmentCase_ == 1) {
return (com.google.photos.library.v1.proto.TextEnrichment) enrichment_;
}
return com.google.photos.library.v1.proto.TextEnrichment.getDefaultInstance();
} else {
if (enrichmentCase_ == 1) {
return textEnrichmentBuilder_.getMessage();
}
return com.google.photos.library.v1.proto.TextEnrichment.getDefaultInstance();
}
}
/**
*
*
*
* Text to be added to the album.
*
*
* .google.photos.library.v1.TextEnrichment text_enrichment = 1;
*/
public Builder setTextEnrichment(com.google.photos.library.v1.proto.TextEnrichment value) {
if (textEnrichmentBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
enrichment_ = value;
onChanged();
} else {
textEnrichmentBuilder_.setMessage(value);
}
enrichmentCase_ = 1;
return this;
}
/**
*
*
*
* Text to be added to the album.
*
*
* .google.photos.library.v1.TextEnrichment text_enrichment = 1;
*/
public Builder setTextEnrichment(
com.google.photos.library.v1.proto.TextEnrichment.Builder builderForValue) {
if (textEnrichmentBuilder_ == null) {
enrichment_ = builderForValue.build();
onChanged();
} else {
textEnrichmentBuilder_.setMessage(builderForValue.build());
}
enrichmentCase_ = 1;
return this;
}
/**
*
*
*
* Text to be added to the album.
*
*
* .google.photos.library.v1.TextEnrichment text_enrichment = 1;
*/
public Builder mergeTextEnrichment(com.google.photos.library.v1.proto.TextEnrichment value) {
if (textEnrichmentBuilder_ == null) {
if (enrichmentCase_ == 1
&& enrichment_
!= com.google.photos.library.v1.proto.TextEnrichment.getDefaultInstance()) {
enrichment_ =
com.google.photos.library.v1.proto.TextEnrichment.newBuilder(
(com.google.photos.library.v1.proto.TextEnrichment) enrichment_)
.mergeFrom(value)
.buildPartial();
} else {
enrichment_ = value;
}
onChanged();
} else {
if (enrichmentCase_ == 1) {
textEnrichmentBuilder_.mergeFrom(value);
}
textEnrichmentBuilder_.setMessage(value);
}
enrichmentCase_ = 1;
return this;
}
/**
*
*
*
* Text to be added to the album.
*
*
* .google.photos.library.v1.TextEnrichment text_enrichment = 1;
*/
public Builder clearTextEnrichment() {
if (textEnrichmentBuilder_ == null) {
if (enrichmentCase_ == 1) {
enrichmentCase_ = 0;
enrichment_ = null;
onChanged();
}
} else {
if (enrichmentCase_ == 1) {
enrichmentCase_ = 0;
enrichment_ = null;
}
textEnrichmentBuilder_.clear();
}
return this;
}
/**
*
*
*
* Text to be added to the album.
*
*
* .google.photos.library.v1.TextEnrichment text_enrichment = 1;
*/
public com.google.photos.library.v1.proto.TextEnrichment.Builder getTextEnrichmentBuilder() {
return getTextEnrichmentFieldBuilder().getBuilder();
}
/**
*
*
*
* Text to be added to the album.
*
*
* .google.photos.library.v1.TextEnrichment text_enrichment = 1;
*/
public com.google.photos.library.v1.proto.TextEnrichmentOrBuilder getTextEnrichmentOrBuilder() {
if ((enrichmentCase_ == 1) && (textEnrichmentBuilder_ != null)) {
return textEnrichmentBuilder_.getMessageOrBuilder();
} else {
if (enrichmentCase_ == 1) {
return (com.google.photos.library.v1.proto.TextEnrichment) enrichment_;
}
return com.google.photos.library.v1.proto.TextEnrichment.getDefaultInstance();
}
}
/**
*
*
*
* Text to be added to the album.
*
*
* .google.photos.library.v1.TextEnrichment text_enrichment = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.photos.library.v1.proto.TextEnrichment,
com.google.photos.library.v1.proto.TextEnrichment.Builder,
com.google.photos.library.v1.proto.TextEnrichmentOrBuilder>
getTextEnrichmentFieldBuilder() {
if (textEnrichmentBuilder_ == null) {
if (!(enrichmentCase_ == 1)) {
enrichment_ = com.google.photos.library.v1.proto.TextEnrichment.getDefaultInstance();
}
textEnrichmentBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.photos.library.v1.proto.TextEnrichment,
com.google.photos.library.v1.proto.TextEnrichment.Builder,
com.google.photos.library.v1.proto.TextEnrichmentOrBuilder>(
(com.google.photos.library.v1.proto.TextEnrichment) enrichment_,
getParentForChildren(),
isClean());
enrichment_ = null;
}
enrichmentCase_ = 1;
onChanged();
;
return textEnrichmentBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.photos.library.v1.proto.LocationEnrichment,
com.google.photos.library.v1.proto.LocationEnrichment.Builder,
com.google.photos.library.v1.proto.LocationEnrichmentOrBuilder>
locationEnrichmentBuilder_;
/**
*
*
*
* Location to be added to the album.
*
*
* .google.photos.library.v1.LocationEnrichment location_enrichment = 2;
*/
public boolean hasLocationEnrichment() {
return enrichmentCase_ == 2;
}
/**
*
*
*
* Location to be added to the album.
*
*
* .google.photos.library.v1.LocationEnrichment location_enrichment = 2;
*/
public com.google.photos.library.v1.proto.LocationEnrichment getLocationEnrichment() {
if (locationEnrichmentBuilder_ == null) {
if (enrichmentCase_ == 2) {
return (com.google.photos.library.v1.proto.LocationEnrichment) enrichment_;
}
return com.google.photos.library.v1.proto.LocationEnrichment.getDefaultInstance();
} else {
if (enrichmentCase_ == 2) {
return locationEnrichmentBuilder_.getMessage();
}
return com.google.photos.library.v1.proto.LocationEnrichment.getDefaultInstance();
}
}
/**
*
*
*
* Location to be added to the album.
*
*
* .google.photos.library.v1.LocationEnrichment location_enrichment = 2;
*/
public Builder setLocationEnrichment(
com.google.photos.library.v1.proto.LocationEnrichment value) {
if (locationEnrichmentBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
enrichment_ = value;
onChanged();
} else {
locationEnrichmentBuilder_.setMessage(value);
}
enrichmentCase_ = 2;
return this;
}
/**
*
*
*
* Location to be added to the album.
*
*
* .google.photos.library.v1.LocationEnrichment location_enrichment = 2;
*/
public Builder setLocationEnrichment(
com.google.photos.library.v1.proto.LocationEnrichment.Builder builderForValue) {
if (locationEnrichmentBuilder_ == null) {
enrichment_ = builderForValue.build();
onChanged();
} else {
locationEnrichmentBuilder_.setMessage(builderForValue.build());
}
enrichmentCase_ = 2;
return this;
}
/**
*
*
*
* Location to be added to the album.
*
*
* .google.photos.library.v1.LocationEnrichment location_enrichment = 2;
*/
public Builder mergeLocationEnrichment(
com.google.photos.library.v1.proto.LocationEnrichment value) {
if (locationEnrichmentBuilder_ == null) {
if (enrichmentCase_ == 2
&& enrichment_
!= com.google.photos.library.v1.proto.LocationEnrichment.getDefaultInstance()) {
enrichment_ =
com.google.photos.library.v1.proto.LocationEnrichment.newBuilder(
(com.google.photos.library.v1.proto.LocationEnrichment) enrichment_)
.mergeFrom(value)
.buildPartial();
} else {
enrichment_ = value;
}
onChanged();
} else {
if (enrichmentCase_ == 2) {
locationEnrichmentBuilder_.mergeFrom(value);
}
locationEnrichmentBuilder_.setMessage(value);
}
enrichmentCase_ = 2;
return this;
}
/**
*
*
*
* Location to be added to the album.
*
*
* .google.photos.library.v1.LocationEnrichment location_enrichment = 2;
*/
public Builder clearLocationEnrichment() {
if (locationEnrichmentBuilder_ == null) {
if (enrichmentCase_ == 2) {
enrichmentCase_ = 0;
enrichment_ = null;
onChanged();
}
} else {
if (enrichmentCase_ == 2) {
enrichmentCase_ = 0;
enrichment_ = null;
}
locationEnrichmentBuilder_.clear();
}
return this;
}
/**
*
*
*
* Location to be added to the album.
*
*
* .google.photos.library.v1.LocationEnrichment location_enrichment = 2;
*/
public com.google.photos.library.v1.proto.LocationEnrichment.Builder
getLocationEnrichmentBuilder() {
return getLocationEnrichmentFieldBuilder().getBuilder();
}
/**
*
*
*
* Location to be added to the album.
*
*
* .google.photos.library.v1.LocationEnrichment location_enrichment = 2;
*/
public com.google.photos.library.v1.proto.LocationEnrichmentOrBuilder
getLocationEnrichmentOrBuilder() {
if ((enrichmentCase_ == 2) && (locationEnrichmentBuilder_ != null)) {
return locationEnrichmentBuilder_.getMessageOrBuilder();
} else {
if (enrichmentCase_ == 2) {
return (com.google.photos.library.v1.proto.LocationEnrichment) enrichment_;
}
return com.google.photos.library.v1.proto.LocationEnrichment.getDefaultInstance();
}
}
/**
*
*
*
* Location to be added to the album.
*
*
* .google.photos.library.v1.LocationEnrichment location_enrichment = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.photos.library.v1.proto.LocationEnrichment,
com.google.photos.library.v1.proto.LocationEnrichment.Builder,
com.google.photos.library.v1.proto.LocationEnrichmentOrBuilder>
getLocationEnrichmentFieldBuilder() {
if (locationEnrichmentBuilder_ == null) {
if (!(enrichmentCase_ == 2)) {
enrichment_ = com.google.photos.library.v1.proto.LocationEnrichment.getDefaultInstance();
}
locationEnrichmentBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.photos.library.v1.proto.LocationEnrichment,
com.google.photos.library.v1.proto.LocationEnrichment.Builder,
com.google.photos.library.v1.proto.LocationEnrichmentOrBuilder>(
(com.google.photos.library.v1.proto.LocationEnrichment) enrichment_,
getParentForChildren(),
isClean());
enrichment_ = null;
}
enrichmentCase_ = 2;
onChanged();
;
return locationEnrichmentBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.photos.library.v1.proto.MapEnrichment,
com.google.photos.library.v1.proto.MapEnrichment.Builder,
com.google.photos.library.v1.proto.MapEnrichmentOrBuilder>
mapEnrichmentBuilder_;
/**
*
*
*
* Map to be added to the album.
*
*
* .google.photos.library.v1.MapEnrichment map_enrichment = 3;
*/
public boolean hasMapEnrichment() {
return enrichmentCase_ == 3;
}
/**
*
*
*
* Map to be added to the album.
*
*
* .google.photos.library.v1.MapEnrichment map_enrichment = 3;
*/
public com.google.photos.library.v1.proto.MapEnrichment getMapEnrichment() {
if (mapEnrichmentBuilder_ == null) {
if (enrichmentCase_ == 3) {
return (com.google.photos.library.v1.proto.MapEnrichment) enrichment_;
}
return com.google.photos.library.v1.proto.MapEnrichment.getDefaultInstance();
} else {
if (enrichmentCase_ == 3) {
return mapEnrichmentBuilder_.getMessage();
}
return com.google.photos.library.v1.proto.MapEnrichment.getDefaultInstance();
}
}
/**
*
*
*
* Map to be added to the album.
*
*
* .google.photos.library.v1.MapEnrichment map_enrichment = 3;
*/
public Builder setMapEnrichment(com.google.photos.library.v1.proto.MapEnrichment value) {
if (mapEnrichmentBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
enrichment_ = value;
onChanged();
} else {
mapEnrichmentBuilder_.setMessage(value);
}
enrichmentCase_ = 3;
return this;
}
/**
*
*
*
* Map to be added to the album.
*
*
* .google.photos.library.v1.MapEnrichment map_enrichment = 3;
*/
public Builder setMapEnrichment(
com.google.photos.library.v1.proto.MapEnrichment.Builder builderForValue) {
if (mapEnrichmentBuilder_ == null) {
enrichment_ = builderForValue.build();
onChanged();
} else {
mapEnrichmentBuilder_.setMessage(builderForValue.build());
}
enrichmentCase_ = 3;
return this;
}
/**
*
*
*
* Map to be added to the album.
*
*
* .google.photos.library.v1.MapEnrichment map_enrichment = 3;
*/
public Builder mergeMapEnrichment(com.google.photos.library.v1.proto.MapEnrichment value) {
if (mapEnrichmentBuilder_ == null) {
if (enrichmentCase_ == 3
&& enrichment_
!= com.google.photos.library.v1.proto.MapEnrichment.getDefaultInstance()) {
enrichment_ =
com.google.photos.library.v1.proto.MapEnrichment.newBuilder(
(com.google.photos.library.v1.proto.MapEnrichment) enrichment_)
.mergeFrom(value)
.buildPartial();
} else {
enrichment_ = value;
}
onChanged();
} else {
if (enrichmentCase_ == 3) {
mapEnrichmentBuilder_.mergeFrom(value);
}
mapEnrichmentBuilder_.setMessage(value);
}
enrichmentCase_ = 3;
return this;
}
/**
*
*
*
* Map to be added to the album.
*
*
* .google.photos.library.v1.MapEnrichment map_enrichment = 3;
*/
public Builder clearMapEnrichment() {
if (mapEnrichmentBuilder_ == null) {
if (enrichmentCase_ == 3) {
enrichmentCase_ = 0;
enrichment_ = null;
onChanged();
}
} else {
if (enrichmentCase_ == 3) {
enrichmentCase_ = 0;
enrichment_ = null;
}
mapEnrichmentBuilder_.clear();
}
return this;
}
/**
*
*
*
* Map to be added to the album.
*
*
* .google.photos.library.v1.MapEnrichment map_enrichment = 3;
*/
public com.google.photos.library.v1.proto.MapEnrichment.Builder getMapEnrichmentBuilder() {
return getMapEnrichmentFieldBuilder().getBuilder();
}
/**
*
*
*
* Map to be added to the album.
*
*
* .google.photos.library.v1.MapEnrichment map_enrichment = 3;
*/
public com.google.photos.library.v1.proto.MapEnrichmentOrBuilder getMapEnrichmentOrBuilder() {
if ((enrichmentCase_ == 3) && (mapEnrichmentBuilder_ != null)) {
return mapEnrichmentBuilder_.getMessageOrBuilder();
} else {
if (enrichmentCase_ == 3) {
return (com.google.photos.library.v1.proto.MapEnrichment) enrichment_;
}
return com.google.photos.library.v1.proto.MapEnrichment.getDefaultInstance();
}
}
/**
*
*
*
* Map to be added to the album.
*
*
* .google.photos.library.v1.MapEnrichment map_enrichment = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.photos.library.v1.proto.MapEnrichment,
com.google.photos.library.v1.proto.MapEnrichment.Builder,
com.google.photos.library.v1.proto.MapEnrichmentOrBuilder>
getMapEnrichmentFieldBuilder() {
if (mapEnrichmentBuilder_ == null) {
if (!(enrichmentCase_ == 3)) {
enrichment_ = com.google.photos.library.v1.proto.MapEnrichment.getDefaultInstance();
}
mapEnrichmentBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.photos.library.v1.proto.MapEnrichment,
com.google.photos.library.v1.proto.MapEnrichment.Builder,
com.google.photos.library.v1.proto.MapEnrichmentOrBuilder>(
(com.google.photos.library.v1.proto.MapEnrichment) enrichment_,
getParentForChildren(),
isClean());
enrichment_ = null;
}
enrichmentCase_ = 3;
onChanged();
;
return mapEnrichmentBuilder_;
}
@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.NewEnrichmentItem)
}
// @@protoc_insertion_point(class_scope:google.photos.library.v1.NewEnrichmentItem)
private static final com.google.photos.library.v1.proto.NewEnrichmentItem DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.photos.library.v1.proto.NewEnrichmentItem();
}
public static com.google.photos.library.v1.proto.NewEnrichmentItem getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public NewEnrichmentItem parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new NewEnrichmentItem(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.NewEnrichmentItem getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}