com.passkit.grpc.Links Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sdk Show documentation
Show all versions of sdk Show documentation
SDK for the PassKit gRPC API that can be used to create, configure and manage Membership, Loyalty, Event Ticket, Coupon, Transit and Boarding Pass content for mobile wallet applications, including Apple Pay and Google Pay.
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: io/common/links.proto
package com.passkit.grpc;
public final class Links {
private Links() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistryLite registry) {
}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
registerAllExtensions(
(com.google.protobuf.ExtensionRegistryLite) registry);
}
/**
*
* Used to specify the type of link for link field. Each type has different icon on Google Pay.
*
*
* Protobuf enum {@code io.LinkType}
*/
public enum LinkType
implements com.google.protobuf.ProtocolMessageEnum {
/**
*
* A link to website.
*
*
* URI_DO_NOT_USE = 0;
*/
URI_DO_NOT_USE(0),
/**
*
* A link to website.
*
*
* URI_WEB = 1;
*/
URI_WEB(1),
/**
*
* A phone number.
*
*
* URI_TEL = 2;
*/
URI_TEL(2),
/**
*
* An email address.
*
*
* URI_EMAIL = 3;
*/
URI_EMAIL(3),
/**
*
* A location address.
*
*
* URI_LOCATION = 4;
*/
URI_LOCATION(4),
/**
*
* A calendar event.
*
*
* URI_CALENDAR = 5;
*/
URI_CALENDAR(5),
UNRECOGNIZED(-1),
;
/**
*
* A link to website.
*
*
* URI_DO_NOT_USE = 0;
*/
public static final int URI_DO_NOT_USE_VALUE = 0;
/**
*
* A link to website.
*
*
* URI_WEB = 1;
*/
public static final int URI_WEB_VALUE = 1;
/**
*
* A phone number.
*
*
* URI_TEL = 2;
*/
public static final int URI_TEL_VALUE = 2;
/**
*
* An email address.
*
*
* URI_EMAIL = 3;
*/
public static final int URI_EMAIL_VALUE = 3;
/**
*
* A location address.
*
*
* URI_LOCATION = 4;
*/
public static final int URI_LOCATION_VALUE = 4;
/**
*
* A calendar event.
*
*
* URI_CALENDAR = 5;
*/
public static final int URI_CALENDAR_VALUE = 5;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static LinkType valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static LinkType forNumber(int value) {
switch (value) {
case 0: return URI_DO_NOT_USE;
case 1: return URI_WEB;
case 2: return URI_TEL;
case 3: return URI_EMAIL;
case 4: return URI_LOCATION;
case 5: return URI_CALENDAR;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
LinkType> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public LinkType findValueByNumber(int number) {
return LinkType.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
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.passkit.grpc.Links.getDescriptor().getEnumTypes().get(0);
}
private static final LinkType[] VALUES = values();
public static LinkType 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 LinkType(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:io.LinkType)
}
public interface LinkOrBuilder extends
// @@protoc_insertion_point(interface_extends:io.Link)
com.google.protobuf.MessageOrBuilder {
/**
*
* Link Id. Not writable.
*
*
* string id = 1;
* @return The id.
*/
java.lang.String getId();
/**
*
* Link Id. Not writable.
*
*
* string id = 1;
* @return The bytes for id.
*/
com.google.protobuf.ByteString
getIdBytes();
/**
*
* A link text.
*
*
* string url = 2;
* @return The url.
*/
java.lang.String getUrl();
/**
*
* A link text.
*
*
* string url = 2;
* @return The bytes for url.
*/
com.google.protobuf.ByteString
getUrlBytes();
/**
*
* Title for the link.
*
*
* string title = 3;
* @return The title.
*/
java.lang.String getTitle();
/**
*
* Title for the link.
*
*
* string title = 3;
* @return The bytes for title.
*/
com.google.protobuf.ByteString
getTitleBytes();
/**
*
* Type of link data.
*
*
* .io.LinkType type = 4;
* @return The enum numeric value on the wire for type.
*/
int getTypeValue();
/**
*
* Type of link data.
*
*
* .io.LinkType type = 4;
* @return The type.
*/
com.passkit.grpc.Links.LinkType getType();
/**
*
* This customises link text for different languages. Ignored by Google Pay passes.
*
*
* .io.LocalizedString localizedLink = 5;
* @return Whether the localizedLink field is set.
*/
boolean hasLocalizedLink();
/**
*
* This customises link text for different languages. Ignored by Google Pay passes.
*
*
* .io.LocalizedString localizedLink = 5;
* @return The localizedLink.
*/
com.passkit.grpc.Localization.LocalizedString getLocalizedLink();
/**
*
* This customises link text for different languages. Ignored by Google Pay passes.
*
*
* .io.LocalizedString localizedLink = 5;
*/
com.passkit.grpc.Localization.LocalizedStringOrBuilder getLocalizedLinkOrBuilder();
/**
*
* This translates link title in different languages.
*
*
* .io.LocalizedString localizedTitle = 6;
* @return Whether the localizedTitle field is set.
*/
boolean hasLocalizedTitle();
/**
*
* This translates link title in different languages.
*
*
* .io.LocalizedString localizedTitle = 6;
* @return The localizedTitle.
*/
com.passkit.grpc.Localization.LocalizedString getLocalizedTitle();
/**
*
* This translates link title in different languages.
*
*
* .io.LocalizedString localizedTitle = 6;
*/
com.passkit.grpc.Localization.LocalizedStringOrBuilder getLocalizedTitleOrBuilder();
/**
*
* Indicates which wallets the link should be rendered for (this allows to hide certain link on Apple Wallet, and vise versa).
*
*
* repeated .io.UsageType usage = 7;
* @return A list containing the usage.
*/
java.util.List getUsageList();
/**
*
* Indicates which wallets the link should be rendered for (this allows to hide certain link on Apple Wallet, and vise versa).
*
*
* repeated .io.UsageType usage = 7;
* @return The count of usage.
*/
int getUsageCount();
/**
*
* Indicates which wallets the link should be rendered for (this allows to hide certain link on Apple Wallet, and vise versa).
*
*
* repeated .io.UsageType usage = 7;
* @param index The index of the element to return.
* @return The usage at the given index.
*/
com.passkit.grpc.CommonObjects.UsageType getUsage(int index);
/**
*
* Indicates which wallets the link should be rendered for (this allows to hide certain link on Apple Wallet, and vise versa).
*
*
* repeated .io.UsageType usage = 7;
* @return A list containing the enum numeric values on the wire for usage.
*/
java.util.List
getUsageValueList();
/**
*
* Indicates which wallets the link should be rendered for (this allows to hide certain link on Apple Wallet, and vise versa).
*
*
* repeated .io.UsageType usage = 7;
* @param index The index of the value to return.
* @return The enum numeric value on the wire of usage at the given index.
*/
int getUsageValue(int index);
/**
*
* Links will be rendered in order of their position, from lowest to highest. Position can be any value, E.g. 3 links with positions 30, 10, 20 would render 10 first, 20 second and 30 third. If no position is provided, the order of the links cannot be guaranteed.
*
*
* uint32 position = 8;
* @return The position.
*/
int getPosition();
}
/**
*
* Used to specify links put on the back of the pass.
*
*
* Protobuf type {@code io.Link}
*/
public static final class Link extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:io.Link)
LinkOrBuilder {
private static final long serialVersionUID = 0L;
// Use Link.newBuilder() to construct.
private Link(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Link() {
id_ = "";
url_ = "";
title_ = "";
type_ = 0;
usage_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Link();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Link(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
id_ = s;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
url_ = s;
break;
}
case 26: {
java.lang.String s = input.readStringRequireUtf8();
title_ = s;
break;
}
case 32: {
int rawValue = input.readEnum();
type_ = rawValue;
break;
}
case 42: {
com.passkit.grpc.Localization.LocalizedString.Builder subBuilder = null;
if (localizedLink_ != null) {
subBuilder = localizedLink_.toBuilder();
}
localizedLink_ = input.readMessage(com.passkit.grpc.Localization.LocalizedString.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(localizedLink_);
localizedLink_ = subBuilder.buildPartial();
}
break;
}
case 50: {
com.passkit.grpc.Localization.LocalizedString.Builder subBuilder = null;
if (localizedTitle_ != null) {
subBuilder = localizedTitle_.toBuilder();
}
localizedTitle_ = input.readMessage(com.passkit.grpc.Localization.LocalizedString.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(localizedTitle_);
localizedTitle_ = subBuilder.buildPartial();
}
break;
}
case 56: {
int rawValue = input.readEnum();
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
usage_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
usage_.add(rawValue);
break;
}
case 58: {
int length = input.readRawVarint32();
int oldLimit = input.pushLimit(length);
while(input.getBytesUntilLimit() > 0) {
int rawValue = input.readEnum();
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
usage_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
usage_.add(rawValue);
}
input.popLimit(oldLimit);
break;
}
case 64: {
position_ = input.readUInt32();
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 {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
usage_ = java.util.Collections.unmodifiableList(usage_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.passkit.grpc.Links.internal_static_io_Link_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.passkit.grpc.Links.internal_static_io_Link_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.passkit.grpc.Links.Link.class, com.passkit.grpc.Links.Link.Builder.class);
}
public static final int ID_FIELD_NUMBER = 1;
private volatile java.lang.Object id_;
/**
*
* Link Id. Not writable.
*
*
* string id = 1;
* @return The id.
*/
@java.lang.Override
public java.lang.String getId() {
java.lang.Object ref = id_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
id_ = s;
return s;
}
}
/**
*
* Link Id. Not writable.
*
*
* string id = 1;
* @return The bytes for id.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getIdBytes() {
java.lang.Object ref = id_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
id_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int URL_FIELD_NUMBER = 2;
private volatile java.lang.Object url_;
/**
*
* A link text.
*
*
* string url = 2;
* @return The url.
*/
@java.lang.Override
public java.lang.String getUrl() {
java.lang.Object ref = url_;
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();
url_ = s;
return s;
}
}
/**
*
* A link text.
*
*
* string url = 2;
* @return The bytes for url.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getUrlBytes() {
java.lang.Object ref = url_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
url_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int TITLE_FIELD_NUMBER = 3;
private volatile java.lang.Object title_;
/**
*
* Title for the link.
*
*
* string title = 3;
* @return The title.
*/
@java.lang.Override
public java.lang.String getTitle() {
java.lang.Object ref = title_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
title_ = s;
return s;
}
}
/**
*
* Title for the link.
*
*
* string title = 3;
* @return The bytes for title.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getTitleBytes() {
java.lang.Object ref = title_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
title_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int TYPE_FIELD_NUMBER = 4;
private int type_;
/**
*
* Type of link data.
*
*
* .io.LinkType type = 4;
* @return The enum numeric value on the wire for type.
*/
@java.lang.Override public int getTypeValue() {
return type_;
}
/**
*
* Type of link data.
*
*
* .io.LinkType type = 4;
* @return The type.
*/
@java.lang.Override public com.passkit.grpc.Links.LinkType getType() {
@SuppressWarnings("deprecation")
com.passkit.grpc.Links.LinkType result = com.passkit.grpc.Links.LinkType.valueOf(type_);
return result == null ? com.passkit.grpc.Links.LinkType.UNRECOGNIZED : result;
}
public static final int LOCALIZEDLINK_FIELD_NUMBER = 5;
private com.passkit.grpc.Localization.LocalizedString localizedLink_;
/**
*
* This customises link text for different languages. Ignored by Google Pay passes.
*
*
* .io.LocalizedString localizedLink = 5;
* @return Whether the localizedLink field is set.
*/
@java.lang.Override
public boolean hasLocalizedLink() {
return localizedLink_ != null;
}
/**
*
* This customises link text for different languages. Ignored by Google Pay passes.
*
*
* .io.LocalizedString localizedLink = 5;
* @return The localizedLink.
*/
@java.lang.Override
public com.passkit.grpc.Localization.LocalizedString getLocalizedLink() {
return localizedLink_ == null ? com.passkit.grpc.Localization.LocalizedString.getDefaultInstance() : localizedLink_;
}
/**
*
* This customises link text for different languages. Ignored by Google Pay passes.
*
*
* .io.LocalizedString localizedLink = 5;
*/
@java.lang.Override
public com.passkit.grpc.Localization.LocalizedStringOrBuilder getLocalizedLinkOrBuilder() {
return getLocalizedLink();
}
public static final int LOCALIZEDTITLE_FIELD_NUMBER = 6;
private com.passkit.grpc.Localization.LocalizedString localizedTitle_;
/**
*
* This translates link title in different languages.
*
*
* .io.LocalizedString localizedTitle = 6;
* @return Whether the localizedTitle field is set.
*/
@java.lang.Override
public boolean hasLocalizedTitle() {
return localizedTitle_ != null;
}
/**
*
* This translates link title in different languages.
*
*
* .io.LocalizedString localizedTitle = 6;
* @return The localizedTitle.
*/
@java.lang.Override
public com.passkit.grpc.Localization.LocalizedString getLocalizedTitle() {
return localizedTitle_ == null ? com.passkit.grpc.Localization.LocalizedString.getDefaultInstance() : localizedTitle_;
}
/**
*
* This translates link title in different languages.
*
*
* .io.LocalizedString localizedTitle = 6;
*/
@java.lang.Override
public com.passkit.grpc.Localization.LocalizedStringOrBuilder getLocalizedTitleOrBuilder() {
return getLocalizedTitle();
}
public static final int USAGE_FIELD_NUMBER = 7;
private java.util.List usage_;
private static final com.google.protobuf.Internal.ListAdapter.Converter<
java.lang.Integer, com.passkit.grpc.CommonObjects.UsageType> usage_converter_ =
new com.google.protobuf.Internal.ListAdapter.Converter<
java.lang.Integer, com.passkit.grpc.CommonObjects.UsageType>() {
public com.passkit.grpc.CommonObjects.UsageType convert(java.lang.Integer from) {
@SuppressWarnings("deprecation")
com.passkit.grpc.CommonObjects.UsageType result = com.passkit.grpc.CommonObjects.UsageType.valueOf(from);
return result == null ? com.passkit.grpc.CommonObjects.UsageType.UNRECOGNIZED : result;
}
};
/**
*
* Indicates which wallets the link should be rendered for (this allows to hide certain link on Apple Wallet, and vise versa).
*
*
* repeated .io.UsageType usage = 7;
* @return A list containing the usage.
*/
@java.lang.Override
public java.util.List getUsageList() {
return new com.google.protobuf.Internal.ListAdapter<
java.lang.Integer, com.passkit.grpc.CommonObjects.UsageType>(usage_, usage_converter_);
}
/**
*
* Indicates which wallets the link should be rendered for (this allows to hide certain link on Apple Wallet, and vise versa).
*
*
* repeated .io.UsageType usage = 7;
* @return The count of usage.
*/
@java.lang.Override
public int getUsageCount() {
return usage_.size();
}
/**
*
* Indicates which wallets the link should be rendered for (this allows to hide certain link on Apple Wallet, and vise versa).
*
*
* repeated .io.UsageType usage = 7;
* @param index The index of the element to return.
* @return The usage at the given index.
*/
@java.lang.Override
public com.passkit.grpc.CommonObjects.UsageType getUsage(int index) {
return usage_converter_.convert(usage_.get(index));
}
/**
*
* Indicates which wallets the link should be rendered for (this allows to hide certain link on Apple Wallet, and vise versa).
*
*
* repeated .io.UsageType usage = 7;
* @return A list containing the enum numeric values on the wire for usage.
*/
@java.lang.Override
public java.util.List
getUsageValueList() {
return usage_;
}
/**
*
* Indicates which wallets the link should be rendered for (this allows to hide certain link on Apple Wallet, and vise versa).
*
*
* repeated .io.UsageType usage = 7;
* @param index The index of the value to return.
* @return The enum numeric value on the wire of usage at the given index.
*/
@java.lang.Override
public int getUsageValue(int index) {
return usage_.get(index);
}
private int usageMemoizedSerializedSize;
public static final int POSITION_FIELD_NUMBER = 8;
private int position_;
/**
*
* Links will be rendered in order of their position, from lowest to highest. Position can be any value, E.g. 3 links with positions 30, 10, 20 would render 10 first, 20 second and 30 third. If no position is provided, the order of the links cannot be guaranteed.
*
*
* uint32 position = 8;
* @return The position.
*/
@java.lang.Override
public int getPosition() {
return position_;
}
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 {
getSerializedSize();
if (!getIdBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_);
}
if (!getUrlBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, url_);
}
if (!getTitleBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, title_);
}
if (type_ != com.passkit.grpc.Links.LinkType.URI_DO_NOT_USE.getNumber()) {
output.writeEnum(4, type_);
}
if (localizedLink_ != null) {
output.writeMessage(5, getLocalizedLink());
}
if (localizedTitle_ != null) {
output.writeMessage(6, getLocalizedTitle());
}
if (getUsageList().size() > 0) {
output.writeUInt32NoTag(58);
output.writeUInt32NoTag(usageMemoizedSerializedSize);
}
for (int i = 0; i < usage_.size(); i++) {
output.writeEnumNoTag(usage_.get(i));
}
if (position_ != 0) {
output.writeUInt32(8, position_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getIdBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_);
}
if (!getUrlBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, url_);
}
if (!getTitleBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, title_);
}
if (type_ != com.passkit.grpc.Links.LinkType.URI_DO_NOT_USE.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(4, type_);
}
if (localizedLink_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, getLocalizedLink());
}
if (localizedTitle_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(6, getLocalizedTitle());
}
{
int dataSize = 0;
for (int i = 0; i < usage_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeEnumSizeNoTag(usage_.get(i));
}
size += dataSize;
if (!getUsageList().isEmpty()) { size += 1;
size += com.google.protobuf.CodedOutputStream
.computeUInt32SizeNoTag(dataSize);
}usageMemoizedSerializedSize = dataSize;
}
if (position_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeUInt32Size(8, position_);
}
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.passkit.grpc.Links.Link)) {
return super.equals(obj);
}
com.passkit.grpc.Links.Link other = (com.passkit.grpc.Links.Link) obj;
if (!getId()
.equals(other.getId())) return false;
if (!getUrl()
.equals(other.getUrl())) return false;
if (!getTitle()
.equals(other.getTitle())) return false;
if (type_ != other.type_) return false;
if (hasLocalizedLink() != other.hasLocalizedLink()) return false;
if (hasLocalizedLink()) {
if (!getLocalizedLink()
.equals(other.getLocalizedLink())) return false;
}
if (hasLocalizedTitle() != other.hasLocalizedTitle()) return false;
if (hasLocalizedTitle()) {
if (!getLocalizedTitle()
.equals(other.getLocalizedTitle())) return false;
}
if (!usage_.equals(other.usage_)) return false;
if (getPosition()
!= other.getPosition()) return false;
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) + ID_FIELD_NUMBER;
hash = (53 * hash) + getId().hashCode();
hash = (37 * hash) + URL_FIELD_NUMBER;
hash = (53 * hash) + getUrl().hashCode();
hash = (37 * hash) + TITLE_FIELD_NUMBER;
hash = (53 * hash) + getTitle().hashCode();
hash = (37 * hash) + TYPE_FIELD_NUMBER;
hash = (53 * hash) + type_;
if (hasLocalizedLink()) {
hash = (37 * hash) + LOCALIZEDLINK_FIELD_NUMBER;
hash = (53 * hash) + getLocalizedLink().hashCode();
}
if (hasLocalizedTitle()) {
hash = (37 * hash) + LOCALIZEDTITLE_FIELD_NUMBER;
hash = (53 * hash) + getLocalizedTitle().hashCode();
}
if (getUsageCount() > 0) {
hash = (37 * hash) + USAGE_FIELD_NUMBER;
hash = (53 * hash) + usage_.hashCode();
}
hash = (37 * hash) + POSITION_FIELD_NUMBER;
hash = (53 * hash) + getPosition();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.passkit.grpc.Links.Link parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.passkit.grpc.Links.Link parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.passkit.grpc.Links.Link parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.passkit.grpc.Links.Link parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.passkit.grpc.Links.Link parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.passkit.grpc.Links.Link parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.passkit.grpc.Links.Link parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.passkit.grpc.Links.Link 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.passkit.grpc.Links.Link parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.passkit.grpc.Links.Link 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.passkit.grpc.Links.Link parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.passkit.grpc.Links.Link 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.passkit.grpc.Links.Link 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;
}
/**
*
* Used to specify links put on the back of the pass.
*
*
* Protobuf type {@code io.Link}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:io.Link)
com.passkit.grpc.Links.LinkOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.passkit.grpc.Links.internal_static_io_Link_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.passkit.grpc.Links.internal_static_io_Link_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.passkit.grpc.Links.Link.class, com.passkit.grpc.Links.Link.Builder.class);
}
// Construct using com.passkit.grpc.Links.Link.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
id_ = "";
url_ = "";
title_ = "";
type_ = 0;
if (localizedLinkBuilder_ == null) {
localizedLink_ = null;
} else {
localizedLink_ = null;
localizedLinkBuilder_ = null;
}
if (localizedTitleBuilder_ == null) {
localizedTitle_ = null;
} else {
localizedTitle_ = null;
localizedTitleBuilder_ = null;
}
usage_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
position_ = 0;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.passkit.grpc.Links.internal_static_io_Link_descriptor;
}
@java.lang.Override
public com.passkit.grpc.Links.Link getDefaultInstanceForType() {
return com.passkit.grpc.Links.Link.getDefaultInstance();
}
@java.lang.Override
public com.passkit.grpc.Links.Link build() {
com.passkit.grpc.Links.Link result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.passkit.grpc.Links.Link buildPartial() {
com.passkit.grpc.Links.Link result = new com.passkit.grpc.Links.Link(this);
int from_bitField0_ = bitField0_;
result.id_ = id_;
result.url_ = url_;
result.title_ = title_;
result.type_ = type_;
if (localizedLinkBuilder_ == null) {
result.localizedLink_ = localizedLink_;
} else {
result.localizedLink_ = localizedLinkBuilder_.build();
}
if (localizedTitleBuilder_ == null) {
result.localizedTitle_ = localizedTitle_;
} else {
result.localizedTitle_ = localizedTitleBuilder_.build();
}
if (((bitField0_ & 0x00000001) != 0)) {
usage_ = java.util.Collections.unmodifiableList(usage_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.usage_ = usage_;
result.position_ = position_;
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.passkit.grpc.Links.Link) {
return mergeFrom((com.passkit.grpc.Links.Link)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.passkit.grpc.Links.Link other) {
if (other == com.passkit.grpc.Links.Link.getDefaultInstance()) return this;
if (!other.getId().isEmpty()) {
id_ = other.id_;
onChanged();
}
if (!other.getUrl().isEmpty()) {
url_ = other.url_;
onChanged();
}
if (!other.getTitle().isEmpty()) {
title_ = other.title_;
onChanged();
}
if (other.type_ != 0) {
setTypeValue(other.getTypeValue());
}
if (other.hasLocalizedLink()) {
mergeLocalizedLink(other.getLocalizedLink());
}
if (other.hasLocalizedTitle()) {
mergeLocalizedTitle(other.getLocalizedTitle());
}
if (!other.usage_.isEmpty()) {
if (usage_.isEmpty()) {
usage_ = other.usage_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureUsageIsMutable();
usage_.addAll(other.usage_);
}
onChanged();
}
if (other.getPosition() != 0) {
setPosition(other.getPosition());
}
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.passkit.grpc.Links.Link parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.passkit.grpc.Links.Link) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object id_ = "";
/**
*
* Link Id. Not writable.
*
*
* string id = 1;
* @return The id.
*/
public java.lang.String getId() {
java.lang.Object ref = id_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
id_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Link Id. Not writable.
*
*
* string id = 1;
* @return The bytes for id.
*/
public com.google.protobuf.ByteString
getIdBytes() {
java.lang.Object ref = id_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
id_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Link Id. Not writable.
*
*
* string id = 1;
* @param value The id to set.
* @return This builder for chaining.
*/
public Builder setId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
id_ = value;
onChanged();
return this;
}
/**
*
* Link Id. Not writable.
*
*
* string id = 1;
* @return This builder for chaining.
*/
public Builder clearId() {
id_ = getDefaultInstance().getId();
onChanged();
return this;
}
/**
*
* Link Id. Not writable.
*
*
* string id = 1;
* @param value The bytes for id to set.
* @return This builder for chaining.
*/
public Builder setIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
id_ = value;
onChanged();
return this;
}
private java.lang.Object url_ = "";
/**
*
* A link text.
*
*
* string url = 2;
* @return The url.
*/
public java.lang.String getUrl() {
java.lang.Object ref = url_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
url_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* A link text.
*
*
* string url = 2;
* @return The bytes for url.
*/
public com.google.protobuf.ByteString
getUrlBytes() {
java.lang.Object ref = url_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
url_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* A link text.
*
*
* string url = 2;
* @param value The url to set.
* @return This builder for chaining.
*/
public Builder setUrl(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
url_ = value;
onChanged();
return this;
}
/**
*
* A link text.
*
*
* string url = 2;
* @return This builder for chaining.
*/
public Builder clearUrl() {
url_ = getDefaultInstance().getUrl();
onChanged();
return this;
}
/**
*
* A link text.
*
*
* string url = 2;
* @param value The bytes for url to set.
* @return This builder for chaining.
*/
public Builder setUrlBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
url_ = value;
onChanged();
return this;
}
private java.lang.Object title_ = "";
/**
*
* Title for the link.
*
*
* string title = 3;
* @return The title.
*/
public java.lang.String getTitle() {
java.lang.Object ref = title_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
title_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Title for the link.
*
*
* string title = 3;
* @return The bytes for title.
*/
public com.google.protobuf.ByteString
getTitleBytes() {
java.lang.Object ref = title_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
title_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Title for the link.
*
*
* string title = 3;
* @param value The title to set.
* @return This builder for chaining.
*/
public Builder setTitle(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
title_ = value;
onChanged();
return this;
}
/**
*
* Title for the link.
*
*
* string title = 3;
* @return This builder for chaining.
*/
public Builder clearTitle() {
title_ = getDefaultInstance().getTitle();
onChanged();
return this;
}
/**
*
* Title for the link.
*
*
* string title = 3;
* @param value The bytes for title to set.
* @return This builder for chaining.
*/
public Builder setTitleBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
title_ = value;
onChanged();
return this;
}
private int type_ = 0;
/**
*
* Type of link data.
*
*
* .io.LinkType type = 4;
* @return The enum numeric value on the wire for type.
*/
@java.lang.Override public int getTypeValue() {
return type_;
}
/**
*
* Type of link data.
*
*
* .io.LinkType type = 4;
* @param value The enum numeric value on the wire for type to set.
* @return This builder for chaining.
*/
public Builder setTypeValue(int value) {
type_ = value;
onChanged();
return this;
}
/**
*
* Type of link data.
*
*
* .io.LinkType type = 4;
* @return The type.
*/
@java.lang.Override
public com.passkit.grpc.Links.LinkType getType() {
@SuppressWarnings("deprecation")
com.passkit.grpc.Links.LinkType result = com.passkit.grpc.Links.LinkType.valueOf(type_);
return result == null ? com.passkit.grpc.Links.LinkType.UNRECOGNIZED : result;
}
/**
*
* Type of link data.
*
*
* .io.LinkType type = 4;
* @param value The type to set.
* @return This builder for chaining.
*/
public Builder setType(com.passkit.grpc.Links.LinkType value) {
if (value == null) {
throw new NullPointerException();
}
type_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Type of link data.
*
*
* .io.LinkType type = 4;
* @return This builder for chaining.
*/
public Builder clearType() {
type_ = 0;
onChanged();
return this;
}
private com.passkit.grpc.Localization.LocalizedString localizedLink_;
private com.google.protobuf.SingleFieldBuilderV3<
com.passkit.grpc.Localization.LocalizedString, com.passkit.grpc.Localization.LocalizedString.Builder, com.passkit.grpc.Localization.LocalizedStringOrBuilder> localizedLinkBuilder_;
/**
*
* This customises link text for different languages. Ignored by Google Pay passes.
*
*
* .io.LocalizedString localizedLink = 5;
* @return Whether the localizedLink field is set.
*/
public boolean hasLocalizedLink() {
return localizedLinkBuilder_ != null || localizedLink_ != null;
}
/**
*
* This customises link text for different languages. Ignored by Google Pay passes.
*
*
* .io.LocalizedString localizedLink = 5;
* @return The localizedLink.
*/
public com.passkit.grpc.Localization.LocalizedString getLocalizedLink() {
if (localizedLinkBuilder_ == null) {
return localizedLink_ == null ? com.passkit.grpc.Localization.LocalizedString.getDefaultInstance() : localizedLink_;
} else {
return localizedLinkBuilder_.getMessage();
}
}
/**
*
* This customises link text for different languages. Ignored by Google Pay passes.
*
*
* .io.LocalizedString localizedLink = 5;
*/
public Builder setLocalizedLink(com.passkit.grpc.Localization.LocalizedString value) {
if (localizedLinkBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
localizedLink_ = value;
onChanged();
} else {
localizedLinkBuilder_.setMessage(value);
}
return this;
}
/**
*
* This customises link text for different languages. Ignored by Google Pay passes.
*
*
* .io.LocalizedString localizedLink = 5;
*/
public Builder setLocalizedLink(
com.passkit.grpc.Localization.LocalizedString.Builder builderForValue) {
if (localizedLinkBuilder_ == null) {
localizedLink_ = builderForValue.build();
onChanged();
} else {
localizedLinkBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* This customises link text for different languages. Ignored by Google Pay passes.
*
*
* .io.LocalizedString localizedLink = 5;
*/
public Builder mergeLocalizedLink(com.passkit.grpc.Localization.LocalizedString value) {
if (localizedLinkBuilder_ == null) {
if (localizedLink_ != null) {
localizedLink_ =
com.passkit.grpc.Localization.LocalizedString.newBuilder(localizedLink_).mergeFrom(value).buildPartial();
} else {
localizedLink_ = value;
}
onChanged();
} else {
localizedLinkBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* This customises link text for different languages. Ignored by Google Pay passes.
*
*
* .io.LocalizedString localizedLink = 5;
*/
public Builder clearLocalizedLink() {
if (localizedLinkBuilder_ == null) {
localizedLink_ = null;
onChanged();
} else {
localizedLink_ = null;
localizedLinkBuilder_ = null;
}
return this;
}
/**
*
* This customises link text for different languages. Ignored by Google Pay passes.
*
*
* .io.LocalizedString localizedLink = 5;
*/
public com.passkit.grpc.Localization.LocalizedString.Builder getLocalizedLinkBuilder() {
onChanged();
return getLocalizedLinkFieldBuilder().getBuilder();
}
/**
*
* This customises link text for different languages. Ignored by Google Pay passes.
*
*
* .io.LocalizedString localizedLink = 5;
*/
public com.passkit.grpc.Localization.LocalizedStringOrBuilder getLocalizedLinkOrBuilder() {
if (localizedLinkBuilder_ != null) {
return localizedLinkBuilder_.getMessageOrBuilder();
} else {
return localizedLink_ == null ?
com.passkit.grpc.Localization.LocalizedString.getDefaultInstance() : localizedLink_;
}
}
/**
*
* This customises link text for different languages. Ignored by Google Pay passes.
*
*
* .io.LocalizedString localizedLink = 5;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.passkit.grpc.Localization.LocalizedString, com.passkit.grpc.Localization.LocalizedString.Builder, com.passkit.grpc.Localization.LocalizedStringOrBuilder>
getLocalizedLinkFieldBuilder() {
if (localizedLinkBuilder_ == null) {
localizedLinkBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.passkit.grpc.Localization.LocalizedString, com.passkit.grpc.Localization.LocalizedString.Builder, com.passkit.grpc.Localization.LocalizedStringOrBuilder>(
getLocalizedLink(),
getParentForChildren(),
isClean());
localizedLink_ = null;
}
return localizedLinkBuilder_;
}
private com.passkit.grpc.Localization.LocalizedString localizedTitle_;
private com.google.protobuf.SingleFieldBuilderV3<
com.passkit.grpc.Localization.LocalizedString, com.passkit.grpc.Localization.LocalizedString.Builder, com.passkit.grpc.Localization.LocalizedStringOrBuilder> localizedTitleBuilder_;
/**
*
* This translates link title in different languages.
*
*
* .io.LocalizedString localizedTitle = 6;
* @return Whether the localizedTitle field is set.
*/
public boolean hasLocalizedTitle() {
return localizedTitleBuilder_ != null || localizedTitle_ != null;
}
/**
*
* This translates link title in different languages.
*
*
* .io.LocalizedString localizedTitle = 6;
* @return The localizedTitle.
*/
public com.passkit.grpc.Localization.LocalizedString getLocalizedTitle() {
if (localizedTitleBuilder_ == null) {
return localizedTitle_ == null ? com.passkit.grpc.Localization.LocalizedString.getDefaultInstance() : localizedTitle_;
} else {
return localizedTitleBuilder_.getMessage();
}
}
/**
*
* This translates link title in different languages.
*
*
* .io.LocalizedString localizedTitle = 6;
*/
public Builder setLocalizedTitle(com.passkit.grpc.Localization.LocalizedString value) {
if (localizedTitleBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
localizedTitle_ = value;
onChanged();
} else {
localizedTitleBuilder_.setMessage(value);
}
return this;
}
/**
*
* This translates link title in different languages.
*
*
* .io.LocalizedString localizedTitle = 6;
*/
public Builder setLocalizedTitle(
com.passkit.grpc.Localization.LocalizedString.Builder builderForValue) {
if (localizedTitleBuilder_ == null) {
localizedTitle_ = builderForValue.build();
onChanged();
} else {
localizedTitleBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* This translates link title in different languages.
*
*
* .io.LocalizedString localizedTitle = 6;
*/
public Builder mergeLocalizedTitle(com.passkit.grpc.Localization.LocalizedString value) {
if (localizedTitleBuilder_ == null) {
if (localizedTitle_ != null) {
localizedTitle_ =
com.passkit.grpc.Localization.LocalizedString.newBuilder(localizedTitle_).mergeFrom(value).buildPartial();
} else {
localizedTitle_ = value;
}
onChanged();
} else {
localizedTitleBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* This translates link title in different languages.
*
*
* .io.LocalizedString localizedTitle = 6;
*/
public Builder clearLocalizedTitle() {
if (localizedTitleBuilder_ == null) {
localizedTitle_ = null;
onChanged();
} else {
localizedTitle_ = null;
localizedTitleBuilder_ = null;
}
return this;
}
/**
*
* This translates link title in different languages.
*
*
* .io.LocalizedString localizedTitle = 6;
*/
public com.passkit.grpc.Localization.LocalizedString.Builder getLocalizedTitleBuilder() {
onChanged();
return getLocalizedTitleFieldBuilder().getBuilder();
}
/**
*
* This translates link title in different languages.
*
*
* .io.LocalizedString localizedTitle = 6;
*/
public com.passkit.grpc.Localization.LocalizedStringOrBuilder getLocalizedTitleOrBuilder() {
if (localizedTitleBuilder_ != null) {
return localizedTitleBuilder_.getMessageOrBuilder();
} else {
return localizedTitle_ == null ?
com.passkit.grpc.Localization.LocalizedString.getDefaultInstance() : localizedTitle_;
}
}
/**
*
* This translates link title in different languages.
*
*
* .io.LocalizedString localizedTitle = 6;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.passkit.grpc.Localization.LocalizedString, com.passkit.grpc.Localization.LocalizedString.Builder, com.passkit.grpc.Localization.LocalizedStringOrBuilder>
getLocalizedTitleFieldBuilder() {
if (localizedTitleBuilder_ == null) {
localizedTitleBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.passkit.grpc.Localization.LocalizedString, com.passkit.grpc.Localization.LocalizedString.Builder, com.passkit.grpc.Localization.LocalizedStringOrBuilder>(
getLocalizedTitle(),
getParentForChildren(),
isClean());
localizedTitle_ = null;
}
return localizedTitleBuilder_;
}
private java.util.List usage_ =
java.util.Collections.emptyList();
private void ensureUsageIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
usage_ = new java.util.ArrayList(usage_);
bitField0_ |= 0x00000001;
}
}
/**
*
* Indicates which wallets the link should be rendered for (this allows to hide certain link on Apple Wallet, and vise versa).
*
*
* repeated .io.UsageType usage = 7;
* @return A list containing the usage.
*/
public java.util.List getUsageList() {
return new com.google.protobuf.Internal.ListAdapter<
java.lang.Integer, com.passkit.grpc.CommonObjects.UsageType>(usage_, usage_converter_);
}
/**
*
* Indicates which wallets the link should be rendered for (this allows to hide certain link on Apple Wallet, and vise versa).
*
*
* repeated .io.UsageType usage = 7;
* @return The count of usage.
*/
public int getUsageCount() {
return usage_.size();
}
/**
*
* Indicates which wallets the link should be rendered for (this allows to hide certain link on Apple Wallet, and vise versa).
*
*
* repeated .io.UsageType usage = 7;
* @param index The index of the element to return.
* @return The usage at the given index.
*/
public com.passkit.grpc.CommonObjects.UsageType getUsage(int index) {
return usage_converter_.convert(usage_.get(index));
}
/**
*
* Indicates which wallets the link should be rendered for (this allows to hide certain link on Apple Wallet, and vise versa).
*
*
* repeated .io.UsageType usage = 7;
* @param index The index to set the value at.
* @param value The usage to set.
* @return This builder for chaining.
*/
public Builder setUsage(
int index, com.passkit.grpc.CommonObjects.UsageType value) {
if (value == null) {
throw new NullPointerException();
}
ensureUsageIsMutable();
usage_.set(index, value.getNumber());
onChanged();
return this;
}
/**
*
* Indicates which wallets the link should be rendered for (this allows to hide certain link on Apple Wallet, and vise versa).
*
*
* repeated .io.UsageType usage = 7;
* @param value The usage to add.
* @return This builder for chaining.
*/
public Builder addUsage(com.passkit.grpc.CommonObjects.UsageType value) {
if (value == null) {
throw new NullPointerException();
}
ensureUsageIsMutable();
usage_.add(value.getNumber());
onChanged();
return this;
}
/**
*
* Indicates which wallets the link should be rendered for (this allows to hide certain link on Apple Wallet, and vise versa).
*
*
* repeated .io.UsageType usage = 7;
* @param values The usage to add.
* @return This builder for chaining.
*/
public Builder addAllUsage(
java.lang.Iterable extends com.passkit.grpc.CommonObjects.UsageType> values) {
ensureUsageIsMutable();
for (com.passkit.grpc.CommonObjects.UsageType value : values) {
usage_.add(value.getNumber());
}
onChanged();
return this;
}
/**
*
* Indicates which wallets the link should be rendered for (this allows to hide certain link on Apple Wallet, and vise versa).
*
*
* repeated .io.UsageType usage = 7;
* @return This builder for chaining.
*/
public Builder clearUsage() {
usage_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
* Indicates which wallets the link should be rendered for (this allows to hide certain link on Apple Wallet, and vise versa).
*
*
* repeated .io.UsageType usage = 7;
* @return A list containing the enum numeric values on the wire for usage.
*/
public java.util.List
getUsageValueList() {
return java.util.Collections.unmodifiableList(usage_);
}
/**
*
* Indicates which wallets the link should be rendered for (this allows to hide certain link on Apple Wallet, and vise versa).
*
*
* repeated .io.UsageType usage = 7;
* @param index The index of the value to return.
* @return The enum numeric value on the wire of usage at the given index.
*/
public int getUsageValue(int index) {
return usage_.get(index);
}
/**
*
* Indicates which wallets the link should be rendered for (this allows to hide certain link on Apple Wallet, and vise versa).
*
*
* repeated .io.UsageType usage = 7;
* @param index The index of the value to return.
* @return The enum numeric value on the wire of usage at the given index.
* @return This builder for chaining.
*/
public Builder setUsageValue(
int index, int value) {
ensureUsageIsMutable();
usage_.set(index, value);
onChanged();
return this;
}
/**
*
* Indicates which wallets the link should be rendered for (this allows to hide certain link on Apple Wallet, and vise versa).
*
*
* repeated .io.UsageType usage = 7;
* @param value The enum numeric value on the wire for usage to add.
* @return This builder for chaining.
*/
public Builder addUsageValue(int value) {
ensureUsageIsMutable();
usage_.add(value);
onChanged();
return this;
}
/**
*
* Indicates which wallets the link should be rendered for (this allows to hide certain link on Apple Wallet, and vise versa).
*
*
* repeated .io.UsageType usage = 7;
* @param values The enum numeric values on the wire for usage to add.
* @return This builder for chaining.
*/
public Builder addAllUsageValue(
java.lang.Iterable values) {
ensureUsageIsMutable();
for (int value : values) {
usage_.add(value);
}
onChanged();
return this;
}
private int position_ ;
/**
*
* Links will be rendered in order of their position, from lowest to highest. Position can be any value, E.g. 3 links with positions 30, 10, 20 would render 10 first, 20 second and 30 third. If no position is provided, the order of the links cannot be guaranteed.
*
*
* uint32 position = 8;
* @return The position.
*/
@java.lang.Override
public int getPosition() {
return position_;
}
/**
*
* Links will be rendered in order of their position, from lowest to highest. Position can be any value, E.g. 3 links with positions 30, 10, 20 would render 10 first, 20 second and 30 third. If no position is provided, the order of the links cannot be guaranteed.
*
*
* uint32 position = 8;
* @param value The position to set.
* @return This builder for chaining.
*/
public Builder setPosition(int value) {
position_ = value;
onChanged();
return this;
}
/**
*
* Links will be rendered in order of their position, from lowest to highest. Position can be any value, E.g. 3 links with positions 30, 10, 20 would render 10 first, 20 second and 30 third. If no position is provided, the order of the links cannot be guaranteed.
*
*
* uint32 position = 8;
* @return This builder for chaining.
*/
public Builder clearPosition() {
position_ = 0;
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:io.Link)
}
// @@protoc_insertion_point(class_scope:io.Link)
private static final com.passkit.grpc.Links.Link DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.passkit.grpc.Links.Link();
}
public static com.passkit.grpc.Links.Link getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Link parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Link(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.passkit.grpc.Links.Link getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface DbLinkOrBuilder extends
// @@protoc_insertion_point(interface_extends:io.DbLink)
com.google.protobuf.MessageOrBuilder {
/**
* repeated .io.Link links = 1;
*/
java.util.List
getLinksList();
/**
* repeated .io.Link links = 1;
*/
com.passkit.grpc.Links.Link getLinks(int index);
/**
* repeated .io.Link links = 1;
*/
int getLinksCount();
/**
* repeated .io.Link links = 1;
*/
java.util.List extends com.passkit.grpc.Links.LinkOrBuilder>
getLinksOrBuilderList();
/**
* repeated .io.Link links = 1;
*/
com.passkit.grpc.Links.LinkOrBuilder getLinksOrBuilder(
int index);
}
/**
* Protobuf type {@code io.DbLink}
*/
public static final class DbLink extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:io.DbLink)
DbLinkOrBuilder {
private static final long serialVersionUID = 0L;
// Use DbLink.newBuilder() to construct.
private DbLink(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private DbLink() {
links_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new DbLink();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private DbLink(
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: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
links_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
links_.add(
input.readMessage(com.passkit.grpc.Links.Link.parser(), extensionRegistry));
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 {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
links_ = java.util.Collections.unmodifiableList(links_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.passkit.grpc.Links.internal_static_io_DbLink_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.passkit.grpc.Links.internal_static_io_DbLink_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.passkit.grpc.Links.DbLink.class, com.passkit.grpc.Links.DbLink.Builder.class);
}
public static final int LINKS_FIELD_NUMBER = 1;
private java.util.List links_;
/**
* repeated .io.Link links = 1;
*/
@java.lang.Override
public java.util.List getLinksList() {
return links_;
}
/**
* repeated .io.Link links = 1;
*/
@java.lang.Override
public java.util.List extends com.passkit.grpc.Links.LinkOrBuilder>
getLinksOrBuilderList() {
return links_;
}
/**
* repeated .io.Link links = 1;
*/
@java.lang.Override
public int getLinksCount() {
return links_.size();
}
/**
* repeated .io.Link links = 1;
*/
@java.lang.Override
public com.passkit.grpc.Links.Link getLinks(int index) {
return links_.get(index);
}
/**
* repeated .io.Link links = 1;
*/
@java.lang.Override
public com.passkit.grpc.Links.LinkOrBuilder getLinksOrBuilder(
int index) {
return links_.get(index);
}
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 {
for (int i = 0; i < links_.size(); i++) {
output.writeMessage(1, links_.get(i));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < links_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, links_.get(i));
}
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.passkit.grpc.Links.DbLink)) {
return super.equals(obj);
}
com.passkit.grpc.Links.DbLink other = (com.passkit.grpc.Links.DbLink) obj;
if (!getLinksList()
.equals(other.getLinksList())) return false;
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();
if (getLinksCount() > 0) {
hash = (37 * hash) + LINKS_FIELD_NUMBER;
hash = (53 * hash) + getLinksList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.passkit.grpc.Links.DbLink parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.passkit.grpc.Links.DbLink parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.passkit.grpc.Links.DbLink parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.passkit.grpc.Links.DbLink parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.passkit.grpc.Links.DbLink parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.passkit.grpc.Links.DbLink parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.passkit.grpc.Links.DbLink parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.passkit.grpc.Links.DbLink 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.passkit.grpc.Links.DbLink parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.passkit.grpc.Links.DbLink 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.passkit.grpc.Links.DbLink parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.passkit.grpc.Links.DbLink 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.passkit.grpc.Links.DbLink 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;
}
/**
* Protobuf type {@code io.DbLink}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:io.DbLink)
com.passkit.grpc.Links.DbLinkOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.passkit.grpc.Links.internal_static_io_DbLink_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.passkit.grpc.Links.internal_static_io_DbLink_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.passkit.grpc.Links.DbLink.class, com.passkit.grpc.Links.DbLink.Builder.class);
}
// Construct using com.passkit.grpc.Links.DbLink.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getLinksFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (linksBuilder_ == null) {
links_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
linksBuilder_.clear();
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.passkit.grpc.Links.internal_static_io_DbLink_descriptor;
}
@java.lang.Override
public com.passkit.grpc.Links.DbLink getDefaultInstanceForType() {
return com.passkit.grpc.Links.DbLink.getDefaultInstance();
}
@java.lang.Override
public com.passkit.grpc.Links.DbLink build() {
com.passkit.grpc.Links.DbLink result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.passkit.grpc.Links.DbLink buildPartial() {
com.passkit.grpc.Links.DbLink result = new com.passkit.grpc.Links.DbLink(this);
int from_bitField0_ = bitField0_;
if (linksBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
links_ = java.util.Collections.unmodifiableList(links_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.links_ = links_;
} else {
result.links_ = linksBuilder_.build();
}
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.passkit.grpc.Links.DbLink) {
return mergeFrom((com.passkit.grpc.Links.DbLink)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.passkit.grpc.Links.DbLink other) {
if (other == com.passkit.grpc.Links.DbLink.getDefaultInstance()) return this;
if (linksBuilder_ == null) {
if (!other.links_.isEmpty()) {
if (links_.isEmpty()) {
links_ = other.links_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureLinksIsMutable();
links_.addAll(other.links_);
}
onChanged();
}
} else {
if (!other.links_.isEmpty()) {
if (linksBuilder_.isEmpty()) {
linksBuilder_.dispose();
linksBuilder_ = null;
links_ = other.links_;
bitField0_ = (bitField0_ & ~0x00000001);
linksBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getLinksFieldBuilder() : null;
} else {
linksBuilder_.addAllMessages(other.links_);
}
}
}
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.passkit.grpc.Links.DbLink parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.passkit.grpc.Links.DbLink) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.util.List links_ =
java.util.Collections.emptyList();
private void ensureLinksIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
links_ = new java.util.ArrayList(links_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.passkit.grpc.Links.Link, com.passkit.grpc.Links.Link.Builder, com.passkit.grpc.Links.LinkOrBuilder> linksBuilder_;
/**
* repeated .io.Link links = 1;
*/
public java.util.List getLinksList() {
if (linksBuilder_ == null) {
return java.util.Collections.unmodifiableList(links_);
} else {
return linksBuilder_.getMessageList();
}
}
/**
* repeated .io.Link links = 1;
*/
public int getLinksCount() {
if (linksBuilder_ == null) {
return links_.size();
} else {
return linksBuilder_.getCount();
}
}
/**
* repeated .io.Link links = 1;
*/
public com.passkit.grpc.Links.Link getLinks(int index) {
if (linksBuilder_ == null) {
return links_.get(index);
} else {
return linksBuilder_.getMessage(index);
}
}
/**
* repeated .io.Link links = 1;
*/
public Builder setLinks(
int index, com.passkit.grpc.Links.Link value) {
if (linksBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureLinksIsMutable();
links_.set(index, value);
onChanged();
} else {
linksBuilder_.setMessage(index, value);
}
return this;
}
/**
* repeated .io.Link links = 1;
*/
public Builder setLinks(
int index, com.passkit.grpc.Links.Link.Builder builderForValue) {
if (linksBuilder_ == null) {
ensureLinksIsMutable();
links_.set(index, builderForValue.build());
onChanged();
} else {
linksBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .io.Link links = 1;
*/
public Builder addLinks(com.passkit.grpc.Links.Link value) {
if (linksBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureLinksIsMutable();
links_.add(value);
onChanged();
} else {
linksBuilder_.addMessage(value);
}
return this;
}
/**
* repeated .io.Link links = 1;
*/
public Builder addLinks(
int index, com.passkit.grpc.Links.Link value) {
if (linksBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureLinksIsMutable();
links_.add(index, value);
onChanged();
} else {
linksBuilder_.addMessage(index, value);
}
return this;
}
/**
* repeated .io.Link links = 1;
*/
public Builder addLinks(
com.passkit.grpc.Links.Link.Builder builderForValue) {
if (linksBuilder_ == null) {
ensureLinksIsMutable();
links_.add(builderForValue.build());
onChanged();
} else {
linksBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* repeated .io.Link links = 1;
*/
public Builder addLinks(
int index, com.passkit.grpc.Links.Link.Builder builderForValue) {
if (linksBuilder_ == null) {
ensureLinksIsMutable();
links_.add(index, builderForValue.build());
onChanged();
} else {
linksBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .io.Link links = 1;
*/
public Builder addAllLinks(
java.lang.Iterable extends com.passkit.grpc.Links.Link> values) {
if (linksBuilder_ == null) {
ensureLinksIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, links_);
onChanged();
} else {
linksBuilder_.addAllMessages(values);
}
return this;
}
/**
* repeated .io.Link links = 1;
*/
public Builder clearLinks() {
if (linksBuilder_ == null) {
links_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
linksBuilder_.clear();
}
return this;
}
/**
* repeated .io.Link links = 1;
*/
public Builder removeLinks(int index) {
if (linksBuilder_ == null) {
ensureLinksIsMutable();
links_.remove(index);
onChanged();
} else {
linksBuilder_.remove(index);
}
return this;
}
/**
* repeated .io.Link links = 1;
*/
public com.passkit.grpc.Links.Link.Builder getLinksBuilder(
int index) {
return getLinksFieldBuilder().getBuilder(index);
}
/**
* repeated .io.Link links = 1;
*/
public com.passkit.grpc.Links.LinkOrBuilder getLinksOrBuilder(
int index) {
if (linksBuilder_ == null) {
return links_.get(index); } else {
return linksBuilder_.getMessageOrBuilder(index);
}
}
/**
* repeated .io.Link links = 1;
*/
public java.util.List extends com.passkit.grpc.Links.LinkOrBuilder>
getLinksOrBuilderList() {
if (linksBuilder_ != null) {
return linksBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(links_);
}
}
/**
* repeated .io.Link links = 1;
*/
public com.passkit.grpc.Links.Link.Builder addLinksBuilder() {
return getLinksFieldBuilder().addBuilder(
com.passkit.grpc.Links.Link.getDefaultInstance());
}
/**
* repeated .io.Link links = 1;
*/
public com.passkit.grpc.Links.Link.Builder addLinksBuilder(
int index) {
return getLinksFieldBuilder().addBuilder(
index, com.passkit.grpc.Links.Link.getDefaultInstance());
}
/**
* repeated .io.Link links = 1;
*/
public java.util.List
getLinksBuilderList() {
return getLinksFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.passkit.grpc.Links.Link, com.passkit.grpc.Links.Link.Builder, com.passkit.grpc.Links.LinkOrBuilder>
getLinksFieldBuilder() {
if (linksBuilder_ == null) {
linksBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.passkit.grpc.Links.Link, com.passkit.grpc.Links.Link.Builder, com.passkit.grpc.Links.LinkOrBuilder>(
links_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
links_ = null;
}
return linksBuilder_;
}
@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:io.DbLink)
}
// @@protoc_insertion_point(class_scope:io.DbLink)
private static final com.passkit.grpc.Links.DbLink DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.passkit.grpc.Links.DbLink();
}
public static com.passkit.grpc.Links.DbLink getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public DbLink parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new DbLink(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.passkit.grpc.Links.DbLink getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_io_Link_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_io_Link_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_io_DbLink_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_io_DbLink_fieldAccessorTable;
public static com.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {
return descriptor;
}
private static com.google.protobuf.Descriptors.FileDescriptor
descriptor;
static {
java.lang.String[] descriptorData = {
"\n\025io/common/links.proto\022\002io\032\036io/common/c" +
"ommon_objects.proto\032\034io/common/localizat" +
"ion.proto\"\323\001\n\004Link\022\n\n\002id\030\001 \001(\t\022\013\n\003url\030\002 " +
"\001(\t\022\r\n\005title\030\003 \001(\t\022\032\n\004type\030\004 \001(\0162\014.io.Li" +
"nkType\022*\n\rlocalizedLink\030\005 \001(\0132\023.io.Local" +
"izedString\022+\n\016localizedTitle\030\006 \001(\0132\023.io." +
"LocalizedString\022\034\n\005usage\030\007 \003(\0162\r.io.Usag" +
"eType\022\020\n\010position\030\010 \001(\r\"!\n\006DbLink\022\027\n\005lin" +
"ks\030\001 \003(\0132\010.io.Link*k\n\010LinkType\022\022\n\016URI_DO" +
"_NOT_USE\020\000\022\013\n\007URI_WEB\020\001\022\013\n\007URI_TEL\020\002\022\r\n\t" +
"URI_EMAIL\020\003\022\020\n\014URI_LOCATION\020\004\022\020\n\014URI_CAL" +
"ENDAR\020\005BG\n\020com.passkit.grpcZ$stash.passk" +
"it.com/io/model/sdk/go/io\252\002\014PassKit.Grpc" +
"b\006proto3"
};
descriptor = com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
com.passkit.grpc.CommonObjects.getDescriptor(),
com.passkit.grpc.Localization.getDescriptor(),
});
internal_static_io_Link_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_io_Link_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_io_Link_descriptor,
new java.lang.String[] { "Id", "Url", "Title", "Type", "LocalizedLink", "LocalizedTitle", "Usage", "Position", });
internal_static_io_DbLink_descriptor =
getDescriptor().getMessageTypes().get(1);
internal_static_io_DbLink_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_io_DbLink_descriptor,
new java.lang.String[] { "Links", });
com.passkit.grpc.CommonObjects.getDescriptor();
com.passkit.grpc.Localization.getDescriptor();
}
// @@protoc_insertion_point(outer_class_scope)
}