com.google.photos.library.v1.proto.AlbumPosition 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;
/**
*
*
*
* Specifies a position in an album.
*
*
* Protobuf type {@code google.photos.library.v1.AlbumPosition}
*/
public final class AlbumPosition extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.photos.library.v1.AlbumPosition)
AlbumPositionOrBuilder {
private static final long serialVersionUID = 0L;
// Use AlbumPosition.newBuilder() to construct.
private AlbumPosition(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private AlbumPosition() {
position_ = 0;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
private AlbumPosition(
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 8:
{
int rawValue = input.readEnum();
position_ = rawValue;
break;
}
case 18:
{
java.lang.String s = input.readStringRequireUtf8();
relativeItemCase_ = 2;
relativeItem_ = s;
break;
}
case 26:
{
java.lang.String s = input.readStringRequireUtf8();
relativeItemCase_ = 3;
relativeItem_ = s;
break;
}
default:
{
if (!parseUnknownField(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_AlbumPosition_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_AlbumPosition_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.photos.library.v1.proto.AlbumPosition.class,
com.google.photos.library.v1.proto.AlbumPosition.Builder.class);
}
/**
*
*
*
* Possible positions in an album.
*
*
* Protobuf enum {@code google.photos.library.v1.AlbumPosition.PositionType}
*/
public enum PositionType implements com.google.protobuf.ProtocolMessageEnum {
/**
*
*
*
* Default value if this enum isn't set.
*
*
* POSITION_TYPE_UNSPECIFIED = 0;
*/
POSITION_TYPE_UNSPECIFIED(0),
/**
*
*
*
* At the beginning of the album.
*
*
* FIRST_IN_ALBUM = 1;
*/
FIRST_IN_ALBUM(1),
/**
*
*
*
* At the end of the album.
*
*
* LAST_IN_ALBUM = 2;
*/
LAST_IN_ALBUM(2),
/**
*
*
*
* After a media item.
*
*
* AFTER_MEDIA_ITEM = 3;
*/
AFTER_MEDIA_ITEM(3),
/**
*
*
*
* After an enrichment item.
*
*
* AFTER_ENRICHMENT_ITEM = 4;
*/
AFTER_ENRICHMENT_ITEM(4),
UNRECOGNIZED(-1),
;
/**
*
*
*
* Default value if this enum isn't set.
*
*
* POSITION_TYPE_UNSPECIFIED = 0;
*/
public static final int POSITION_TYPE_UNSPECIFIED_VALUE = 0;
/**
*
*
*
* At the beginning of the album.
*
*
* FIRST_IN_ALBUM = 1;
*/
public static final int FIRST_IN_ALBUM_VALUE = 1;
/**
*
*
*
* At the end of the album.
*
*
* LAST_IN_ALBUM = 2;
*/
public static final int LAST_IN_ALBUM_VALUE = 2;
/**
*
*
*
* After a media item.
*
*
* AFTER_MEDIA_ITEM = 3;
*/
public static final int AFTER_MEDIA_ITEM_VALUE = 3;
/**
*
*
*
* After an enrichment item.
*
*
* AFTER_ENRICHMENT_ITEM = 4;
*/
public static final int AFTER_ENRICHMENT_ITEM_VALUE = 4;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/** @deprecated Use {@link #forNumber(int)} instead. */
@java.lang.Deprecated
public static PositionType valueOf(int value) {
return forNumber(value);
}
public static PositionType forNumber(int value) {
switch (value) {
case 0:
return POSITION_TYPE_UNSPECIFIED;
case 1:
return FIRST_IN_ALBUM;
case 2:
return LAST_IN_ALBUM;
case 3:
return AFTER_MEDIA_ITEM;
case 4:
return AFTER_ENRICHMENT_ITEM;
default:
return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public PositionType findValueByNumber(int number) {
return PositionType.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
return com.google.photos.library.v1.proto.AlbumPosition.getDescriptor().getEnumTypes().get(0);
}
private static final PositionType[] VALUES = values();
public static PositionType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private PositionType(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:google.photos.library.v1.AlbumPosition.PositionType)
}
private int relativeItemCase_ = 0;
private java.lang.Object relativeItem_;
public enum RelativeItemCase implements com.google.protobuf.Internal.EnumLite {
RELATIVE_MEDIA_ITEM_ID(2),
RELATIVE_ENRICHMENT_ITEM_ID(3),
RELATIVEITEM_NOT_SET(0);
private final int value;
private RelativeItemCase(int value) {
this.value = value;
}
/** @deprecated Use {@link #forNumber(int)} instead. */
@java.lang.Deprecated
public static RelativeItemCase valueOf(int value) {
return forNumber(value);
}
public static RelativeItemCase forNumber(int value) {
switch (value) {
case 2:
return RELATIVE_MEDIA_ITEM_ID;
case 3:
return RELATIVE_ENRICHMENT_ITEM_ID;
case 0:
return RELATIVEITEM_NOT_SET;
default:
return null;
}
}
public int getNumber() {
return this.value;
}
};
public RelativeItemCase getRelativeItemCase() {
return RelativeItemCase.forNumber(relativeItemCase_);
}
public static final int POSITION_FIELD_NUMBER = 1;
private int position_;
/**
*
*
*
* Type of position, for a media or enrichment item.
*
*
* .google.photos.library.v1.AlbumPosition.PositionType position = 1;
*/
public int getPositionValue() {
return position_;
}
/**
*
*
*
* Type of position, for a media or enrichment item.
*
*
* .google.photos.library.v1.AlbumPosition.PositionType position = 1;
*/
public com.google.photos.library.v1.proto.AlbumPosition.PositionType getPosition() {
@SuppressWarnings("deprecation")
com.google.photos.library.v1.proto.AlbumPosition.PositionType result =
com.google.photos.library.v1.proto.AlbumPosition.PositionType.valueOf(position_);
return result == null
? com.google.photos.library.v1.proto.AlbumPosition.PositionType.UNRECOGNIZED
: result;
}
public static final int RELATIVE_MEDIA_ITEM_ID_FIELD_NUMBER = 2;
/**
*
*
*
* The media item to which the position is relative to.
* Only used when position type is AFTER_MEDIA_ITEM.
*
*
* string relative_media_item_id = 2;
*/
public java.lang.String getRelativeMediaItemId() {
java.lang.Object ref = "";
if (relativeItemCase_ == 2) {
ref = relativeItem_;
}
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();
if (relativeItemCase_ == 2) {
relativeItem_ = s;
}
return s;
}
}
/**
*
*
*
* The media item to which the position is relative to.
* Only used when position type is AFTER_MEDIA_ITEM.
*
*
* string relative_media_item_id = 2;
*/
public com.google.protobuf.ByteString getRelativeMediaItemIdBytes() {
java.lang.Object ref = "";
if (relativeItemCase_ == 2) {
ref = relativeItem_;
}
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
if (relativeItemCase_ == 2) {
relativeItem_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int RELATIVE_ENRICHMENT_ITEM_ID_FIELD_NUMBER = 3;
/**
*
*
*
* The enrichment item to which the position is relative to.
* Only used when position type is AFTER_ENRICHMENT_ITEM.
*
*
* string relative_enrichment_item_id = 3;
*/
public java.lang.String getRelativeEnrichmentItemId() {
java.lang.Object ref = "";
if (relativeItemCase_ == 3) {
ref = relativeItem_;
}
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();
if (relativeItemCase_ == 3) {
relativeItem_ = s;
}
return s;
}
}
/**
*
*
*
* The enrichment item to which the position is relative to.
* Only used when position type is AFTER_ENRICHMENT_ITEM.
*
*
* string relative_enrichment_item_id = 3;
*/
public com.google.protobuf.ByteString getRelativeEnrichmentItemIdBytes() {
java.lang.Object ref = "";
if (relativeItemCase_ == 3) {
ref = relativeItem_;
}
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
if (relativeItemCase_ == 3) {
relativeItem_ = 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 (position_
!= com.google.photos.library.v1.proto.AlbumPosition.PositionType.POSITION_TYPE_UNSPECIFIED
.getNumber()) {
output.writeEnum(1, position_);
}
if (relativeItemCase_ == 2) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, relativeItem_);
}
if (relativeItemCase_ == 3) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, relativeItem_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (position_
!= com.google.photos.library.v1.proto.AlbumPosition.PositionType.POSITION_TYPE_UNSPECIFIED
.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, position_);
}
if (relativeItemCase_ == 2) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, relativeItem_);
}
if (relativeItemCase_ == 3) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, relativeItem_);
}
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.AlbumPosition)) {
return super.equals(obj);
}
com.google.photos.library.v1.proto.AlbumPosition other =
(com.google.photos.library.v1.proto.AlbumPosition) obj;
if (position_ != other.position_) return false;
if (!getRelativeItemCase().equals(other.getRelativeItemCase())) return false;
switch (relativeItemCase_) {
case 2:
if (!getRelativeMediaItemId().equals(other.getRelativeMediaItemId())) return false;
break;
case 3:
if (!getRelativeEnrichmentItemId().equals(other.getRelativeEnrichmentItemId()))
return false;
break;
case 0:
default:
}
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + POSITION_FIELD_NUMBER;
hash = (53 * hash) + position_;
switch (relativeItemCase_) {
case 2:
hash = (37 * hash) + RELATIVE_MEDIA_ITEM_ID_FIELD_NUMBER;
hash = (53 * hash) + getRelativeMediaItemId().hashCode();
break;
case 3:
hash = (37 * hash) + RELATIVE_ENRICHMENT_ITEM_ID_FIELD_NUMBER;
hash = (53 * hash) + getRelativeEnrichmentItemId().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.photos.library.v1.proto.AlbumPosition parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.photos.library.v1.proto.AlbumPosition 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.AlbumPosition parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.photos.library.v1.proto.AlbumPosition 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.AlbumPosition parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.photos.library.v1.proto.AlbumPosition 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.AlbumPosition 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.AlbumPosition 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.AlbumPosition 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.AlbumPosition 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.AlbumPosition 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.AlbumPosition 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.AlbumPosition 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;
}
/**
*
*
*
* Specifies a position in an album.
*
*
* Protobuf type {@code google.photos.library.v1.AlbumPosition}
*/
public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.photos.library.v1.AlbumPosition)
com.google.photos.library.v1.proto.AlbumPositionOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.photos.library.v1.proto.LibraryServiceProto
.internal_static_google_photos_library_v1_AlbumPosition_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_AlbumPosition_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.photos.library.v1.proto.AlbumPosition.class,
com.google.photos.library.v1.proto.AlbumPosition.Builder.class);
}
// Construct using com.google.photos.library.v1.proto.AlbumPosition.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();
position_ = 0;
relativeItemCase_ = 0;
relativeItem_ = 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_AlbumPosition_descriptor;
}
@java.lang.Override
public com.google.photos.library.v1.proto.AlbumPosition getDefaultInstanceForType() {
return com.google.photos.library.v1.proto.AlbumPosition.getDefaultInstance();
}
@java.lang.Override
public com.google.photos.library.v1.proto.AlbumPosition build() {
com.google.photos.library.v1.proto.AlbumPosition result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.photos.library.v1.proto.AlbumPosition buildPartial() {
com.google.photos.library.v1.proto.AlbumPosition result =
new com.google.photos.library.v1.proto.AlbumPosition(this);
result.position_ = position_;
if (relativeItemCase_ == 2) {
result.relativeItem_ = relativeItem_;
}
if (relativeItemCase_ == 3) {
result.relativeItem_ = relativeItem_;
}
result.relativeItemCase_ = relativeItemCase_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.photos.library.v1.proto.AlbumPosition) {
return mergeFrom((com.google.photos.library.v1.proto.AlbumPosition) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.photos.library.v1.proto.AlbumPosition other) {
if (other == com.google.photos.library.v1.proto.AlbumPosition.getDefaultInstance())
return this;
if (other.position_ != 0) {
setPositionValue(other.getPositionValue());
}
switch (other.getRelativeItemCase()) {
case RELATIVE_MEDIA_ITEM_ID:
{
relativeItemCase_ = 2;
relativeItem_ = other.relativeItem_;
onChanged();
break;
}
case RELATIVE_ENRICHMENT_ITEM_ID:
{
relativeItemCase_ = 3;
relativeItem_ = other.relativeItem_;
onChanged();
break;
}
case RELATIVEITEM_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.AlbumPosition parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.google.photos.library.v1.proto.AlbumPosition) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int relativeItemCase_ = 0;
private java.lang.Object relativeItem_;
public RelativeItemCase getRelativeItemCase() {
return RelativeItemCase.forNumber(relativeItemCase_);
}
public Builder clearRelativeItem() {
relativeItemCase_ = 0;
relativeItem_ = null;
onChanged();
return this;
}
private int position_ = 0;
/**
*
*
*
* Type of position, for a media or enrichment item.
*
*
* .google.photos.library.v1.AlbumPosition.PositionType position = 1;
*/
public int getPositionValue() {
return position_;
}
/**
*
*
*
* Type of position, for a media or enrichment item.
*
*
* .google.photos.library.v1.AlbumPosition.PositionType position = 1;
*/
public Builder setPositionValue(int value) {
position_ = value;
onChanged();
return this;
}
/**
*
*
*
* Type of position, for a media or enrichment item.
*
*
* .google.photos.library.v1.AlbumPosition.PositionType position = 1;
*/
public com.google.photos.library.v1.proto.AlbumPosition.PositionType getPosition() {
@SuppressWarnings("deprecation")
com.google.photos.library.v1.proto.AlbumPosition.PositionType result =
com.google.photos.library.v1.proto.AlbumPosition.PositionType.valueOf(position_);
return result == null
? com.google.photos.library.v1.proto.AlbumPosition.PositionType.UNRECOGNIZED
: result;
}
/**
*
*
*
* Type of position, for a media or enrichment item.
*
*
* .google.photos.library.v1.AlbumPosition.PositionType position = 1;
*/
public Builder setPosition(
com.google.photos.library.v1.proto.AlbumPosition.PositionType value) {
if (value == null) {
throw new NullPointerException();
}
position_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
*
* Type of position, for a media or enrichment item.
*
*
* .google.photos.library.v1.AlbumPosition.PositionType position = 1;
*/
public Builder clearPosition() {
position_ = 0;
onChanged();
return this;
}
/**
*
*
*
* The media item to which the position is relative to.
* Only used when position type is AFTER_MEDIA_ITEM.
*
*
* string relative_media_item_id = 2;
*/
public java.lang.String getRelativeMediaItemId() {
java.lang.Object ref = "";
if (relativeItemCase_ == 2) {
ref = relativeItem_;
}
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (relativeItemCase_ == 2) {
relativeItem_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* The media item to which the position is relative to.
* Only used when position type is AFTER_MEDIA_ITEM.
*
*
* string relative_media_item_id = 2;
*/
public com.google.protobuf.ByteString getRelativeMediaItemIdBytes() {
java.lang.Object ref = "";
if (relativeItemCase_ == 2) {
ref = relativeItem_;
}
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
if (relativeItemCase_ == 2) {
relativeItem_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* The media item to which the position is relative to.
* Only used when position type is AFTER_MEDIA_ITEM.
*
*
* string relative_media_item_id = 2;
*/
public Builder setRelativeMediaItemId(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
relativeItemCase_ = 2;
relativeItem_ = value;
onChanged();
return this;
}
/**
*
*
*
* The media item to which the position is relative to.
* Only used when position type is AFTER_MEDIA_ITEM.
*
*
* string relative_media_item_id = 2;
*/
public Builder clearRelativeMediaItemId() {
if (relativeItemCase_ == 2) {
relativeItemCase_ = 0;
relativeItem_ = null;
onChanged();
}
return this;
}
/**
*
*
*
* The media item to which the position is relative to.
* Only used when position type is AFTER_MEDIA_ITEM.
*
*
* string relative_media_item_id = 2;
*/
public Builder setRelativeMediaItemIdBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
relativeItemCase_ = 2;
relativeItem_ = value;
onChanged();
return this;
}
/**
*
*
*
* The enrichment item to which the position is relative to.
* Only used when position type is AFTER_ENRICHMENT_ITEM.
*
*
* string relative_enrichment_item_id = 3;
*/
public java.lang.String getRelativeEnrichmentItemId() {
java.lang.Object ref = "";
if (relativeItemCase_ == 3) {
ref = relativeItem_;
}
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (relativeItemCase_ == 3) {
relativeItem_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* The enrichment item to which the position is relative to.
* Only used when position type is AFTER_ENRICHMENT_ITEM.
*
*
* string relative_enrichment_item_id = 3;
*/
public com.google.protobuf.ByteString getRelativeEnrichmentItemIdBytes() {
java.lang.Object ref = "";
if (relativeItemCase_ == 3) {
ref = relativeItem_;
}
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
if (relativeItemCase_ == 3) {
relativeItem_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* The enrichment item to which the position is relative to.
* Only used when position type is AFTER_ENRICHMENT_ITEM.
*
*
* string relative_enrichment_item_id = 3;
*/
public Builder setRelativeEnrichmentItemId(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
relativeItemCase_ = 3;
relativeItem_ = value;
onChanged();
return this;
}
/**
*
*
*
* The enrichment item to which the position is relative to.
* Only used when position type is AFTER_ENRICHMENT_ITEM.
*
*
* string relative_enrichment_item_id = 3;
*/
public Builder clearRelativeEnrichmentItemId() {
if (relativeItemCase_ == 3) {
relativeItemCase_ = 0;
relativeItem_ = null;
onChanged();
}
return this;
}
/**
*
*
*
* The enrichment item to which the position is relative to.
* Only used when position type is AFTER_ENRICHMENT_ITEM.
*
*
* string relative_enrichment_item_id = 3;
*/
public Builder setRelativeEnrichmentItemIdBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
relativeItemCase_ = 3;
relativeItem_ = value;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(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.AlbumPosition)
}
// @@protoc_insertion_point(class_scope:google.photos.library.v1.AlbumPosition)
private static final com.google.photos.library.v1.proto.AlbumPosition DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.photos.library.v1.proto.AlbumPosition();
}
public static com.google.photos.library.v1.proto.AlbumPosition getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public AlbumPosition parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new AlbumPosition(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.AlbumPosition getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}