com.passkit.grpc.Expiry 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/expiry.proto
package com.passkit.grpc;
public final class Expiry {
private Expiry() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistryLite registry) {
}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
registerAllExtensions(
(com.google.protobuf.ExtensionRegistryLite) registry);
}
/**
*
* Options to manage the expiry date of the digital card.
*
*
* Protobuf enum {@code io.ExpiryType}
*/
public enum ExpiryType
implements com.google.protobuf.ProtocolMessageEnum {
/**
*
* Please do not use this enum. This enum do not have any effect on expiry logic.
*
*
* EXPIRE_NONE = 0;
*/
EXPIRE_NONE(0),
/**
*
* Expiry date is set with year, month and date. The expiry date will be based on your timezone. The digital card will expire at 23:59:59:59.99999 of set date in fixed timezone. The expiry date is the same for all cards.
*
*
* EXPIRE_ON_FIXED_DATE = 1;
*/
EXPIRE_ON_FIXED_DATE(1),
/**
*
* The digital card expires after the number of days after the digital card issuing.
*
*
* EXPIRE_AFTER_X_DAYS = 2;
*/
EXPIRE_AFTER_X_DAYS(2),
/**
*
* If you want to change expiry date for each digital card, you can use this expiry type. You can set expiry date and time in fixed timezone.
*
*
* EXPIRE_ON_VARIABLE_DATE_TIME = 3;
*/
EXPIRE_ON_VARIABLE_DATE_TIME(3),
/**
*
* The digital card will set as NULL and the pass will not expire..
*
*
* EXPIRE_SET_TO_NULL = 4;
*/
EXPIRE_SET_TO_NULL(4),
UNRECOGNIZED(-1),
;
/**
*
* Please do not use this enum. This enum do not have any effect on expiry logic.
*
*
* EXPIRE_NONE = 0;
*/
public static final int EXPIRE_NONE_VALUE = 0;
/**
*
* Expiry date is set with year, month and date. The expiry date will be based on your timezone. The digital card will expire at 23:59:59:59.99999 of set date in fixed timezone. The expiry date is the same for all cards.
*
*
* EXPIRE_ON_FIXED_DATE = 1;
*/
public static final int EXPIRE_ON_FIXED_DATE_VALUE = 1;
/**
*
* The digital card expires after the number of days after the digital card issuing.
*
*
* EXPIRE_AFTER_X_DAYS = 2;
*/
public static final int EXPIRE_AFTER_X_DAYS_VALUE = 2;
/**
*
* If you want to change expiry date for each digital card, you can use this expiry type. You can set expiry date and time in fixed timezone.
*
*
* EXPIRE_ON_VARIABLE_DATE_TIME = 3;
*/
public static final int EXPIRE_ON_VARIABLE_DATE_TIME_VALUE = 3;
/**
*
* The digital card will set as NULL and the pass will not expire..
*
*
* EXPIRE_SET_TO_NULL = 4;
*/
public static final int EXPIRE_SET_TO_NULL_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;
}
/**
* @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 ExpiryType 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 ExpiryType forNumber(int value) {
switch (value) {
case 0: return EXPIRE_NONE;
case 1: return EXPIRE_ON_FIXED_DATE;
case 2: return EXPIRE_AFTER_X_DAYS;
case 3: return EXPIRE_ON_VARIABLE_DATE_TIME;
case 4: return EXPIRE_SET_TO_NULL;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
ExpiryType> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public ExpiryType findValueByNumber(int number) {
return ExpiryType.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.Expiry.getDescriptor().getEnumTypes().get(0);
}
private static final ExpiryType[] VALUES = values();
public static ExpiryType 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 ExpiryType(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:io.ExpiryType)
}
public interface ExpirySettingsOrBuilder extends
// @@protoc_insertion_point(interface_extends:io.ExpirySettings)
com.google.protobuf.MessageOrBuilder {
/**
* .io.ExpiryType expiryType = 1;
* @return The enum numeric value on the wire for expiryType.
*/
int getExpiryTypeValue();
/**
* .io.ExpiryType expiryType = 1;
* @return The expiryType.
*/
com.passkit.grpc.Expiry.ExpiryType getExpiryType();
/**
*
* The expiry date for digital membership card.
* Please set expiryType as EXPIRE_ON_FIXED_DATE.
*
*
* .io.Date fixedExpiryDate = 2;
* @return Whether the fixedExpiryDate field is set.
*/
boolean hasFixedExpiryDate();
/**
*
* The expiry date for digital membership card.
* Please set expiryType as EXPIRE_ON_FIXED_DATE.
*
*
* .io.Date fixedExpiryDate = 2;
* @return The fixedExpiryDate.
*/
com.passkit.grpc.CommonObjects.Date getFixedExpiryDate();
/**
*
* The expiry date for digital membership card.
* Please set expiryType as EXPIRE_ON_FIXED_DATE.
*
*
* .io.Date fixedExpiryDate = 2;
*/
com.passkit.grpc.CommonObjects.DateOrBuilder getFixedExpiryDateOrBuilder();
/**
*
* Number of days the digital membership card is expired after the enrolment date.
* Please set expiryType as EXPIRE_AFTER_X_DAYS.
*
*
* uint32 expireAfterXDays = 3;
* @return The expireAfterXDays.
*/
int getExpireAfterXDays();
public com.passkit.grpc.Expiry.ExpirySettings.ExpiryOneofCase getExpiryOneofCase();
}
/**
*
* The digital card will be expired on the expiry date. The barcode will not be rendered on digital card and the card itself will not be updated after it has been expired.
*
*
* Protobuf type {@code io.ExpirySettings}
*/
public static final class ExpirySettings extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:io.ExpirySettings)
ExpirySettingsOrBuilder {
private static final long serialVersionUID = 0L;
// Use ExpirySettings.newBuilder() to construct.
private ExpirySettings(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ExpirySettings() {
expiryType_ = 0;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new ExpirySettings();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private ExpirySettings(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
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();
expiryType_ = rawValue;
break;
}
case 18: {
com.passkit.grpc.CommonObjects.Date.Builder subBuilder = null;
if (expiryOneofCase_ == 2) {
subBuilder = ((com.passkit.grpc.CommonObjects.Date) expiryOneof_).toBuilder();
}
expiryOneof_ =
input.readMessage(com.passkit.grpc.CommonObjects.Date.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((com.passkit.grpc.CommonObjects.Date) expiryOneof_);
expiryOneof_ = subBuilder.buildPartial();
}
expiryOneofCase_ = 2;
break;
}
case 24: {
expiryOneofCase_ = 3;
expiryOneof_ = 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 {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.passkit.grpc.Expiry.internal_static_io_ExpirySettings_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.passkit.grpc.Expiry.internal_static_io_ExpirySettings_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.passkit.grpc.Expiry.ExpirySettings.class, com.passkit.grpc.Expiry.ExpirySettings.Builder.class);
}
private int expiryOneofCase_ = 0;
private java.lang.Object expiryOneof_;
public enum ExpiryOneofCase
implements com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
FIXEDEXPIRYDATE(2),
EXPIREAFTERXDAYS(3),
EXPIRYONEOF_NOT_SET(0);
private final int value;
private ExpiryOneofCase(int value) {
this.value = value;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static ExpiryOneofCase valueOf(int value) {
return forNumber(value);
}
public static ExpiryOneofCase forNumber(int value) {
switch (value) {
case 2: return FIXEDEXPIRYDATE;
case 3: return EXPIREAFTERXDAYS;
case 0: return EXPIRYONEOF_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public ExpiryOneofCase
getExpiryOneofCase() {
return ExpiryOneofCase.forNumber(
expiryOneofCase_);
}
public static final int EXPIRYTYPE_FIELD_NUMBER = 1;
private int expiryType_;
/**
* .io.ExpiryType expiryType = 1;
* @return The enum numeric value on the wire for expiryType.
*/
@java.lang.Override public int getExpiryTypeValue() {
return expiryType_;
}
/**
* .io.ExpiryType expiryType = 1;
* @return The expiryType.
*/
@java.lang.Override public com.passkit.grpc.Expiry.ExpiryType getExpiryType() {
@SuppressWarnings("deprecation")
com.passkit.grpc.Expiry.ExpiryType result = com.passkit.grpc.Expiry.ExpiryType.valueOf(expiryType_);
return result == null ? com.passkit.grpc.Expiry.ExpiryType.UNRECOGNIZED : result;
}
public static final int FIXEDEXPIRYDATE_FIELD_NUMBER = 2;
/**
*
* The expiry date for digital membership card.
* Please set expiryType as EXPIRE_ON_FIXED_DATE.
*
*
* .io.Date fixedExpiryDate = 2;
* @return Whether the fixedExpiryDate field is set.
*/
@java.lang.Override
public boolean hasFixedExpiryDate() {
return expiryOneofCase_ == 2;
}
/**
*
* The expiry date for digital membership card.
* Please set expiryType as EXPIRE_ON_FIXED_DATE.
*
*
* .io.Date fixedExpiryDate = 2;
* @return The fixedExpiryDate.
*/
@java.lang.Override
public com.passkit.grpc.CommonObjects.Date getFixedExpiryDate() {
if (expiryOneofCase_ == 2) {
return (com.passkit.grpc.CommonObjects.Date) expiryOneof_;
}
return com.passkit.grpc.CommonObjects.Date.getDefaultInstance();
}
/**
*
* The expiry date for digital membership card.
* Please set expiryType as EXPIRE_ON_FIXED_DATE.
*
*
* .io.Date fixedExpiryDate = 2;
*/
@java.lang.Override
public com.passkit.grpc.CommonObjects.DateOrBuilder getFixedExpiryDateOrBuilder() {
if (expiryOneofCase_ == 2) {
return (com.passkit.grpc.CommonObjects.Date) expiryOneof_;
}
return com.passkit.grpc.CommonObjects.Date.getDefaultInstance();
}
public static final int EXPIREAFTERXDAYS_FIELD_NUMBER = 3;
/**
*
* Number of days the digital membership card is expired after the enrolment date.
* Please set expiryType as EXPIRE_AFTER_X_DAYS.
*
*
* uint32 expireAfterXDays = 3;
* @return The expireAfterXDays.
*/
@java.lang.Override
public int getExpireAfterXDays() {
if (expiryOneofCase_ == 3) {
return (java.lang.Integer) expiryOneof_;
}
return 0;
}
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 (expiryType_ != com.passkit.grpc.Expiry.ExpiryType.EXPIRE_NONE.getNumber()) {
output.writeEnum(1, expiryType_);
}
if (expiryOneofCase_ == 2) {
output.writeMessage(2, (com.passkit.grpc.CommonObjects.Date) expiryOneof_);
}
if (expiryOneofCase_ == 3) {
output.writeUInt32(
3, (int)((java.lang.Integer) expiryOneof_));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (expiryType_ != com.passkit.grpc.Expiry.ExpiryType.EXPIRE_NONE.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(1, expiryType_);
}
if (expiryOneofCase_ == 2) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, (com.passkit.grpc.CommonObjects.Date) expiryOneof_);
}
if (expiryOneofCase_ == 3) {
size += com.google.protobuf.CodedOutputStream
.computeUInt32Size(
3, (int)((java.lang.Integer) expiryOneof_));
}
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.Expiry.ExpirySettings)) {
return super.equals(obj);
}
com.passkit.grpc.Expiry.ExpirySettings other = (com.passkit.grpc.Expiry.ExpirySettings) obj;
if (expiryType_ != other.expiryType_) return false;
if (!getExpiryOneofCase().equals(other.getExpiryOneofCase())) return false;
switch (expiryOneofCase_) {
case 2:
if (!getFixedExpiryDate()
.equals(other.getFixedExpiryDate())) return false;
break;
case 3:
if (getExpireAfterXDays()
!= other.getExpireAfterXDays()) 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) + EXPIRYTYPE_FIELD_NUMBER;
hash = (53 * hash) + expiryType_;
switch (expiryOneofCase_) {
case 2:
hash = (37 * hash) + FIXEDEXPIRYDATE_FIELD_NUMBER;
hash = (53 * hash) + getFixedExpiryDate().hashCode();
break;
case 3:
hash = (37 * hash) + EXPIREAFTERXDAYS_FIELD_NUMBER;
hash = (53 * hash) + getExpireAfterXDays();
break;
case 0:
default:
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.passkit.grpc.Expiry.ExpirySettings parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.passkit.grpc.Expiry.ExpirySettings 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.Expiry.ExpirySettings parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.passkit.grpc.Expiry.ExpirySettings 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.Expiry.ExpirySettings parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.passkit.grpc.Expiry.ExpirySettings parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.passkit.grpc.Expiry.ExpirySettings parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.passkit.grpc.Expiry.ExpirySettings 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.Expiry.ExpirySettings parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.passkit.grpc.Expiry.ExpirySettings 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.Expiry.ExpirySettings parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.passkit.grpc.Expiry.ExpirySettings 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.Expiry.ExpirySettings 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;
}
/**
*
* The digital card will be expired on the expiry date. The barcode will not be rendered on digital card and the card itself will not be updated after it has been expired.
*
*
* Protobuf type {@code io.ExpirySettings}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:io.ExpirySettings)
com.passkit.grpc.Expiry.ExpirySettingsOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.passkit.grpc.Expiry.internal_static_io_ExpirySettings_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.passkit.grpc.Expiry.internal_static_io_ExpirySettings_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.passkit.grpc.Expiry.ExpirySettings.class, com.passkit.grpc.Expiry.ExpirySettings.Builder.class);
}
// Construct using com.passkit.grpc.Expiry.ExpirySettings.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();
expiryType_ = 0;
expiryOneofCase_ = 0;
expiryOneof_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.passkit.grpc.Expiry.internal_static_io_ExpirySettings_descriptor;
}
@java.lang.Override
public com.passkit.grpc.Expiry.ExpirySettings getDefaultInstanceForType() {
return com.passkit.grpc.Expiry.ExpirySettings.getDefaultInstance();
}
@java.lang.Override
public com.passkit.grpc.Expiry.ExpirySettings build() {
com.passkit.grpc.Expiry.ExpirySettings result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.passkit.grpc.Expiry.ExpirySettings buildPartial() {
com.passkit.grpc.Expiry.ExpirySettings result = new com.passkit.grpc.Expiry.ExpirySettings(this);
result.expiryType_ = expiryType_;
if (expiryOneofCase_ == 2) {
if (fixedExpiryDateBuilder_ == null) {
result.expiryOneof_ = expiryOneof_;
} else {
result.expiryOneof_ = fixedExpiryDateBuilder_.build();
}
}
if (expiryOneofCase_ == 3) {
result.expiryOneof_ = expiryOneof_;
}
result.expiryOneofCase_ = expiryOneofCase_;
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.Expiry.ExpirySettings) {
return mergeFrom((com.passkit.grpc.Expiry.ExpirySettings)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.passkit.grpc.Expiry.ExpirySettings other) {
if (other == com.passkit.grpc.Expiry.ExpirySettings.getDefaultInstance()) return this;
if (other.expiryType_ != 0) {
setExpiryTypeValue(other.getExpiryTypeValue());
}
switch (other.getExpiryOneofCase()) {
case FIXEDEXPIRYDATE: {
mergeFixedExpiryDate(other.getFixedExpiryDate());
break;
}
case EXPIREAFTERXDAYS: {
setExpireAfterXDays(other.getExpireAfterXDays());
break;
}
case EXPIRYONEOF_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.passkit.grpc.Expiry.ExpirySettings parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.passkit.grpc.Expiry.ExpirySettings) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int expiryOneofCase_ = 0;
private java.lang.Object expiryOneof_;
public ExpiryOneofCase
getExpiryOneofCase() {
return ExpiryOneofCase.forNumber(
expiryOneofCase_);
}
public Builder clearExpiryOneof() {
expiryOneofCase_ = 0;
expiryOneof_ = null;
onChanged();
return this;
}
private int expiryType_ = 0;
/**
* .io.ExpiryType expiryType = 1;
* @return The enum numeric value on the wire for expiryType.
*/
@java.lang.Override public int getExpiryTypeValue() {
return expiryType_;
}
/**
* .io.ExpiryType expiryType = 1;
* @param value The enum numeric value on the wire for expiryType to set.
* @return This builder for chaining.
*/
public Builder setExpiryTypeValue(int value) {
expiryType_ = value;
onChanged();
return this;
}
/**
* .io.ExpiryType expiryType = 1;
* @return The expiryType.
*/
@java.lang.Override
public com.passkit.grpc.Expiry.ExpiryType getExpiryType() {
@SuppressWarnings("deprecation")
com.passkit.grpc.Expiry.ExpiryType result = com.passkit.grpc.Expiry.ExpiryType.valueOf(expiryType_);
return result == null ? com.passkit.grpc.Expiry.ExpiryType.UNRECOGNIZED : result;
}
/**
* .io.ExpiryType expiryType = 1;
* @param value The expiryType to set.
* @return This builder for chaining.
*/
public Builder setExpiryType(com.passkit.grpc.Expiry.ExpiryType value) {
if (value == null) {
throw new NullPointerException();
}
expiryType_ = value.getNumber();
onChanged();
return this;
}
/**
* .io.ExpiryType expiryType = 1;
* @return This builder for chaining.
*/
public Builder clearExpiryType() {
expiryType_ = 0;
onChanged();
return this;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.passkit.grpc.CommonObjects.Date, com.passkit.grpc.CommonObjects.Date.Builder, com.passkit.grpc.CommonObjects.DateOrBuilder> fixedExpiryDateBuilder_;
/**
*
* The expiry date for digital membership card.
* Please set expiryType as EXPIRE_ON_FIXED_DATE.
*
*
* .io.Date fixedExpiryDate = 2;
* @return Whether the fixedExpiryDate field is set.
*/
@java.lang.Override
public boolean hasFixedExpiryDate() {
return expiryOneofCase_ == 2;
}
/**
*
* The expiry date for digital membership card.
* Please set expiryType as EXPIRE_ON_FIXED_DATE.
*
*
* .io.Date fixedExpiryDate = 2;
* @return The fixedExpiryDate.
*/
@java.lang.Override
public com.passkit.grpc.CommonObjects.Date getFixedExpiryDate() {
if (fixedExpiryDateBuilder_ == null) {
if (expiryOneofCase_ == 2) {
return (com.passkit.grpc.CommonObjects.Date) expiryOneof_;
}
return com.passkit.grpc.CommonObjects.Date.getDefaultInstance();
} else {
if (expiryOneofCase_ == 2) {
return fixedExpiryDateBuilder_.getMessage();
}
return com.passkit.grpc.CommonObjects.Date.getDefaultInstance();
}
}
/**
*
* The expiry date for digital membership card.
* Please set expiryType as EXPIRE_ON_FIXED_DATE.
*
*
* .io.Date fixedExpiryDate = 2;
*/
public Builder setFixedExpiryDate(com.passkit.grpc.CommonObjects.Date value) {
if (fixedExpiryDateBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
expiryOneof_ = value;
onChanged();
} else {
fixedExpiryDateBuilder_.setMessage(value);
}
expiryOneofCase_ = 2;
return this;
}
/**
*
* The expiry date for digital membership card.
* Please set expiryType as EXPIRE_ON_FIXED_DATE.
*
*
* .io.Date fixedExpiryDate = 2;
*/
public Builder setFixedExpiryDate(
com.passkit.grpc.CommonObjects.Date.Builder builderForValue) {
if (fixedExpiryDateBuilder_ == null) {
expiryOneof_ = builderForValue.build();
onChanged();
} else {
fixedExpiryDateBuilder_.setMessage(builderForValue.build());
}
expiryOneofCase_ = 2;
return this;
}
/**
*
* The expiry date for digital membership card.
* Please set expiryType as EXPIRE_ON_FIXED_DATE.
*
*
* .io.Date fixedExpiryDate = 2;
*/
public Builder mergeFixedExpiryDate(com.passkit.grpc.CommonObjects.Date value) {
if (fixedExpiryDateBuilder_ == null) {
if (expiryOneofCase_ == 2 &&
expiryOneof_ != com.passkit.grpc.CommonObjects.Date.getDefaultInstance()) {
expiryOneof_ = com.passkit.grpc.CommonObjects.Date.newBuilder((com.passkit.grpc.CommonObjects.Date) expiryOneof_)
.mergeFrom(value).buildPartial();
} else {
expiryOneof_ = value;
}
onChanged();
} else {
if (expiryOneofCase_ == 2) {
fixedExpiryDateBuilder_.mergeFrom(value);
}
fixedExpiryDateBuilder_.setMessage(value);
}
expiryOneofCase_ = 2;
return this;
}
/**
*
* The expiry date for digital membership card.
* Please set expiryType as EXPIRE_ON_FIXED_DATE.
*
*
* .io.Date fixedExpiryDate = 2;
*/
public Builder clearFixedExpiryDate() {
if (fixedExpiryDateBuilder_ == null) {
if (expiryOneofCase_ == 2) {
expiryOneofCase_ = 0;
expiryOneof_ = null;
onChanged();
}
} else {
if (expiryOneofCase_ == 2) {
expiryOneofCase_ = 0;
expiryOneof_ = null;
}
fixedExpiryDateBuilder_.clear();
}
return this;
}
/**
*
* The expiry date for digital membership card.
* Please set expiryType as EXPIRE_ON_FIXED_DATE.
*
*
* .io.Date fixedExpiryDate = 2;
*/
public com.passkit.grpc.CommonObjects.Date.Builder getFixedExpiryDateBuilder() {
return getFixedExpiryDateFieldBuilder().getBuilder();
}
/**
*
* The expiry date for digital membership card.
* Please set expiryType as EXPIRE_ON_FIXED_DATE.
*
*
* .io.Date fixedExpiryDate = 2;
*/
@java.lang.Override
public com.passkit.grpc.CommonObjects.DateOrBuilder getFixedExpiryDateOrBuilder() {
if ((expiryOneofCase_ == 2) && (fixedExpiryDateBuilder_ != null)) {
return fixedExpiryDateBuilder_.getMessageOrBuilder();
} else {
if (expiryOneofCase_ == 2) {
return (com.passkit.grpc.CommonObjects.Date) expiryOneof_;
}
return com.passkit.grpc.CommonObjects.Date.getDefaultInstance();
}
}
/**
*
* The expiry date for digital membership card.
* Please set expiryType as EXPIRE_ON_FIXED_DATE.
*
*
* .io.Date fixedExpiryDate = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.passkit.grpc.CommonObjects.Date, com.passkit.grpc.CommonObjects.Date.Builder, com.passkit.grpc.CommonObjects.DateOrBuilder>
getFixedExpiryDateFieldBuilder() {
if (fixedExpiryDateBuilder_ == null) {
if (!(expiryOneofCase_ == 2)) {
expiryOneof_ = com.passkit.grpc.CommonObjects.Date.getDefaultInstance();
}
fixedExpiryDateBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.passkit.grpc.CommonObjects.Date, com.passkit.grpc.CommonObjects.Date.Builder, com.passkit.grpc.CommonObjects.DateOrBuilder>(
(com.passkit.grpc.CommonObjects.Date) expiryOneof_,
getParentForChildren(),
isClean());
expiryOneof_ = null;
}
expiryOneofCase_ = 2;
onChanged();;
return fixedExpiryDateBuilder_;
}
/**
*
* Number of days the digital membership card is expired after the enrolment date.
* Please set expiryType as EXPIRE_AFTER_X_DAYS.
*
*
* uint32 expireAfterXDays = 3;
* @return The expireAfterXDays.
*/
public int getExpireAfterXDays() {
if (expiryOneofCase_ == 3) {
return (java.lang.Integer) expiryOneof_;
}
return 0;
}
/**
*
* Number of days the digital membership card is expired after the enrolment date.
* Please set expiryType as EXPIRE_AFTER_X_DAYS.
*
*
* uint32 expireAfterXDays = 3;
* @param value The expireAfterXDays to set.
* @return This builder for chaining.
*/
public Builder setExpireAfterXDays(int value) {
expiryOneofCase_ = 3;
expiryOneof_ = value;
onChanged();
return this;
}
/**
*
* Number of days the digital membership card is expired after the enrolment date.
* Please set expiryType as EXPIRE_AFTER_X_DAYS.
*
*
* uint32 expireAfterXDays = 3;
* @return This builder for chaining.
*/
public Builder clearExpireAfterXDays() {
if (expiryOneofCase_ == 3) {
expiryOneofCase_ = 0;
expiryOneof_ = null;
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.ExpirySettings)
}
// @@protoc_insertion_point(class_scope:io.ExpirySettings)
private static final com.passkit.grpc.Expiry.ExpirySettings DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.passkit.grpc.Expiry.ExpirySettings();
}
public static com.passkit.grpc.Expiry.ExpirySettings getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ExpirySettings parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ExpirySettings(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.Expiry.ExpirySettings getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_io_ExpirySettings_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_io_ExpirySettings_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\026io/common/expiry.proto\022\002io\032\036io/common/" +
"common_objects.proto\"\204\001\n\016ExpirySettings\022" +
"\"\n\nexpiryType\030\001 \001(\0162\016.io.ExpiryType\022#\n\017f" +
"ixedExpiryDate\030\002 \001(\0132\010.io.DateH\000\022\032\n\020expi" +
"reAfterXDays\030\003 \001(\rH\000B\r\n\013expiryOneof*\212\001\n\n" +
"ExpiryType\022\017\n\013EXPIRE_NONE\020\000\022\030\n\024EXPIRE_ON" +
"_FIXED_DATE\020\001\022\027\n\023EXPIRE_AFTER_X_DAYS\020\002\022 " +
"\n\034EXPIRE_ON_VARIABLE_DATE_TIME\020\003\022\026\n\022EXPI" +
"RE_SET_TO_NULL\020\004BG\n\020com.passkit.grpcZ$st" +
"ash.passkit.com/io/model/sdk/go/io\252\002\014Pas" +
"sKit.Grpcb\006proto3"
};
descriptor = com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
com.passkit.grpc.CommonObjects.getDescriptor(),
});
internal_static_io_ExpirySettings_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_io_ExpirySettings_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_io_ExpirySettings_descriptor,
new java.lang.String[] { "ExpiryType", "FixedExpiryDate", "ExpireAfterXDays", "ExpiryOneof", });
com.passkit.grpc.CommonObjects.getDescriptor();
}
// @@protoc_insertion_point(outer_class_scope)
}