com.passkit.grpc.SingleUseCoupons.CouponOuterClass 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/single_use_coupons/coupon.proto
package com.passkit.grpc.SingleUseCoupons;
public final class CouponOuterClass {
private CouponOuterClass() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistryLite registry) {
}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
registerAllExtensions(
(com.google.protobuf.ExtensionRegistryLite) registry);
}
/**
* Protobuf enum {@code single_use_coupons.CouponStatus}
*/
public enum CouponStatus
implements com.google.protobuf.ProtocolMessageEnum {
/**
*
* Default status when a coupon is issued.
*
*
* UNREDEEMED = 0;
*/
UNREDEEMED(0),
/**
*
* Set after a coupon is redeemed (the redeem endpoint is called).
*
*
* REDEEMED = 1;
*/
REDEEMED(1),
UNRECOGNIZED(-1),
;
/**
*
* Default status when a coupon is issued.
*
*
* UNREDEEMED = 0;
*/
public static final int UNREDEEMED_VALUE = 0;
/**
*
* Set after a coupon is redeemed (the redeem endpoint is called).
*
*
* REDEEMED = 1;
*/
public static final int REDEEMED_VALUE = 1;
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 CouponStatus 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 CouponStatus forNumber(int value) {
switch (value) {
case 0: return UNREDEEMED;
case 1: return REDEEMED;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
CouponStatus> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public CouponStatus findValueByNumber(int number) {
return CouponStatus.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.SingleUseCoupons.CouponOuterClass.getDescriptor().getEnumTypes().get(0);
}
private static final CouponStatus[] VALUES = values();
public static CouponStatus 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 CouponStatus(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:single_use_coupons.CouponStatus)
}
public interface CouponOrBuilder extends
// @@protoc_insertion_point(interface_extends:single_use_coupons.Coupon)
com.google.protobuf.MessageOrBuilder {
/**
*
* PassKit generated coupon id (22 characters).
*
*
* string id = 1;
* @return The id.
*/
java.lang.String getId();
/**
*
* PassKit generated coupon id (22 characters).
*
*
* string id = 1;
* @return The bytes for id.
*/
com.google.protobuf.ByteString
getIdBytes();
/**
*
* This can be used to set the 'external' ID of the coupon (i.e. the unique coupon code as it's being used in your system). If provided then this can be used to query & update coupon. This field will be treated as unique within the campaign, and cannot be updated at a later stage.
*
*
* string externalId = 2;
* @return The externalId.
*/
java.lang.String getExternalId();
/**
*
* This can be used to set the 'external' ID of the coupon (i.e. the unique coupon code as it's being used in your system). If provided then this can be used to query & update coupon. This field will be treated as unique within the campaign, and cannot be updated at a later stage.
*
*
* string externalId = 2;
* @return The bytes for externalId.
*/
com.google.protobuf.ByteString
getExternalIdBytes();
/**
*
* The coupon offer id that the coupon belongs to.
*
*
* string offerId = 3;
* @return The offerId.
*/
java.lang.String getOfferId();
/**
*
* The coupon offer id that the coupon belongs to.
*
*
* string offerId = 3;
* @return The bytes for offerId.
*/
com.google.protobuf.ByteString
getOfferIdBytes();
/**
*
* The coupon campaign id the the coupon belongs to.
*
*
* string campaignId = 4;
* @return The campaignId.
*/
java.lang.String getCampaignId();
/**
*
* The coupon campaign id the the coupon belongs to.
*
*
* string campaignId = 4;
* @return The bytes for campaignId.
*/
com.google.protobuf.ByteString
getCampaignIdBytes();
/**
*
* Optional field if you would like to add PII to the individual coupon. Person is stored encrypted.
*
*
* .io.Person person = 5;
* @return Whether the person field is set.
*/
boolean hasPerson();
/**
*
* Optional field if you would like to add PII to the individual coupon. Person is stored encrypted.
*
*
* .io.Person person = 5;
* @return The person.
*/
com.passkit.grpc.Personal.Person getPerson();
/**
*
* Optional field if you would like to add PII to the individual coupon. Person is stored encrypted.
*
*
* .io.Person person = 5;
*/
com.passkit.grpc.Personal.PersonOrBuilder getPersonOrBuilder();
/**
*
* Any other meta fields for the coupon that are not covered in the protocol (i.e. you might want to captures sign-up location, or favourite perfume, for segmenting later on).
*
*
* map<string, string> metaData = 6;
*/
int getMetaDataCount();
/**
*
* Any other meta fields for the coupon that are not covered in the protocol (i.e. you might want to captures sign-up location, or favourite perfume, for segmenting later on).
*
*
* map<string, string> metaData = 6;
*/
boolean containsMetaData(
java.lang.String key);
/**
* Use {@link #getMetaDataMap()} instead.
*/
@java.lang.Deprecated
java.util.Map
getMetaData();
/**
*
* Any other meta fields for the coupon that are not covered in the protocol (i.e. you might want to captures sign-up location, or favourite perfume, for segmenting later on).
*
*
* map<string, string> metaData = 6;
*/
java.util.Map
getMetaDataMap();
/**
*
* Any other meta fields for the coupon that are not covered in the protocol (i.e. you might want to captures sign-up location, or favourite perfume, for segmenting later on).
*
*
* map<string, string> metaData = 6;
*/
java.lang.String getMetaDataOrDefault(
java.lang.String key,
java.lang.String defaultValue);
/**
*
* Any other meta fields for the coupon that are not covered in the protocol (i.e. you might want to captures sign-up location, or favourite perfume, for segmenting later on).
*
*
* map<string, string> metaData = 6;
*/
java.lang.String getMetaDataOrThrow(
java.lang.String key);
/**
*
* Optional SKU. Can be used in the barcode by setting ${coupon.sku} in the template barcode settings.
*
*
* string sku = 7;
* @return The sku.
*/
java.lang.String getSku();
/**
*
* Optional SKU. Can be used in the barcode by setting ${coupon.sku} in the template barcode settings.
*
*
* string sku = 7;
* @return The bytes for sku.
*/
com.google.protobuf.ByteString
getSkuBytes();
/**
*
* Indicates if the user of the coupon opted out to receive marketing promotions (defaults to false).
*
*
* bool optOut = 8;
* @return The optOut.
*/
boolean getOptOut();
/**
*
* Holds the coupon status.
*
*
* .single_use_coupons.CouponStatus status = 10;
* @return The enum numeric value on the wire for status.
*/
int getStatusValue();
/**
*
* Holds the coupon status.
*
*
* .single_use_coupons.CouponStatus status = 10;
* @return The status.
*/
com.passkit.grpc.SingleUseCoupons.CouponOuterClass.CouponStatus getStatus();
/**
*
* Optional field to set when the coupon expires. When the expiry date hits, it will automatically gray out the barcode. Only applicable if the template for the offer is set to EXPIRE_ON_VARIABLE_DATE_TIME.
*
*
* .google.protobuf.Timestamp expiryDate = 11;
* @return Whether the expiryDate field is set.
*/
boolean hasExpiryDate();
/**
*
* Optional field to set when the coupon expires. When the expiry date hits, it will automatically gray out the barcode. Only applicable if the template for the offer is set to EXPIRE_ON_VARIABLE_DATE_TIME.
*
*
* .google.protobuf.Timestamp expiryDate = 11;
* @return The expiryDate.
*/
com.google.protobuf.Timestamp getExpiryDate();
/**
*
* Optional field to set when the coupon expires. When the expiry date hits, it will automatically gray out the barcode. Only applicable if the template for the offer is set to EXPIRE_ON_VARIABLE_DATE_TIME.
*
*
* .google.protobuf.Timestamp expiryDate = 11;
*/
com.google.protobuf.TimestampOrBuilder getExpiryDateOrBuilder();
/**
*
* Contains details about the redemption (if the coupon is in a redeemed state).
*
*
* .single_use_coupons.RedemptionDetails redemptionDetails = 12;
* @return Whether the redemptionDetails field is set.
*/
boolean hasRedemptionDetails();
/**
*
* Contains details about the redemption (if the coupon is in a redeemed state).
*
*
* .single_use_coupons.RedemptionDetails redemptionDetails = 12;
* @return The redemptionDetails.
*/
com.passkit.grpc.SingleUseCoupons.CouponOuterClass.RedemptionDetails getRedemptionDetails();
/**
*
* Contains details about the redemption (if the coupon is in a redeemed state).
*
*
* .single_use_coupons.RedemptionDetails redemptionDetails = 12;
*/
com.passkit.grpc.SingleUseCoupons.CouponOuterClass.RedemptionDetailsOrBuilder getRedemptionDetailsOrBuilder();
/**
*
* Optional Pass level overrides for proximity & images.
*
*
* .io.PassOverrides passOverrides = 13;
* @return Whether the passOverrides field is set.
*/
boolean hasPassOverrides();
/**
*
* Optional Pass level overrides for proximity & images.
*
*
* .io.PassOverrides passOverrides = 13;
* @return The passOverrides.
*/
com.passkit.grpc.PassOuterClass.PassOverrides getPassOverrides();
/**
*
* Optional Pass level overrides for proximity & images.
*
*
* .io.PassOverrides passOverrides = 13;
*/
com.passkit.grpc.PassOuterClass.PassOverridesOrBuilder getPassOverridesOrBuilder();
/**
*
* Pass Metadata hold meta data about the pass like status, lifecycle, utm details and installation data.
*
*
* .io.Metadata passMetaData = 14;
* @return Whether the passMetaData field is set.
*/
boolean hasPassMetaData();
/**
*
* Pass Metadata hold meta data about the pass like status, lifecycle, utm details and installation data.
*
*
* .io.Metadata passMetaData = 14;
* @return The passMetaData.
*/
com.passkit.grpc.MetricsOuterClass.Metadata getPassMetaData();
/**
*
* Pass Metadata hold meta data about the pass like status, lifecycle, utm details and installation data.
*
*
* .io.Metadata passMetaData = 14;
*/
com.passkit.grpc.MetricsOuterClass.MetadataOrBuilder getPassMetaDataOrBuilder();
/**
*
* The date the coupon was created.
*
*
* .google.protobuf.Timestamp created = 15;
* @return Whether the created field is set.
*/
boolean hasCreated();
/**
*
* The date the coupon was created.
*
*
* .google.protobuf.Timestamp created = 15;
* @return The created.
*/
com.google.protobuf.Timestamp getCreated();
/**
*
* The date the coupon was created.
*
*
* .google.protobuf.Timestamp created = 15;
*/
com.google.protobuf.TimestampOrBuilder getCreatedOrBuilder();
/**
*
* The date the coupon was last updated.
*
*
* .google.protobuf.Timestamp updated = 16;
* @return Whether the updated field is set.
*/
boolean hasUpdated();
/**
*
* The date the coupon was last updated.
*
*
* .google.protobuf.Timestamp updated = 16;
* @return The updated.
*/
com.google.protobuf.Timestamp getUpdated();
/**
*
* The date the coupon was last updated.
*
*
* .google.protobuf.Timestamp updated = 16;
*/
com.google.protobuf.TimestampOrBuilder getUpdatedOrBuilder();
}
/**
*
* The Coupon Details
*
*
* Protobuf type {@code single_use_coupons.Coupon}
*/
public static final class Coupon extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:single_use_coupons.Coupon)
CouponOrBuilder {
private static final long serialVersionUID = 0L;
// Use Coupon.newBuilder() to construct.
private Coupon(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Coupon() {
id_ = "";
externalId_ = "";
offerId_ = "";
campaignId_ = "";
sku_ = "";
status_ = 0;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Coupon();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Coupon(
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();
externalId_ = s;
break;
}
case 26: {
java.lang.String s = input.readStringRequireUtf8();
offerId_ = s;
break;
}
case 34: {
java.lang.String s = input.readStringRequireUtf8();
campaignId_ = s;
break;
}
case 42: {
com.passkit.grpc.Personal.Person.Builder subBuilder = null;
if (person_ != null) {
subBuilder = person_.toBuilder();
}
person_ = input.readMessage(com.passkit.grpc.Personal.Person.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(person_);
person_ = subBuilder.buildPartial();
}
break;
}
case 50: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
metaData_ = com.google.protobuf.MapField.newMapField(
MetaDataDefaultEntryHolder.defaultEntry);
mutable_bitField0_ |= 0x00000001;
}
com.google.protobuf.MapEntry
metaData__ = input.readMessage(
MetaDataDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
metaData_.getMutableMap().put(
metaData__.getKey(), metaData__.getValue());
break;
}
case 58: {
java.lang.String s = input.readStringRequireUtf8();
sku_ = s;
break;
}
case 64: {
optOut_ = input.readBool();
break;
}
case 80: {
int rawValue = input.readEnum();
status_ = rawValue;
break;
}
case 90: {
com.google.protobuf.Timestamp.Builder subBuilder = null;
if (expiryDate_ != null) {
subBuilder = expiryDate_.toBuilder();
}
expiryDate_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(expiryDate_);
expiryDate_ = subBuilder.buildPartial();
}
break;
}
case 98: {
com.passkit.grpc.SingleUseCoupons.CouponOuterClass.RedemptionDetails.Builder subBuilder = null;
if (redemptionDetails_ != null) {
subBuilder = redemptionDetails_.toBuilder();
}
redemptionDetails_ = input.readMessage(com.passkit.grpc.SingleUseCoupons.CouponOuterClass.RedemptionDetails.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(redemptionDetails_);
redemptionDetails_ = subBuilder.buildPartial();
}
break;
}
case 106: {
com.passkit.grpc.PassOuterClass.PassOverrides.Builder subBuilder = null;
if (passOverrides_ != null) {
subBuilder = passOverrides_.toBuilder();
}
passOverrides_ = input.readMessage(com.passkit.grpc.PassOuterClass.PassOverrides.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(passOverrides_);
passOverrides_ = subBuilder.buildPartial();
}
break;
}
case 114: {
com.passkit.grpc.MetricsOuterClass.Metadata.Builder subBuilder = null;
if (passMetaData_ != null) {
subBuilder = passMetaData_.toBuilder();
}
passMetaData_ = input.readMessage(com.passkit.grpc.MetricsOuterClass.Metadata.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(passMetaData_);
passMetaData_ = subBuilder.buildPartial();
}
break;
}
case 122: {
com.google.protobuf.Timestamp.Builder subBuilder = null;
if (created_ != null) {
subBuilder = created_.toBuilder();
}
created_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(created_);
created_ = subBuilder.buildPartial();
}
break;
}
case 130: {
com.google.protobuf.Timestamp.Builder subBuilder = null;
if (updated_ != null) {
subBuilder = updated_.toBuilder();
}
updated_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(updated_);
updated_ = subBuilder.buildPartial();
}
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.SingleUseCoupons.CouponOuterClass.internal_static_single_use_coupons_Coupon_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 6:
return internalGetMetaData();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.passkit.grpc.SingleUseCoupons.CouponOuterClass.internal_static_single_use_coupons_Coupon_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.passkit.grpc.SingleUseCoupons.CouponOuterClass.Coupon.class, com.passkit.grpc.SingleUseCoupons.CouponOuterClass.Coupon.Builder.class);
}
public static final int ID_FIELD_NUMBER = 1;
private volatile java.lang.Object id_;
/**
*
* PassKit generated coupon id (22 characters).
*
*
* 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;
}
}
/**
*
* PassKit generated coupon id (22 characters).
*
*
* 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 EXTERNALID_FIELD_NUMBER = 2;
private volatile java.lang.Object externalId_;
/**
*
* This can be used to set the 'external' ID of the coupon (i.e. the unique coupon code as it's being used in your system). If provided then this can be used to query & update coupon. This field will be treated as unique within the campaign, and cannot be updated at a later stage.
*
*
* string externalId = 2;
* @return The externalId.
*/
@java.lang.Override
public java.lang.String getExternalId() {
java.lang.Object ref = externalId_;
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();
externalId_ = s;
return s;
}
}
/**
*
* This can be used to set the 'external' ID of the coupon (i.e. the unique coupon code as it's being used in your system). If provided then this can be used to query & update coupon. This field will be treated as unique within the campaign, and cannot be updated at a later stage.
*
*
* string externalId = 2;
* @return The bytes for externalId.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getExternalIdBytes() {
java.lang.Object ref = externalId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
externalId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int OFFERID_FIELD_NUMBER = 3;
private volatile java.lang.Object offerId_;
/**
*
* The coupon offer id that the coupon belongs to.
*
*
* string offerId = 3;
* @return The offerId.
*/
@java.lang.Override
public java.lang.String getOfferId() {
java.lang.Object ref = offerId_;
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();
offerId_ = s;
return s;
}
}
/**
*
* The coupon offer id that the coupon belongs to.
*
*
* string offerId = 3;
* @return The bytes for offerId.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getOfferIdBytes() {
java.lang.Object ref = offerId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
offerId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int CAMPAIGNID_FIELD_NUMBER = 4;
private volatile java.lang.Object campaignId_;
/**
*
* The coupon campaign id the the coupon belongs to.
*
*
* string campaignId = 4;
* @return The campaignId.
*/
@java.lang.Override
public java.lang.String getCampaignId() {
java.lang.Object ref = campaignId_;
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();
campaignId_ = s;
return s;
}
}
/**
*
* The coupon campaign id the the coupon belongs to.
*
*
* string campaignId = 4;
* @return The bytes for campaignId.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getCampaignIdBytes() {
java.lang.Object ref = campaignId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
campaignId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int PERSON_FIELD_NUMBER = 5;
private com.passkit.grpc.Personal.Person person_;
/**
*
* Optional field if you would like to add PII to the individual coupon. Person is stored encrypted.
*
*
* .io.Person person = 5;
* @return Whether the person field is set.
*/
@java.lang.Override
public boolean hasPerson() {
return person_ != null;
}
/**
*
* Optional field if you would like to add PII to the individual coupon. Person is stored encrypted.
*
*
* .io.Person person = 5;
* @return The person.
*/
@java.lang.Override
public com.passkit.grpc.Personal.Person getPerson() {
return person_ == null ? com.passkit.grpc.Personal.Person.getDefaultInstance() : person_;
}
/**
*
* Optional field if you would like to add PII to the individual coupon. Person is stored encrypted.
*
*
* .io.Person person = 5;
*/
@java.lang.Override
public com.passkit.grpc.Personal.PersonOrBuilder getPersonOrBuilder() {
return getPerson();
}
public static final int METADATA_FIELD_NUMBER = 6;
private static final class MetaDataDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.String, java.lang.String> defaultEntry =
com.google.protobuf.MapEntry
.newDefaultInstance(
com.passkit.grpc.SingleUseCoupons.CouponOuterClass.internal_static_single_use_coupons_Coupon_MetaDataEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.STRING,
"");
}
private com.google.protobuf.MapField<
java.lang.String, java.lang.String> metaData_;
private com.google.protobuf.MapField
internalGetMetaData() {
if (metaData_ == null) {
return com.google.protobuf.MapField.emptyMapField(
MetaDataDefaultEntryHolder.defaultEntry);
}
return metaData_;
}
public int getMetaDataCount() {
return internalGetMetaData().getMap().size();
}
/**
*
* Any other meta fields for the coupon that are not covered in the protocol (i.e. you might want to captures sign-up location, or favourite perfume, for segmenting later on).
*
*
* map<string, string> metaData = 6;
*/
@java.lang.Override
public boolean containsMetaData(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
return internalGetMetaData().getMap().containsKey(key);
}
/**
* Use {@link #getMetaDataMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getMetaData() {
return getMetaDataMap();
}
/**
*
* Any other meta fields for the coupon that are not covered in the protocol (i.e. you might want to captures sign-up location, or favourite perfume, for segmenting later on).
*
*
* map<string, string> metaData = 6;
*/
@java.lang.Override
public java.util.Map getMetaDataMap() {
return internalGetMetaData().getMap();
}
/**
*
* Any other meta fields for the coupon that are not covered in the protocol (i.e. you might want to captures sign-up location, or favourite perfume, for segmenting later on).
*
*
* map<string, string> metaData = 6;
*/
@java.lang.Override
public java.lang.String getMetaDataOrDefault(
java.lang.String key,
java.lang.String defaultValue) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetMetaData().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* Any other meta fields for the coupon that are not covered in the protocol (i.e. you might want to captures sign-up location, or favourite perfume, for segmenting later on).
*
*
* map<string, string> metaData = 6;
*/
@java.lang.Override
public java.lang.String getMetaDataOrThrow(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetMetaData().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public static final int SKU_FIELD_NUMBER = 7;
private volatile java.lang.Object sku_;
/**
*
* Optional SKU. Can be used in the barcode by setting ${coupon.sku} in the template barcode settings.
*
*
* string sku = 7;
* @return The sku.
*/
@java.lang.Override
public java.lang.String getSku() {
java.lang.Object ref = sku_;
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();
sku_ = s;
return s;
}
}
/**
*
* Optional SKU. Can be used in the barcode by setting ${coupon.sku} in the template barcode settings.
*
*
* string sku = 7;
* @return The bytes for sku.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getSkuBytes() {
java.lang.Object ref = sku_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
sku_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int OPTOUT_FIELD_NUMBER = 8;
private boolean optOut_;
/**
*
* Indicates if the user of the coupon opted out to receive marketing promotions (defaults to false).
*
*
* bool optOut = 8;
* @return The optOut.
*/
@java.lang.Override
public boolean getOptOut() {
return optOut_;
}
public static final int STATUS_FIELD_NUMBER = 10;
private int status_;
/**
*
* Holds the coupon status.
*
*
* .single_use_coupons.CouponStatus status = 10;
* @return The enum numeric value on the wire for status.
*/
@java.lang.Override public int getStatusValue() {
return status_;
}
/**
*
* Holds the coupon status.
*
*
* .single_use_coupons.CouponStatus status = 10;
* @return The status.
*/
@java.lang.Override public com.passkit.grpc.SingleUseCoupons.CouponOuterClass.CouponStatus getStatus() {
@SuppressWarnings("deprecation")
com.passkit.grpc.SingleUseCoupons.CouponOuterClass.CouponStatus result = com.passkit.grpc.SingleUseCoupons.CouponOuterClass.CouponStatus.valueOf(status_);
return result == null ? com.passkit.grpc.SingleUseCoupons.CouponOuterClass.CouponStatus.UNRECOGNIZED : result;
}
public static final int EXPIRYDATE_FIELD_NUMBER = 11;
private com.google.protobuf.Timestamp expiryDate_;
/**
*
* Optional field to set when the coupon expires. When the expiry date hits, it will automatically gray out the barcode. Only applicable if the template for the offer is set to EXPIRE_ON_VARIABLE_DATE_TIME.
*
*
* .google.protobuf.Timestamp expiryDate = 11;
* @return Whether the expiryDate field is set.
*/
@java.lang.Override
public boolean hasExpiryDate() {
return expiryDate_ != null;
}
/**
*
* Optional field to set when the coupon expires. When the expiry date hits, it will automatically gray out the barcode. Only applicable if the template for the offer is set to EXPIRE_ON_VARIABLE_DATE_TIME.
*
*
* .google.protobuf.Timestamp expiryDate = 11;
* @return The expiryDate.
*/
@java.lang.Override
public com.google.protobuf.Timestamp getExpiryDate() {
return expiryDate_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : expiryDate_;
}
/**
*
* Optional field to set when the coupon expires. When the expiry date hits, it will automatically gray out the barcode. Only applicable if the template for the offer is set to EXPIRE_ON_VARIABLE_DATE_TIME.
*
*
* .google.protobuf.Timestamp expiryDate = 11;
*/
@java.lang.Override
public com.google.protobuf.TimestampOrBuilder getExpiryDateOrBuilder() {
return getExpiryDate();
}
public static final int REDEMPTIONDETAILS_FIELD_NUMBER = 12;
private com.passkit.grpc.SingleUseCoupons.CouponOuterClass.RedemptionDetails redemptionDetails_;
/**
*
* Contains details about the redemption (if the coupon is in a redeemed state).
*
*
* .single_use_coupons.RedemptionDetails redemptionDetails = 12;
* @return Whether the redemptionDetails field is set.
*/
@java.lang.Override
public boolean hasRedemptionDetails() {
return redemptionDetails_ != null;
}
/**
*
* Contains details about the redemption (if the coupon is in a redeemed state).
*
*
* .single_use_coupons.RedemptionDetails redemptionDetails = 12;
* @return The redemptionDetails.
*/
@java.lang.Override
public com.passkit.grpc.SingleUseCoupons.CouponOuterClass.RedemptionDetails getRedemptionDetails() {
return redemptionDetails_ == null ? com.passkit.grpc.SingleUseCoupons.CouponOuterClass.RedemptionDetails.getDefaultInstance() : redemptionDetails_;
}
/**
*
* Contains details about the redemption (if the coupon is in a redeemed state).
*
*
* .single_use_coupons.RedemptionDetails redemptionDetails = 12;
*/
@java.lang.Override
public com.passkit.grpc.SingleUseCoupons.CouponOuterClass.RedemptionDetailsOrBuilder getRedemptionDetailsOrBuilder() {
return getRedemptionDetails();
}
public static final int PASSOVERRIDES_FIELD_NUMBER = 13;
private com.passkit.grpc.PassOuterClass.PassOverrides passOverrides_;
/**
*
* Optional Pass level overrides for proximity & images.
*
*
* .io.PassOverrides passOverrides = 13;
* @return Whether the passOverrides field is set.
*/
@java.lang.Override
public boolean hasPassOverrides() {
return passOverrides_ != null;
}
/**
*
* Optional Pass level overrides for proximity & images.
*
*
* .io.PassOverrides passOverrides = 13;
* @return The passOverrides.
*/
@java.lang.Override
public com.passkit.grpc.PassOuterClass.PassOverrides getPassOverrides() {
return passOverrides_ == null ? com.passkit.grpc.PassOuterClass.PassOverrides.getDefaultInstance() : passOverrides_;
}
/**
*
* Optional Pass level overrides for proximity & images.
*
*
* .io.PassOverrides passOverrides = 13;
*/
@java.lang.Override
public com.passkit.grpc.PassOuterClass.PassOverridesOrBuilder getPassOverridesOrBuilder() {
return getPassOverrides();
}
public static final int PASSMETADATA_FIELD_NUMBER = 14;
private com.passkit.grpc.MetricsOuterClass.Metadata passMetaData_;
/**
*
* Pass Metadata hold meta data about the pass like status, lifecycle, utm details and installation data.
*
*
* .io.Metadata passMetaData = 14;
* @return Whether the passMetaData field is set.
*/
@java.lang.Override
public boolean hasPassMetaData() {
return passMetaData_ != null;
}
/**
*
* Pass Metadata hold meta data about the pass like status, lifecycle, utm details and installation data.
*
*
* .io.Metadata passMetaData = 14;
* @return The passMetaData.
*/
@java.lang.Override
public com.passkit.grpc.MetricsOuterClass.Metadata getPassMetaData() {
return passMetaData_ == null ? com.passkit.grpc.MetricsOuterClass.Metadata.getDefaultInstance() : passMetaData_;
}
/**
*
* Pass Metadata hold meta data about the pass like status, lifecycle, utm details and installation data.
*
*
* .io.Metadata passMetaData = 14;
*/
@java.lang.Override
public com.passkit.grpc.MetricsOuterClass.MetadataOrBuilder getPassMetaDataOrBuilder() {
return getPassMetaData();
}
public static final int CREATED_FIELD_NUMBER = 15;
private com.google.protobuf.Timestamp created_;
/**
*
* The date the coupon was created.
*
*
* .google.protobuf.Timestamp created = 15;
* @return Whether the created field is set.
*/
@java.lang.Override
public boolean hasCreated() {
return created_ != null;
}
/**
*
* The date the coupon was created.
*
*
* .google.protobuf.Timestamp created = 15;
* @return The created.
*/
@java.lang.Override
public com.google.protobuf.Timestamp getCreated() {
return created_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : created_;
}
/**
*
* The date the coupon was created.
*
*
* .google.protobuf.Timestamp created = 15;
*/
@java.lang.Override
public com.google.protobuf.TimestampOrBuilder getCreatedOrBuilder() {
return getCreated();
}
public static final int UPDATED_FIELD_NUMBER = 16;
private com.google.protobuf.Timestamp updated_;
/**
*
* The date the coupon was last updated.
*
*
* .google.protobuf.Timestamp updated = 16;
* @return Whether the updated field is set.
*/
@java.lang.Override
public boolean hasUpdated() {
return updated_ != null;
}
/**
*
* The date the coupon was last updated.
*
*
* .google.protobuf.Timestamp updated = 16;
* @return The updated.
*/
@java.lang.Override
public com.google.protobuf.Timestamp getUpdated() {
return updated_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updated_;
}
/**
*
* The date the coupon was last updated.
*
*
* .google.protobuf.Timestamp updated = 16;
*/
@java.lang.Override
public com.google.protobuf.TimestampOrBuilder getUpdatedOrBuilder() {
return getUpdated();
}
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 (!getIdBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_);
}
if (!getExternalIdBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, externalId_);
}
if (!getOfferIdBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, offerId_);
}
if (!getCampaignIdBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, campaignId_);
}
if (person_ != null) {
output.writeMessage(5, getPerson());
}
com.google.protobuf.GeneratedMessageV3
.serializeStringMapTo(
output,
internalGetMetaData(),
MetaDataDefaultEntryHolder.defaultEntry,
6);
if (!getSkuBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 7, sku_);
}
if (optOut_ != false) {
output.writeBool(8, optOut_);
}
if (status_ != com.passkit.grpc.SingleUseCoupons.CouponOuterClass.CouponStatus.UNREDEEMED.getNumber()) {
output.writeEnum(10, status_);
}
if (expiryDate_ != null) {
output.writeMessage(11, getExpiryDate());
}
if (redemptionDetails_ != null) {
output.writeMessage(12, getRedemptionDetails());
}
if (passOverrides_ != null) {
output.writeMessage(13, getPassOverrides());
}
if (passMetaData_ != null) {
output.writeMessage(14, getPassMetaData());
}
if (created_ != null) {
output.writeMessage(15, getCreated());
}
if (updated_ != null) {
output.writeMessage(16, getUpdated());
}
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 (!getExternalIdBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, externalId_);
}
if (!getOfferIdBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, offerId_);
}
if (!getCampaignIdBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, campaignId_);
}
if (person_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, getPerson());
}
for (java.util.Map.Entry entry
: internalGetMetaData().getMap().entrySet()) {
com.google.protobuf.MapEntry
metaData__ = MetaDataDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(6, metaData__);
}
if (!getSkuBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, sku_);
}
if (optOut_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(8, optOut_);
}
if (status_ != com.passkit.grpc.SingleUseCoupons.CouponOuterClass.CouponStatus.UNREDEEMED.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(10, status_);
}
if (expiryDate_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(11, getExpiryDate());
}
if (redemptionDetails_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(12, getRedemptionDetails());
}
if (passOverrides_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(13, getPassOverrides());
}
if (passMetaData_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(14, getPassMetaData());
}
if (created_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(15, getCreated());
}
if (updated_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(16, getUpdated());
}
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.SingleUseCoupons.CouponOuterClass.Coupon)) {
return super.equals(obj);
}
com.passkit.grpc.SingleUseCoupons.CouponOuterClass.Coupon other = (com.passkit.grpc.SingleUseCoupons.CouponOuterClass.Coupon) obj;
if (!getId()
.equals(other.getId())) return false;
if (!getExternalId()
.equals(other.getExternalId())) return false;
if (!getOfferId()
.equals(other.getOfferId())) return false;
if (!getCampaignId()
.equals(other.getCampaignId())) return false;
if (hasPerson() != other.hasPerson()) return false;
if (hasPerson()) {
if (!getPerson()
.equals(other.getPerson())) return false;
}
if (!internalGetMetaData().equals(
other.internalGetMetaData())) return false;
if (!getSku()
.equals(other.getSku())) return false;
if (getOptOut()
!= other.getOptOut()) return false;
if (status_ != other.status_) return false;
if (hasExpiryDate() != other.hasExpiryDate()) return false;
if (hasExpiryDate()) {
if (!getExpiryDate()
.equals(other.getExpiryDate())) return false;
}
if (hasRedemptionDetails() != other.hasRedemptionDetails()) return false;
if (hasRedemptionDetails()) {
if (!getRedemptionDetails()
.equals(other.getRedemptionDetails())) return false;
}
if (hasPassOverrides() != other.hasPassOverrides()) return false;
if (hasPassOverrides()) {
if (!getPassOverrides()
.equals(other.getPassOverrides())) return false;
}
if (hasPassMetaData() != other.hasPassMetaData()) return false;
if (hasPassMetaData()) {
if (!getPassMetaData()
.equals(other.getPassMetaData())) return false;
}
if (hasCreated() != other.hasCreated()) return false;
if (hasCreated()) {
if (!getCreated()
.equals(other.getCreated())) return false;
}
if (hasUpdated() != other.hasUpdated()) return false;
if (hasUpdated()) {
if (!getUpdated()
.equals(other.getUpdated())) 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) + EXTERNALID_FIELD_NUMBER;
hash = (53 * hash) + getExternalId().hashCode();
hash = (37 * hash) + OFFERID_FIELD_NUMBER;
hash = (53 * hash) + getOfferId().hashCode();
hash = (37 * hash) + CAMPAIGNID_FIELD_NUMBER;
hash = (53 * hash) + getCampaignId().hashCode();
if (hasPerson()) {
hash = (37 * hash) + PERSON_FIELD_NUMBER;
hash = (53 * hash) + getPerson().hashCode();
}
if (!internalGetMetaData().getMap().isEmpty()) {
hash = (37 * hash) + METADATA_FIELD_NUMBER;
hash = (53 * hash) + internalGetMetaData().hashCode();
}
hash = (37 * hash) + SKU_FIELD_NUMBER;
hash = (53 * hash) + getSku().hashCode();
hash = (37 * hash) + OPTOUT_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getOptOut());
hash = (37 * hash) + STATUS_FIELD_NUMBER;
hash = (53 * hash) + status_;
if (hasExpiryDate()) {
hash = (37 * hash) + EXPIRYDATE_FIELD_NUMBER;
hash = (53 * hash) + getExpiryDate().hashCode();
}
if (hasRedemptionDetails()) {
hash = (37 * hash) + REDEMPTIONDETAILS_FIELD_NUMBER;
hash = (53 * hash) + getRedemptionDetails().hashCode();
}
if (hasPassOverrides()) {
hash = (37 * hash) + PASSOVERRIDES_FIELD_NUMBER;
hash = (53 * hash) + getPassOverrides().hashCode();
}
if (hasPassMetaData()) {
hash = (37 * hash) + PASSMETADATA_FIELD_NUMBER;
hash = (53 * hash) + getPassMetaData().hashCode();
}
if (hasCreated()) {
hash = (37 * hash) + CREATED_FIELD_NUMBER;
hash = (53 * hash) + getCreated().hashCode();
}
if (hasUpdated()) {
hash = (37 * hash) + UPDATED_FIELD_NUMBER;
hash = (53 * hash) + getUpdated().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.passkit.grpc.SingleUseCoupons.CouponOuterClass.Coupon parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.passkit.grpc.SingleUseCoupons.CouponOuterClass.Coupon 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.SingleUseCoupons.CouponOuterClass.Coupon parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.passkit.grpc.SingleUseCoupons.CouponOuterClass.Coupon 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.SingleUseCoupons.CouponOuterClass.Coupon parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.passkit.grpc.SingleUseCoupons.CouponOuterClass.Coupon parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.passkit.grpc.SingleUseCoupons.CouponOuterClass.Coupon parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.passkit.grpc.SingleUseCoupons.CouponOuterClass.Coupon 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.SingleUseCoupons.CouponOuterClass.Coupon parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.passkit.grpc.SingleUseCoupons.CouponOuterClass.Coupon 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.SingleUseCoupons.CouponOuterClass.Coupon parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.passkit.grpc.SingleUseCoupons.CouponOuterClass.Coupon 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.SingleUseCoupons.CouponOuterClass.Coupon 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 Coupon Details
*
*
* Protobuf type {@code single_use_coupons.Coupon}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:single_use_coupons.Coupon)
com.passkit.grpc.SingleUseCoupons.CouponOuterClass.CouponOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.passkit.grpc.SingleUseCoupons.CouponOuterClass.internal_static_single_use_coupons_Coupon_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 6:
return internalGetMetaData();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMutableMapField(
int number) {
switch (number) {
case 6:
return internalGetMutableMetaData();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.passkit.grpc.SingleUseCoupons.CouponOuterClass.internal_static_single_use_coupons_Coupon_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.passkit.grpc.SingleUseCoupons.CouponOuterClass.Coupon.class, com.passkit.grpc.SingleUseCoupons.CouponOuterClass.Coupon.Builder.class);
}
// Construct using com.passkit.grpc.SingleUseCoupons.CouponOuterClass.Coupon.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_ = "";
externalId_ = "";
offerId_ = "";
campaignId_ = "";
if (personBuilder_ == null) {
person_ = null;
} else {
person_ = null;
personBuilder_ = null;
}
internalGetMutableMetaData().clear();
sku_ = "";
optOut_ = false;
status_ = 0;
if (expiryDateBuilder_ == null) {
expiryDate_ = null;
} else {
expiryDate_ = null;
expiryDateBuilder_ = null;
}
if (redemptionDetailsBuilder_ == null) {
redemptionDetails_ = null;
} else {
redemptionDetails_ = null;
redemptionDetailsBuilder_ = null;
}
if (passOverridesBuilder_ == null) {
passOverrides_ = null;
} else {
passOverrides_ = null;
passOverridesBuilder_ = null;
}
if (passMetaDataBuilder_ == null) {
passMetaData_ = null;
} else {
passMetaData_ = null;
passMetaDataBuilder_ = null;
}
if (createdBuilder_ == null) {
created_ = null;
} else {
created_ = null;
createdBuilder_ = null;
}
if (updatedBuilder_ == null) {
updated_ = null;
} else {
updated_ = null;
updatedBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.passkit.grpc.SingleUseCoupons.CouponOuterClass.internal_static_single_use_coupons_Coupon_descriptor;
}
@java.lang.Override
public com.passkit.grpc.SingleUseCoupons.CouponOuterClass.Coupon getDefaultInstanceForType() {
return com.passkit.grpc.SingleUseCoupons.CouponOuterClass.Coupon.getDefaultInstance();
}
@java.lang.Override
public com.passkit.grpc.SingleUseCoupons.CouponOuterClass.Coupon build() {
com.passkit.grpc.SingleUseCoupons.CouponOuterClass.Coupon result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.passkit.grpc.SingleUseCoupons.CouponOuterClass.Coupon buildPartial() {
com.passkit.grpc.SingleUseCoupons.CouponOuterClass.Coupon result = new com.passkit.grpc.SingleUseCoupons.CouponOuterClass.Coupon(this);
int from_bitField0_ = bitField0_;
result.id_ = id_;
result.externalId_ = externalId_;
result.offerId_ = offerId_;
result.campaignId_ = campaignId_;
if (personBuilder_ == null) {
result.person_ = person_;
} else {
result.person_ = personBuilder_.build();
}
result.metaData_ = internalGetMetaData();
result.metaData_.makeImmutable();
result.sku_ = sku_;
result.optOut_ = optOut_;
result.status_ = status_;
if (expiryDateBuilder_ == null) {
result.expiryDate_ = expiryDate_;
} else {
result.expiryDate_ = expiryDateBuilder_.build();
}
if (redemptionDetailsBuilder_ == null) {
result.redemptionDetails_ = redemptionDetails_;
} else {
result.redemptionDetails_ = redemptionDetailsBuilder_.build();
}
if (passOverridesBuilder_ == null) {
result.passOverrides_ = passOverrides_;
} else {
result.passOverrides_ = passOverridesBuilder_.build();
}
if (passMetaDataBuilder_ == null) {
result.passMetaData_ = passMetaData_;
} else {
result.passMetaData_ = passMetaDataBuilder_.build();
}
if (createdBuilder_ == null) {
result.created_ = created_;
} else {
result.created_ = createdBuilder_.build();
}
if (updatedBuilder_ == null) {
result.updated_ = updated_;
} else {
result.updated_ = updatedBuilder_.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.SingleUseCoupons.CouponOuterClass.Coupon) {
return mergeFrom((com.passkit.grpc.SingleUseCoupons.CouponOuterClass.Coupon)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.passkit.grpc.SingleUseCoupons.CouponOuterClass.Coupon other) {
if (other == com.passkit.grpc.SingleUseCoupons.CouponOuterClass.Coupon.getDefaultInstance()) return this;
if (!other.getId().isEmpty()) {
id_ = other.id_;
onChanged();
}
if (!other.getExternalId().isEmpty()) {
externalId_ = other.externalId_;
onChanged();
}
if (!other.getOfferId().isEmpty()) {
offerId_ = other.offerId_;
onChanged();
}
if (!other.getCampaignId().isEmpty()) {
campaignId_ = other.campaignId_;
onChanged();
}
if (other.hasPerson()) {
mergePerson(other.getPerson());
}
internalGetMutableMetaData().mergeFrom(
other.internalGetMetaData());
if (!other.getSku().isEmpty()) {
sku_ = other.sku_;
onChanged();
}
if (other.getOptOut() != false) {
setOptOut(other.getOptOut());
}
if (other.status_ != 0) {
setStatusValue(other.getStatusValue());
}
if (other.hasExpiryDate()) {
mergeExpiryDate(other.getExpiryDate());
}
if (other.hasRedemptionDetails()) {
mergeRedemptionDetails(other.getRedemptionDetails());
}
if (other.hasPassOverrides()) {
mergePassOverrides(other.getPassOverrides());
}
if (other.hasPassMetaData()) {
mergePassMetaData(other.getPassMetaData());
}
if (other.hasCreated()) {
mergeCreated(other.getCreated());
}
if (other.hasUpdated()) {
mergeUpdated(other.getUpdated());
}
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.SingleUseCoupons.CouponOuterClass.Coupon parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.passkit.grpc.SingleUseCoupons.CouponOuterClass.Coupon) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object id_ = "";
/**
*
* PassKit generated coupon id (22 characters).
*
*
* 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;
}
}
/**
*
* PassKit generated coupon id (22 characters).
*
*
* 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;
}
}
/**
*
* PassKit generated coupon id (22 characters).
*
*
* 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;
}
/**
*
* PassKit generated coupon id (22 characters).
*
*
* string id = 1;
* @return This builder for chaining.
*/
public Builder clearId() {
id_ = getDefaultInstance().getId();
onChanged();
return this;
}
/**
*
* PassKit generated coupon id (22 characters).
*
*
* 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 externalId_ = "";
/**
*
* This can be used to set the 'external' ID of the coupon (i.e. the unique coupon code as it's being used in your system). If provided then this can be used to query & update coupon. This field will be treated as unique within the campaign, and cannot be updated at a later stage.
*
*
* string externalId = 2;
* @return The externalId.
*/
public java.lang.String getExternalId() {
java.lang.Object ref = externalId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
externalId_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* This can be used to set the 'external' ID of the coupon (i.e. the unique coupon code as it's being used in your system). If provided then this can be used to query & update coupon. This field will be treated as unique within the campaign, and cannot be updated at a later stage.
*
*
* string externalId = 2;
* @return The bytes for externalId.
*/
public com.google.protobuf.ByteString
getExternalIdBytes() {
java.lang.Object ref = externalId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
externalId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* This can be used to set the 'external' ID of the coupon (i.e. the unique coupon code as it's being used in your system). If provided then this can be used to query & update coupon. This field will be treated as unique within the campaign, and cannot be updated at a later stage.
*
*
* string externalId = 2;
* @param value The externalId to set.
* @return This builder for chaining.
*/
public Builder setExternalId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
externalId_ = value;
onChanged();
return this;
}
/**
*
* This can be used to set the 'external' ID of the coupon (i.e. the unique coupon code as it's being used in your system). If provided then this can be used to query & update coupon. This field will be treated as unique within the campaign, and cannot be updated at a later stage.
*
*
* string externalId = 2;
* @return This builder for chaining.
*/
public Builder clearExternalId() {
externalId_ = getDefaultInstance().getExternalId();
onChanged();
return this;
}
/**
*
* This can be used to set the 'external' ID of the coupon (i.e. the unique coupon code as it's being used in your system). If provided then this can be used to query & update coupon. This field will be treated as unique within the campaign, and cannot be updated at a later stage.
*
*
* string externalId = 2;
* @param value The bytes for externalId to set.
* @return This builder for chaining.
*/
public Builder setExternalIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
externalId_ = value;
onChanged();
return this;
}
private java.lang.Object offerId_ = "";
/**
*
* The coupon offer id that the coupon belongs to.
*
*
* string offerId = 3;
* @return The offerId.
*/
public java.lang.String getOfferId() {
java.lang.Object ref = offerId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
offerId_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The coupon offer id that the coupon belongs to.
*
*
* string offerId = 3;
* @return The bytes for offerId.
*/
public com.google.protobuf.ByteString
getOfferIdBytes() {
java.lang.Object ref = offerId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
offerId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The coupon offer id that the coupon belongs to.
*
*
* string offerId = 3;
* @param value The offerId to set.
* @return This builder for chaining.
*/
public Builder setOfferId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
offerId_ = value;
onChanged();
return this;
}
/**
*
* The coupon offer id that the coupon belongs to.
*
*
* string offerId = 3;
* @return This builder for chaining.
*/
public Builder clearOfferId() {
offerId_ = getDefaultInstance().getOfferId();
onChanged();
return this;
}
/**
*
* The coupon offer id that the coupon belongs to.
*
*
* string offerId = 3;
* @param value The bytes for offerId to set.
* @return This builder for chaining.
*/
public Builder setOfferIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
offerId_ = value;
onChanged();
return this;
}
private java.lang.Object campaignId_ = "";
/**
*
* The coupon campaign id the the coupon belongs to.
*
*
* string campaignId = 4;
* @return The campaignId.
*/
public java.lang.String getCampaignId() {
java.lang.Object ref = campaignId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
campaignId_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The coupon campaign id the the coupon belongs to.
*
*
* string campaignId = 4;
* @return The bytes for campaignId.
*/
public com.google.protobuf.ByteString
getCampaignIdBytes() {
java.lang.Object ref = campaignId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
campaignId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The coupon campaign id the the coupon belongs to.
*
*
* string campaignId = 4;
* @param value The campaignId to set.
* @return This builder for chaining.
*/
public Builder setCampaignId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
campaignId_ = value;
onChanged();
return this;
}
/**
*
* The coupon campaign id the the coupon belongs to.
*
*
* string campaignId = 4;
* @return This builder for chaining.
*/
public Builder clearCampaignId() {
campaignId_ = getDefaultInstance().getCampaignId();
onChanged();
return this;
}
/**
*
* The coupon campaign id the the coupon belongs to.
*
*
* string campaignId = 4;
* @param value The bytes for campaignId to set.
* @return This builder for chaining.
*/
public Builder setCampaignIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
campaignId_ = value;
onChanged();
return this;
}
private com.passkit.grpc.Personal.Person person_;
private com.google.protobuf.SingleFieldBuilderV3<
com.passkit.grpc.Personal.Person, com.passkit.grpc.Personal.Person.Builder, com.passkit.grpc.Personal.PersonOrBuilder> personBuilder_;
/**
*
* Optional field if you would like to add PII to the individual coupon. Person is stored encrypted.
*
*
* .io.Person person = 5;
* @return Whether the person field is set.
*/
public boolean hasPerson() {
return personBuilder_ != null || person_ != null;
}
/**
*
* Optional field if you would like to add PII to the individual coupon. Person is stored encrypted.
*
*
* .io.Person person = 5;
* @return The person.
*/
public com.passkit.grpc.Personal.Person getPerson() {
if (personBuilder_ == null) {
return person_ == null ? com.passkit.grpc.Personal.Person.getDefaultInstance() : person_;
} else {
return personBuilder_.getMessage();
}
}
/**
*
* Optional field if you would like to add PII to the individual coupon. Person is stored encrypted.
*
*
* .io.Person person = 5;
*/
public Builder setPerson(com.passkit.grpc.Personal.Person value) {
if (personBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
person_ = value;
onChanged();
} else {
personBuilder_.setMessage(value);
}
return this;
}
/**
*
* Optional field if you would like to add PII to the individual coupon. Person is stored encrypted.
*
*
* .io.Person person = 5;
*/
public Builder setPerson(
com.passkit.grpc.Personal.Person.Builder builderForValue) {
if (personBuilder_ == null) {
person_ = builderForValue.build();
onChanged();
} else {
personBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Optional field if you would like to add PII to the individual coupon. Person is stored encrypted.
*
*
* .io.Person person = 5;
*/
public Builder mergePerson(com.passkit.grpc.Personal.Person value) {
if (personBuilder_ == null) {
if (person_ != null) {
person_ =
com.passkit.grpc.Personal.Person.newBuilder(person_).mergeFrom(value).buildPartial();
} else {
person_ = value;
}
onChanged();
} else {
personBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Optional field if you would like to add PII to the individual coupon. Person is stored encrypted.
*
*
* .io.Person person = 5;
*/
public Builder clearPerson() {
if (personBuilder_ == null) {
person_ = null;
onChanged();
} else {
person_ = null;
personBuilder_ = null;
}
return this;
}
/**
*
* Optional field if you would like to add PII to the individual coupon. Person is stored encrypted.
*
*
* .io.Person person = 5;
*/
public com.passkit.grpc.Personal.Person.Builder getPersonBuilder() {
onChanged();
return getPersonFieldBuilder().getBuilder();
}
/**
*
* Optional field if you would like to add PII to the individual coupon. Person is stored encrypted.
*
*
* .io.Person person = 5;
*/
public com.passkit.grpc.Personal.PersonOrBuilder getPersonOrBuilder() {
if (personBuilder_ != null) {
return personBuilder_.getMessageOrBuilder();
} else {
return person_ == null ?
com.passkit.grpc.Personal.Person.getDefaultInstance() : person_;
}
}
/**
*
* Optional field if you would like to add PII to the individual coupon. Person is stored encrypted.
*
*
* .io.Person person = 5;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.passkit.grpc.Personal.Person, com.passkit.grpc.Personal.Person.Builder, com.passkit.grpc.Personal.PersonOrBuilder>
getPersonFieldBuilder() {
if (personBuilder_ == null) {
personBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.passkit.grpc.Personal.Person, com.passkit.grpc.Personal.Person.Builder, com.passkit.grpc.Personal.PersonOrBuilder>(
getPerson(),
getParentForChildren(),
isClean());
person_ = null;
}
return personBuilder_;
}
private com.google.protobuf.MapField<
java.lang.String, java.lang.String> metaData_;
private com.google.protobuf.MapField
internalGetMetaData() {
if (metaData_ == null) {
return com.google.protobuf.MapField.emptyMapField(
MetaDataDefaultEntryHolder.defaultEntry);
}
return metaData_;
}
private com.google.protobuf.MapField
internalGetMutableMetaData() {
onChanged();;
if (metaData_ == null) {
metaData_ = com.google.protobuf.MapField.newMapField(
MetaDataDefaultEntryHolder.defaultEntry);
}
if (!metaData_.isMutable()) {
metaData_ = metaData_.copy();
}
return metaData_;
}
public int getMetaDataCount() {
return internalGetMetaData().getMap().size();
}
/**
*
* Any other meta fields for the coupon that are not covered in the protocol (i.e. you might want to captures sign-up location, or favourite perfume, for segmenting later on).
*
*
* map<string, string> metaData = 6;
*/
@java.lang.Override
public boolean containsMetaData(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
return internalGetMetaData().getMap().containsKey(key);
}
/**
* Use {@link #getMetaDataMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getMetaData() {
return getMetaDataMap();
}
/**
*
* Any other meta fields for the coupon that are not covered in the protocol (i.e. you might want to captures sign-up location, or favourite perfume, for segmenting later on).
*
*
* map<string, string> metaData = 6;
*/
@java.lang.Override
public java.util.Map getMetaDataMap() {
return internalGetMetaData().getMap();
}
/**
*
* Any other meta fields for the coupon that are not covered in the protocol (i.e. you might want to captures sign-up location, or favourite perfume, for segmenting later on).
*
*
* map<string, string> metaData = 6;
*/
@java.lang.Override
public java.lang.String getMetaDataOrDefault(
java.lang.String key,
java.lang.String defaultValue) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetMetaData().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* Any other meta fields for the coupon that are not covered in the protocol (i.e. you might want to captures sign-up location, or favourite perfume, for segmenting later on).
*
*
* map<string, string> metaData = 6;
*/
@java.lang.Override
public java.lang.String getMetaDataOrThrow(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetMetaData().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearMetaData() {
internalGetMutableMetaData().getMutableMap()
.clear();
return this;
}
/**
*
* Any other meta fields for the coupon that are not covered in the protocol (i.e. you might want to captures sign-up location, or favourite perfume, for segmenting later on).
*
*
* map<string, string> metaData = 6;
*/
public Builder removeMetaData(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
internalGetMutableMetaData().getMutableMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutableMetaData() {
return internalGetMutableMetaData().getMutableMap();
}
/**
*
* Any other meta fields for the coupon that are not covered in the protocol (i.e. you might want to captures sign-up location, or favourite perfume, for segmenting later on).
*
*
* map<string, string> metaData = 6;
*/
public Builder putMetaData(
java.lang.String key,
java.lang.String value) {
if (key == null) { throw new java.lang.NullPointerException(); }
if (value == null) { throw new java.lang.NullPointerException(); }
internalGetMutableMetaData().getMutableMap()
.put(key, value);
return this;
}
/**
*
* Any other meta fields for the coupon that are not covered in the protocol (i.e. you might want to captures sign-up location, or favourite perfume, for segmenting later on).
*
*
* map<string, string> metaData = 6;
*/
public Builder putAllMetaData(
java.util.Map values) {
internalGetMutableMetaData().getMutableMap()
.putAll(values);
return this;
}
private java.lang.Object sku_ = "";
/**
*
* Optional SKU. Can be used in the barcode by setting ${coupon.sku} in the template barcode settings.
*
*
* string sku = 7;
* @return The sku.
*/
public java.lang.String getSku() {
java.lang.Object ref = sku_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
sku_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Optional SKU. Can be used in the barcode by setting ${coupon.sku} in the template barcode settings.
*
*
* string sku = 7;
* @return The bytes for sku.
*/
public com.google.protobuf.ByteString
getSkuBytes() {
java.lang.Object ref = sku_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
sku_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Optional SKU. Can be used in the barcode by setting ${coupon.sku} in the template barcode settings.
*
*
* string sku = 7;
* @param value The sku to set.
* @return This builder for chaining.
*/
public Builder setSku(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
sku_ = value;
onChanged();
return this;
}
/**
*
* Optional SKU. Can be used in the barcode by setting ${coupon.sku} in the template barcode settings.
*
*
* string sku = 7;
* @return This builder for chaining.
*/
public Builder clearSku() {
sku_ = getDefaultInstance().getSku();
onChanged();
return this;
}
/**
*
* Optional SKU. Can be used in the barcode by setting ${coupon.sku} in the template barcode settings.
*
*
* string sku = 7;
* @param value The bytes for sku to set.
* @return This builder for chaining.
*/
public Builder setSkuBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
sku_ = value;
onChanged();
return this;
}
private boolean optOut_ ;
/**
*
* Indicates if the user of the coupon opted out to receive marketing promotions (defaults to false).
*
*
* bool optOut = 8;
* @return The optOut.
*/
@java.lang.Override
public boolean getOptOut() {
return optOut_;
}
/**
*
* Indicates if the user of the coupon opted out to receive marketing promotions (defaults to false).
*
*
* bool optOut = 8;
* @param value The optOut to set.
* @return This builder for chaining.
*/
public Builder setOptOut(boolean value) {
optOut_ = value;
onChanged();
return this;
}
/**
*
* Indicates if the user of the coupon opted out to receive marketing promotions (defaults to false).
*
*
* bool optOut = 8;
* @return This builder for chaining.
*/
public Builder clearOptOut() {
optOut_ = false;
onChanged();
return this;
}
private int status_ = 0;
/**
*
* Holds the coupon status.
*
*
* .single_use_coupons.CouponStatus status = 10;
* @return The enum numeric value on the wire for status.
*/
@java.lang.Override public int getStatusValue() {
return status_;
}
/**
*
* Holds the coupon status.
*
*
* .single_use_coupons.CouponStatus status = 10;
* @param value The enum numeric value on the wire for status to set.
* @return This builder for chaining.
*/
public Builder setStatusValue(int value) {
status_ = value;
onChanged();
return this;
}
/**
*
* Holds the coupon status.
*
*
* .single_use_coupons.CouponStatus status = 10;
* @return The status.
*/
@java.lang.Override
public com.passkit.grpc.SingleUseCoupons.CouponOuterClass.CouponStatus getStatus() {
@SuppressWarnings("deprecation")
com.passkit.grpc.SingleUseCoupons.CouponOuterClass.CouponStatus result = com.passkit.grpc.SingleUseCoupons.CouponOuterClass.CouponStatus.valueOf(status_);
return result == null ? com.passkit.grpc.SingleUseCoupons.CouponOuterClass.CouponStatus.UNRECOGNIZED : result;
}
/**
*
* Holds the coupon status.
*
*
* .single_use_coupons.CouponStatus status = 10;
* @param value The status to set.
* @return This builder for chaining.
*/
public Builder setStatus(com.passkit.grpc.SingleUseCoupons.CouponOuterClass.CouponStatus value) {
if (value == null) {
throw new NullPointerException();
}
status_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Holds the coupon status.
*
*
* .single_use_coupons.CouponStatus status = 10;
* @return This builder for chaining.
*/
public Builder clearStatus() {
status_ = 0;
onChanged();
return this;
}
private com.google.protobuf.Timestamp expiryDate_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> expiryDateBuilder_;
/**
*
* Optional field to set when the coupon expires. When the expiry date hits, it will automatically gray out the barcode. Only applicable if the template for the offer is set to EXPIRE_ON_VARIABLE_DATE_TIME.
*
*
* .google.protobuf.Timestamp expiryDate = 11;
* @return Whether the expiryDate field is set.
*/
public boolean hasExpiryDate() {
return expiryDateBuilder_ != null || expiryDate_ != null;
}
/**
*
* Optional field to set when the coupon expires. When the expiry date hits, it will automatically gray out the barcode. Only applicable if the template for the offer is set to EXPIRE_ON_VARIABLE_DATE_TIME.
*
*
* .google.protobuf.Timestamp expiryDate = 11;
* @return The expiryDate.
*/
public com.google.protobuf.Timestamp getExpiryDate() {
if (expiryDateBuilder_ == null) {
return expiryDate_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : expiryDate_;
} else {
return expiryDateBuilder_.getMessage();
}
}
/**
*
* Optional field to set when the coupon expires. When the expiry date hits, it will automatically gray out the barcode. Only applicable if the template for the offer is set to EXPIRE_ON_VARIABLE_DATE_TIME.
*
*
* .google.protobuf.Timestamp expiryDate = 11;
*/
public Builder setExpiryDate(com.google.protobuf.Timestamp value) {
if (expiryDateBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
expiryDate_ = value;
onChanged();
} else {
expiryDateBuilder_.setMessage(value);
}
return this;
}
/**
*
* Optional field to set when the coupon expires. When the expiry date hits, it will automatically gray out the barcode. Only applicable if the template for the offer is set to EXPIRE_ON_VARIABLE_DATE_TIME.
*
*
* .google.protobuf.Timestamp expiryDate = 11;
*/
public Builder setExpiryDate(
com.google.protobuf.Timestamp.Builder builderForValue) {
if (expiryDateBuilder_ == null) {
expiryDate_ = builderForValue.build();
onChanged();
} else {
expiryDateBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Optional field to set when the coupon expires. When the expiry date hits, it will automatically gray out the barcode. Only applicable if the template for the offer is set to EXPIRE_ON_VARIABLE_DATE_TIME.
*
*
* .google.protobuf.Timestamp expiryDate = 11;
*/
public Builder mergeExpiryDate(com.google.protobuf.Timestamp value) {
if (expiryDateBuilder_ == null) {
if (expiryDate_ != null) {
expiryDate_ =
com.google.protobuf.Timestamp.newBuilder(expiryDate_).mergeFrom(value).buildPartial();
} else {
expiryDate_ = value;
}
onChanged();
} else {
expiryDateBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Optional field to set when the coupon expires. When the expiry date hits, it will automatically gray out the barcode. Only applicable if the template for the offer is set to EXPIRE_ON_VARIABLE_DATE_TIME.
*
*
* .google.protobuf.Timestamp expiryDate = 11;
*/
public Builder clearExpiryDate() {
if (expiryDateBuilder_ == null) {
expiryDate_ = null;
onChanged();
} else {
expiryDate_ = null;
expiryDateBuilder_ = null;
}
return this;
}
/**
*
* Optional field to set when the coupon expires. When the expiry date hits, it will automatically gray out the barcode. Only applicable if the template for the offer is set to EXPIRE_ON_VARIABLE_DATE_TIME.
*
*
* .google.protobuf.Timestamp expiryDate = 11;
*/
public com.google.protobuf.Timestamp.Builder getExpiryDateBuilder() {
onChanged();
return getExpiryDateFieldBuilder().getBuilder();
}
/**
*
* Optional field to set when the coupon expires. When the expiry date hits, it will automatically gray out the barcode. Only applicable if the template for the offer is set to EXPIRE_ON_VARIABLE_DATE_TIME.
*
*
* .google.protobuf.Timestamp expiryDate = 11;
*/
public com.google.protobuf.TimestampOrBuilder getExpiryDateOrBuilder() {
if (expiryDateBuilder_ != null) {
return expiryDateBuilder_.getMessageOrBuilder();
} else {
return expiryDate_ == null ?
com.google.protobuf.Timestamp.getDefaultInstance() : expiryDate_;
}
}
/**
*
* Optional field to set when the coupon expires. When the expiry date hits, it will automatically gray out the barcode. Only applicable if the template for the offer is set to EXPIRE_ON_VARIABLE_DATE_TIME.
*
*
* .google.protobuf.Timestamp expiryDate = 11;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>
getExpiryDateFieldBuilder() {
if (expiryDateBuilder_ == null) {
expiryDateBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>(
getExpiryDate(),
getParentForChildren(),
isClean());
expiryDate_ = null;
}
return expiryDateBuilder_;
}
private com.passkit.grpc.SingleUseCoupons.CouponOuterClass.RedemptionDetails redemptionDetails_;
private com.google.protobuf.SingleFieldBuilderV3<
com.passkit.grpc.SingleUseCoupons.CouponOuterClass.RedemptionDetails, com.passkit.grpc.SingleUseCoupons.CouponOuterClass.RedemptionDetails.Builder, com.passkit.grpc.SingleUseCoupons.CouponOuterClass.RedemptionDetailsOrBuilder> redemptionDetailsBuilder_;
/**
*
* Contains details about the redemption (if the coupon is in a redeemed state).
*
*
* .single_use_coupons.RedemptionDetails redemptionDetails = 12;
* @return Whether the redemptionDetails field is set.
*/
public boolean hasRedemptionDetails() {
return redemptionDetailsBuilder_ != null || redemptionDetails_ != null;
}
/**
*
* Contains details about the redemption (if the coupon is in a redeemed state).
*
*
* .single_use_coupons.RedemptionDetails redemptionDetails = 12;
* @return The redemptionDetails.
*/
public com.passkit.grpc.SingleUseCoupons.CouponOuterClass.RedemptionDetails getRedemptionDetails() {
if (redemptionDetailsBuilder_ == null) {
return redemptionDetails_ == null ? com.passkit.grpc.SingleUseCoupons.CouponOuterClass.RedemptionDetails.getDefaultInstance() : redemptionDetails_;
} else {
return redemptionDetailsBuilder_.getMessage();
}
}
/**
*
* Contains details about the redemption (if the coupon is in a redeemed state).
*
*
* .single_use_coupons.RedemptionDetails redemptionDetails = 12;
*/
public Builder setRedemptionDetails(com.passkit.grpc.SingleUseCoupons.CouponOuterClass.RedemptionDetails value) {
if (redemptionDetailsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
redemptionDetails_ = value;
onChanged();
} else {
redemptionDetailsBuilder_.setMessage(value);
}
return this;
}
/**
*
* Contains details about the redemption (if the coupon is in a redeemed state).
*
*
* .single_use_coupons.RedemptionDetails redemptionDetails = 12;
*/
public Builder setRedemptionDetails(
com.passkit.grpc.SingleUseCoupons.CouponOuterClass.RedemptionDetails.Builder builderForValue) {
if (redemptionDetailsBuilder_ == null) {
redemptionDetails_ = builderForValue.build();
onChanged();
} else {
redemptionDetailsBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Contains details about the redemption (if the coupon is in a redeemed state).
*
*
* .single_use_coupons.RedemptionDetails redemptionDetails = 12;
*/
public Builder mergeRedemptionDetails(com.passkit.grpc.SingleUseCoupons.CouponOuterClass.RedemptionDetails value) {
if (redemptionDetailsBuilder_ == null) {
if (redemptionDetails_ != null) {
redemptionDetails_ =
com.passkit.grpc.SingleUseCoupons.CouponOuterClass.RedemptionDetails.newBuilder(redemptionDetails_).mergeFrom(value).buildPartial();
} else {
redemptionDetails_ = value;
}
onChanged();
} else {
redemptionDetailsBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Contains details about the redemption (if the coupon is in a redeemed state).
*
*
* .single_use_coupons.RedemptionDetails redemptionDetails = 12;
*/
public Builder clearRedemptionDetails() {
if (redemptionDetailsBuilder_ == null) {
redemptionDetails_ = null;
onChanged();
} else {
redemptionDetails_ = null;
redemptionDetailsBuilder_ = null;
}
return this;
}
/**
*
* Contains details about the redemption (if the coupon is in a redeemed state).
*
*
* .single_use_coupons.RedemptionDetails redemptionDetails = 12;
*/
public com.passkit.grpc.SingleUseCoupons.CouponOuterClass.RedemptionDetails.Builder getRedemptionDetailsBuilder() {
onChanged();
return getRedemptionDetailsFieldBuilder().getBuilder();
}
/**
*
* Contains details about the redemption (if the coupon is in a redeemed state).
*
*
* .single_use_coupons.RedemptionDetails redemptionDetails = 12;
*/
public com.passkit.grpc.SingleUseCoupons.CouponOuterClass.RedemptionDetailsOrBuilder getRedemptionDetailsOrBuilder() {
if (redemptionDetailsBuilder_ != null) {
return redemptionDetailsBuilder_.getMessageOrBuilder();
} else {
return redemptionDetails_ == null ?
com.passkit.grpc.SingleUseCoupons.CouponOuterClass.RedemptionDetails.getDefaultInstance() : redemptionDetails_;
}
}
/**
*
* Contains details about the redemption (if the coupon is in a redeemed state).
*
*
* .single_use_coupons.RedemptionDetails redemptionDetails = 12;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.passkit.grpc.SingleUseCoupons.CouponOuterClass.RedemptionDetails, com.passkit.grpc.SingleUseCoupons.CouponOuterClass.RedemptionDetails.Builder, com.passkit.grpc.SingleUseCoupons.CouponOuterClass.RedemptionDetailsOrBuilder>
getRedemptionDetailsFieldBuilder() {
if (redemptionDetailsBuilder_ == null) {
redemptionDetailsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.passkit.grpc.SingleUseCoupons.CouponOuterClass.RedemptionDetails, com.passkit.grpc.SingleUseCoupons.CouponOuterClass.RedemptionDetails.Builder, com.passkit.grpc.SingleUseCoupons.CouponOuterClass.RedemptionDetailsOrBuilder>(
getRedemptionDetails(),
getParentForChildren(),
isClean());
redemptionDetails_ = null;
}
return redemptionDetailsBuilder_;
}
private com.passkit.grpc.PassOuterClass.PassOverrides passOverrides_;
private com.google.protobuf.SingleFieldBuilderV3<
com.passkit.grpc.PassOuterClass.PassOverrides, com.passkit.grpc.PassOuterClass.PassOverrides.Builder, com.passkit.grpc.PassOuterClass.PassOverridesOrBuilder> passOverridesBuilder_;
/**
*
* Optional Pass level overrides for proximity & images.
*
*
* .io.PassOverrides passOverrides = 13;
* @return Whether the passOverrides field is set.
*/
public boolean hasPassOverrides() {
return passOverridesBuilder_ != null || passOverrides_ != null;
}
/**
*
* Optional Pass level overrides for proximity & images.
*
*
* .io.PassOverrides passOverrides = 13;
* @return The passOverrides.
*/
public com.passkit.grpc.PassOuterClass.PassOverrides getPassOverrides() {
if (passOverridesBuilder_ == null) {
return passOverrides_ == null ? com.passkit.grpc.PassOuterClass.PassOverrides.getDefaultInstance() : passOverrides_;
} else {
return passOverridesBuilder_.getMessage();
}
}
/**
*
* Optional Pass level overrides for proximity & images.
*
*
* .io.PassOverrides passOverrides = 13;
*/
public Builder setPassOverrides(com.passkit.grpc.PassOuterClass.PassOverrides value) {
if (passOverridesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
passOverrides_ = value;
onChanged();
} else {
passOverridesBuilder_.setMessage(value);
}
return this;
}
/**
*
* Optional Pass level overrides for proximity & images.
*
*
* .io.PassOverrides passOverrides = 13;
*/
public Builder setPassOverrides(
com.passkit.grpc.PassOuterClass.PassOverrides.Builder builderForValue) {
if (passOverridesBuilder_ == null) {
passOverrides_ = builderForValue.build();
onChanged();
} else {
passOverridesBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Optional Pass level overrides for proximity & images.
*
*
* .io.PassOverrides passOverrides = 13;
*/
public Builder mergePassOverrides(com.passkit.grpc.PassOuterClass.PassOverrides value) {
if (passOverridesBuilder_ == null) {
if (passOverrides_ != null) {
passOverrides_ =
com.passkit.grpc.PassOuterClass.PassOverrides.newBuilder(passOverrides_).mergeFrom(value).buildPartial();
} else {
passOverrides_ = value;
}
onChanged();
} else {
passOverridesBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Optional Pass level overrides for proximity & images.
*
*
* .io.PassOverrides passOverrides = 13;
*/
public Builder clearPassOverrides() {
if (passOverridesBuilder_ == null) {
passOverrides_ = null;
onChanged();
} else {
passOverrides_ = null;
passOverridesBuilder_ = null;
}
return this;
}
/**
*
* Optional Pass level overrides for proximity & images.
*
*
* .io.PassOverrides passOverrides = 13;
*/
public com.passkit.grpc.PassOuterClass.PassOverrides.Builder getPassOverridesBuilder() {
onChanged();
return getPassOverridesFieldBuilder().getBuilder();
}
/**
*
* Optional Pass level overrides for proximity & images.
*
*
* .io.PassOverrides passOverrides = 13;
*/
public com.passkit.grpc.PassOuterClass.PassOverridesOrBuilder getPassOverridesOrBuilder() {
if (passOverridesBuilder_ != null) {
return passOverridesBuilder_.getMessageOrBuilder();
} else {
return passOverrides_ == null ?
com.passkit.grpc.PassOuterClass.PassOverrides.getDefaultInstance() : passOverrides_;
}
}
/**
*
* Optional Pass level overrides for proximity & images.
*
*
* .io.PassOverrides passOverrides = 13;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.passkit.grpc.PassOuterClass.PassOverrides, com.passkit.grpc.PassOuterClass.PassOverrides.Builder, com.passkit.grpc.PassOuterClass.PassOverridesOrBuilder>
getPassOverridesFieldBuilder() {
if (passOverridesBuilder_ == null) {
passOverridesBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.passkit.grpc.PassOuterClass.PassOverrides, com.passkit.grpc.PassOuterClass.PassOverrides.Builder, com.passkit.grpc.PassOuterClass.PassOverridesOrBuilder>(
getPassOverrides(),
getParentForChildren(),
isClean());
passOverrides_ = null;
}
return passOverridesBuilder_;
}
private com.passkit.grpc.MetricsOuterClass.Metadata passMetaData_;
private com.google.protobuf.SingleFieldBuilderV3<
com.passkit.grpc.MetricsOuterClass.Metadata, com.passkit.grpc.MetricsOuterClass.Metadata.Builder, com.passkit.grpc.MetricsOuterClass.MetadataOrBuilder> passMetaDataBuilder_;
/**
*
* Pass Metadata hold meta data about the pass like status, lifecycle, utm details and installation data.
*
*
* .io.Metadata passMetaData = 14;
* @return Whether the passMetaData field is set.
*/
public boolean hasPassMetaData() {
return passMetaDataBuilder_ != null || passMetaData_ != null;
}
/**
*
* Pass Metadata hold meta data about the pass like status, lifecycle, utm details and installation data.
*
*
* .io.Metadata passMetaData = 14;
* @return The passMetaData.
*/
public com.passkit.grpc.MetricsOuterClass.Metadata getPassMetaData() {
if (passMetaDataBuilder_ == null) {
return passMetaData_ == null ? com.passkit.grpc.MetricsOuterClass.Metadata.getDefaultInstance() : passMetaData_;
} else {
return passMetaDataBuilder_.getMessage();
}
}
/**
*
* Pass Metadata hold meta data about the pass like status, lifecycle, utm details and installation data.
*
*
* .io.Metadata passMetaData = 14;
*/
public Builder setPassMetaData(com.passkit.grpc.MetricsOuterClass.Metadata value) {
if (passMetaDataBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
passMetaData_ = value;
onChanged();
} else {
passMetaDataBuilder_.setMessage(value);
}
return this;
}
/**
*
* Pass Metadata hold meta data about the pass like status, lifecycle, utm details and installation data.
*
*
* .io.Metadata passMetaData = 14;
*/
public Builder setPassMetaData(
com.passkit.grpc.MetricsOuterClass.Metadata.Builder builderForValue) {
if (passMetaDataBuilder_ == null) {
passMetaData_ = builderForValue.build();
onChanged();
} else {
passMetaDataBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Pass Metadata hold meta data about the pass like status, lifecycle, utm details and installation data.
*
*
* .io.Metadata passMetaData = 14;
*/
public Builder mergePassMetaData(com.passkit.grpc.MetricsOuterClass.Metadata value) {
if (passMetaDataBuilder_ == null) {
if (passMetaData_ != null) {
passMetaData_ =
com.passkit.grpc.MetricsOuterClass.Metadata.newBuilder(passMetaData_).mergeFrom(value).buildPartial();
} else {
passMetaData_ = value;
}
onChanged();
} else {
passMetaDataBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Pass Metadata hold meta data about the pass like status, lifecycle, utm details and installation data.
*
*
* .io.Metadata passMetaData = 14;
*/
public Builder clearPassMetaData() {
if (passMetaDataBuilder_ == null) {
passMetaData_ = null;
onChanged();
} else {
passMetaData_ = null;
passMetaDataBuilder_ = null;
}
return this;
}
/**
*
* Pass Metadata hold meta data about the pass like status, lifecycle, utm details and installation data.
*
*
* .io.Metadata passMetaData = 14;
*/
public com.passkit.grpc.MetricsOuterClass.Metadata.Builder getPassMetaDataBuilder() {
onChanged();
return getPassMetaDataFieldBuilder().getBuilder();
}
/**
*
* Pass Metadata hold meta data about the pass like status, lifecycle, utm details and installation data.
*
*
* .io.Metadata passMetaData = 14;
*/
public com.passkit.grpc.MetricsOuterClass.MetadataOrBuilder getPassMetaDataOrBuilder() {
if (passMetaDataBuilder_ != null) {
return passMetaDataBuilder_.getMessageOrBuilder();
} else {
return passMetaData_ == null ?
com.passkit.grpc.MetricsOuterClass.Metadata.getDefaultInstance() : passMetaData_;
}
}
/**
*
* Pass Metadata hold meta data about the pass like status, lifecycle, utm details and installation data.
*
*
* .io.Metadata passMetaData = 14;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.passkit.grpc.MetricsOuterClass.Metadata, com.passkit.grpc.MetricsOuterClass.Metadata.Builder, com.passkit.grpc.MetricsOuterClass.MetadataOrBuilder>
getPassMetaDataFieldBuilder() {
if (passMetaDataBuilder_ == null) {
passMetaDataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.passkit.grpc.MetricsOuterClass.Metadata, com.passkit.grpc.MetricsOuterClass.Metadata.Builder, com.passkit.grpc.MetricsOuterClass.MetadataOrBuilder>(
getPassMetaData(),
getParentForChildren(),
isClean());
passMetaData_ = null;
}
return passMetaDataBuilder_;
}
private com.google.protobuf.Timestamp created_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createdBuilder_;
/**
*
* The date the coupon was created.
*
*
* .google.protobuf.Timestamp created = 15;
* @return Whether the created field is set.
*/
public boolean hasCreated() {
return createdBuilder_ != null || created_ != null;
}
/**
*
* The date the coupon was created.
*
*
* .google.protobuf.Timestamp created = 15;
* @return The created.
*/
public com.google.protobuf.Timestamp getCreated() {
if (createdBuilder_ == null) {
return created_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : created_;
} else {
return createdBuilder_.getMessage();
}
}
/**
*
* The date the coupon was created.
*
*
* .google.protobuf.Timestamp created = 15;
*/
public Builder setCreated(com.google.protobuf.Timestamp value) {
if (createdBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
created_ = value;
onChanged();
} else {
createdBuilder_.setMessage(value);
}
return this;
}
/**
*
* The date the coupon was created.
*
*
* .google.protobuf.Timestamp created = 15;
*/
public Builder setCreated(
com.google.protobuf.Timestamp.Builder builderForValue) {
if (createdBuilder_ == null) {
created_ = builderForValue.build();
onChanged();
} else {
createdBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* The date the coupon was created.
*
*
* .google.protobuf.Timestamp created = 15;
*/
public Builder mergeCreated(com.google.protobuf.Timestamp value) {
if (createdBuilder_ == null) {
if (created_ != null) {
created_ =
com.google.protobuf.Timestamp.newBuilder(created_).mergeFrom(value).buildPartial();
} else {
created_ = value;
}
onChanged();
} else {
createdBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* The date the coupon was created.
*
*
* .google.protobuf.Timestamp created = 15;
*/
public Builder clearCreated() {
if (createdBuilder_ == null) {
created_ = null;
onChanged();
} else {
created_ = null;
createdBuilder_ = null;
}
return this;
}
/**
*
* The date the coupon was created.
*
*
* .google.protobuf.Timestamp created = 15;
*/
public com.google.protobuf.Timestamp.Builder getCreatedBuilder() {
onChanged();
return getCreatedFieldBuilder().getBuilder();
}
/**
*
* The date the coupon was created.
*
*
* .google.protobuf.Timestamp created = 15;
*/
public com.google.protobuf.TimestampOrBuilder getCreatedOrBuilder() {
if (createdBuilder_ != null) {
return createdBuilder_.getMessageOrBuilder();
} else {
return created_ == null ?
com.google.protobuf.Timestamp.getDefaultInstance() : created_;
}
}
/**
*
* The date the coupon was created.
*
*
* .google.protobuf.Timestamp created = 15;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>
getCreatedFieldBuilder() {
if (createdBuilder_ == null) {
createdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>(
getCreated(),
getParentForChildren(),
isClean());
created_ = null;
}
return createdBuilder_;
}
private com.google.protobuf.Timestamp updated_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> updatedBuilder_;
/**
*
* The date the coupon was last updated.
*
*
* .google.protobuf.Timestamp updated = 16;
* @return Whether the updated field is set.
*/
public boolean hasUpdated() {
return updatedBuilder_ != null || updated_ != null;
}
/**
*
* The date the coupon was last updated.
*
*
* .google.protobuf.Timestamp updated = 16;
* @return The updated.
*/
public com.google.protobuf.Timestamp getUpdated() {
if (updatedBuilder_ == null) {
return updated_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updated_;
} else {
return updatedBuilder_.getMessage();
}
}
/**
*
* The date the coupon was last updated.
*
*
* .google.protobuf.Timestamp updated = 16;
*/
public Builder setUpdated(com.google.protobuf.Timestamp value) {
if (updatedBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
updated_ = value;
onChanged();
} else {
updatedBuilder_.setMessage(value);
}
return this;
}
/**
*
* The date the coupon was last updated.
*
*
* .google.protobuf.Timestamp updated = 16;
*/
public Builder setUpdated(
com.google.protobuf.Timestamp.Builder builderForValue) {
if (updatedBuilder_ == null) {
updated_ = builderForValue.build();
onChanged();
} else {
updatedBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* The date the coupon was last updated.
*
*
* .google.protobuf.Timestamp updated = 16;
*/
public Builder mergeUpdated(com.google.protobuf.Timestamp value) {
if (updatedBuilder_ == null) {
if (updated_ != null) {
updated_ =
com.google.protobuf.Timestamp.newBuilder(updated_).mergeFrom(value).buildPartial();
} else {
updated_ = value;
}
onChanged();
} else {
updatedBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* The date the coupon was last updated.
*
*
* .google.protobuf.Timestamp updated = 16;
*/
public Builder clearUpdated() {
if (updatedBuilder_ == null) {
updated_ = null;
onChanged();
} else {
updated_ = null;
updatedBuilder_ = null;
}
return this;
}
/**
*
* The date the coupon was last updated.
*
*
* .google.protobuf.Timestamp updated = 16;
*/
public com.google.protobuf.Timestamp.Builder getUpdatedBuilder() {
onChanged();
return getUpdatedFieldBuilder().getBuilder();
}
/**
*
* The date the coupon was last updated.
*
*
* .google.protobuf.Timestamp updated = 16;
*/
public com.google.protobuf.TimestampOrBuilder getUpdatedOrBuilder() {
if (updatedBuilder_ != null) {
return updatedBuilder_.getMessageOrBuilder();
} else {
return updated_ == null ?
com.google.protobuf.Timestamp.getDefaultInstance() : updated_;
}
}
/**
*
* The date the coupon was last updated.
*
*
* .google.protobuf.Timestamp updated = 16;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>
getUpdatedFieldBuilder() {
if (updatedBuilder_ == null) {
updatedBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>(
getUpdated(),
getParentForChildren(),
isClean());
updated_ = null;
}
return updatedBuilder_;
}
@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:single_use_coupons.Coupon)
}
// @@protoc_insertion_point(class_scope:single_use_coupons.Coupon)
private static final com.passkit.grpc.SingleUseCoupons.CouponOuterClass.Coupon DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.passkit.grpc.SingleUseCoupons.CouponOuterClass.Coupon();
}
public static com.passkit.grpc.SingleUseCoupons.CouponOuterClass.Coupon getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Coupon parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Coupon(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.SingleUseCoupons.CouponOuterClass.Coupon getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface RedemptionDetailsOrBuilder extends
// @@protoc_insertion_point(interface_extends:single_use_coupons.RedemptionDetails)
com.google.protobuf.MessageOrBuilder {
/**
*
* The date the coupon was redeemed (set by the system when the redeem endpoint is called).
*
*
* .google.protobuf.Timestamp redemptionDate = 1;
* @return Whether the redemptionDate field is set.
*/
boolean hasRedemptionDate();
/**
*
* The date the coupon was redeemed (set by the system when the redeem endpoint is called).
*
*
* .google.protobuf.Timestamp redemptionDate = 1;
* @return The redemptionDate.
*/
com.google.protobuf.Timestamp getRedemptionDate();
/**
*
* The date the coupon was redeemed (set by the system when the redeem endpoint is called).
*
*
* .google.protobuf.Timestamp redemptionDate = 1;
*/
com.google.protobuf.TimestampOrBuilder getRedemptionDateOrBuilder();
/**
*
* Optional field that contains the redemption code provided on redeem (either the fixed one if set, or user provided).
*
*
* string redemptionCode = 2;
* @return The redemptionCode.
*/
java.lang.String getRedemptionCode();
/**
*
* Optional field that contains the redemption code provided on redeem (either the fixed one if set, or user provided).
*
*
* string redemptionCode = 2;
* @return The bytes for redemptionCode.
*/
com.google.protobuf.ByteString
getRedemptionCodeBytes();
/**
*
* Option redemption GPS lat, lon & alt.
*
*
* double lat = 3;
* @return The lat.
*/
double getLat();
/**
*
* Longitude.
*
*
* double lon = 4;
* @return The lon.
*/
double getLon();
/**
*
* Altitude in metres.
*
*
* int32 alt = 5;
* @return The alt.
*/
int getAlt();
/**
*
* Optional redemption user agent, can be used in case where a Merchant uses the PassKit scanning solution combined with their own POS redemption and wants to differentiate the source of redemption.
*
*
* string redemptionSource = 6;
* @return The redemptionSource.
*/
java.lang.String getRedemptionSource();
/**
*
* Optional redemption user agent, can be used in case where a Merchant uses the PassKit scanning solution combined with their own POS redemption and wants to differentiate the source of redemption.
*
*
* string redemptionSource = 6;
* @return The bytes for redemptionSource.
*/
com.google.protobuf.ByteString
getRedemptionSourceBytes();
/**
*
* Optional redemption reference, can be used for staff name, username, POS ID, location ID, etc.
*
*
* string redemptionReference = 7;
* @return The redemptionReference.
*/
java.lang.String getRedemptionReference();
/**
*
* Optional redemption reference, can be used for staff name, username, POS ID, location ID, etc.
*
*
* string redemptionReference = 7;
* @return The bytes for redemptionReference.
*/
com.google.protobuf.ByteString
getRedemptionReferenceBytes();
/**
*
* Optional transaction reference, can be used to consolidate baskets at a later stage via a manual process.
*
*
* string transactionReference = 8;
* @return The transactionReference.
*/
java.lang.String getTransactionReference();
/**
*
* Optional transaction reference, can be used to consolidate baskets at a later stage via a manual process.
*
*
* string transactionReference = 8;
* @return The bytes for transactionReference.
*/
com.google.protobuf.ByteString
getTransactionReferenceBytes();
/**
*
* Optional total transaction amount.
*
*
* double transactionAmount = 9;
* @return The transactionAmount.
*/
double getTransactionAmount();
/**
*
* Any other meta data re. the redemption
*
*
* map<string, string> metaData = 10;
*/
int getMetaDataCount();
/**
*
* Any other meta data re. the redemption
*
*
* map<string, string> metaData = 10;
*/
boolean containsMetaData(
java.lang.String key);
/**
* Use {@link #getMetaDataMap()} instead.
*/
@java.lang.Deprecated
java.util.Map
getMetaData();
/**
*
* Any other meta data re. the redemption
*
*
* map<string, string> metaData = 10;
*/
java.util.Map
getMetaDataMap();
/**
*
* Any other meta data re. the redemption
*
*
* map<string, string> metaData = 10;
*/
java.lang.String getMetaDataOrDefault(
java.lang.String key,
java.lang.String defaultValue);
/**
*
* Any other meta data re. the redemption
*
*
* map<string, string> metaData = 10;
*/
java.lang.String getMetaDataOrThrow(
java.lang.String key);
}
/**
* Protobuf type {@code single_use_coupons.RedemptionDetails}
*/
public static final class RedemptionDetails extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:single_use_coupons.RedemptionDetails)
RedemptionDetailsOrBuilder {
private static final long serialVersionUID = 0L;
// Use RedemptionDetails.newBuilder() to construct.
private RedemptionDetails(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private RedemptionDetails() {
redemptionCode_ = "";
redemptionSource_ = "";
redemptionReference_ = "";
transactionReference_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new RedemptionDetails();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private RedemptionDetails(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
com.google.protobuf.Timestamp.Builder subBuilder = null;
if (redemptionDate_ != null) {
subBuilder = redemptionDate_.toBuilder();
}
redemptionDate_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(redemptionDate_);
redemptionDate_ = subBuilder.buildPartial();
}
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
redemptionCode_ = s;
break;
}
case 25: {
lat_ = input.readDouble();
break;
}
case 33: {
lon_ = input.readDouble();
break;
}
case 40: {
alt_ = input.readInt32();
break;
}
case 50: {
java.lang.String s = input.readStringRequireUtf8();
redemptionSource_ = s;
break;
}
case 58: {
java.lang.String s = input.readStringRequireUtf8();
redemptionReference_ = s;
break;
}
case 66: {
java.lang.String s = input.readStringRequireUtf8();
transactionReference_ = s;
break;
}
case 73: {
transactionAmount_ = input.readDouble();
break;
}
case 82: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
metaData_ = com.google.protobuf.MapField.newMapField(
MetaDataDefaultEntryHolder.defaultEntry);
mutable_bitField0_ |= 0x00000001;
}
com.google.protobuf.MapEntry
metaData__ = input.readMessage(
MetaDataDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
metaData_.getMutableMap().put(
metaData__.getKey(), metaData__.getValue());
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.SingleUseCoupons.CouponOuterClass.internal_static_single_use_coupons_RedemptionDetails_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 10:
return internalGetMetaData();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.passkit.grpc.SingleUseCoupons.CouponOuterClass.internal_static_single_use_coupons_RedemptionDetails_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.passkit.grpc.SingleUseCoupons.CouponOuterClass.RedemptionDetails.class, com.passkit.grpc.SingleUseCoupons.CouponOuterClass.RedemptionDetails.Builder.class);
}
public static final int REDEMPTIONDATE_FIELD_NUMBER = 1;
private com.google.protobuf.Timestamp redemptionDate_;
/**
*
* The date the coupon was redeemed (set by the system when the redeem endpoint is called).
*
*
* .google.protobuf.Timestamp redemptionDate = 1;
* @return Whether the redemptionDate field is set.
*/
@java.lang.Override
public boolean hasRedemptionDate() {
return redemptionDate_ != null;
}
/**
*
* The date the coupon was redeemed (set by the system when the redeem endpoint is called).
*
*
* .google.protobuf.Timestamp redemptionDate = 1;
* @return The redemptionDate.
*/
@java.lang.Override
public com.google.protobuf.Timestamp getRedemptionDate() {
return redemptionDate_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : redemptionDate_;
}
/**
*
* The date the coupon was redeemed (set by the system when the redeem endpoint is called).
*
*
* .google.protobuf.Timestamp redemptionDate = 1;
*/
@java.lang.Override
public com.google.protobuf.TimestampOrBuilder getRedemptionDateOrBuilder() {
return getRedemptionDate();
}
public static final int REDEMPTIONCODE_FIELD_NUMBER = 2;
private volatile java.lang.Object redemptionCode_;
/**
*
* Optional field that contains the redemption code provided on redeem (either the fixed one if set, or user provided).
*
*
* string redemptionCode = 2;
* @return The redemptionCode.
*/
@java.lang.Override
public java.lang.String getRedemptionCode() {
java.lang.Object ref = redemptionCode_;
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();
redemptionCode_ = s;
return s;
}
}
/**
*
* Optional field that contains the redemption code provided on redeem (either the fixed one if set, or user provided).
*
*
* string redemptionCode = 2;
* @return The bytes for redemptionCode.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getRedemptionCodeBytes() {
java.lang.Object ref = redemptionCode_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
redemptionCode_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int LAT_FIELD_NUMBER = 3;
private double lat_;
/**
*
* Option redemption GPS lat, lon & alt.
*
*
* double lat = 3;
* @return The lat.
*/
@java.lang.Override
public double getLat() {
return lat_;
}
public static final int LON_FIELD_NUMBER = 4;
private double lon_;
/**
*
* Longitude.
*
*
* double lon = 4;
* @return The lon.
*/
@java.lang.Override
public double getLon() {
return lon_;
}
public static final int ALT_FIELD_NUMBER = 5;
private int alt_;
/**
*
* Altitude in metres.
*
*
* int32 alt = 5;
* @return The alt.
*/
@java.lang.Override
public int getAlt() {
return alt_;
}
public static final int REDEMPTIONSOURCE_FIELD_NUMBER = 6;
private volatile java.lang.Object redemptionSource_;
/**
*
* Optional redemption user agent, can be used in case where a Merchant uses the PassKit scanning solution combined with their own POS redemption and wants to differentiate the source of redemption.
*
*
* string redemptionSource = 6;
* @return The redemptionSource.
*/
@java.lang.Override
public java.lang.String getRedemptionSource() {
java.lang.Object ref = redemptionSource_;
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();
redemptionSource_ = s;
return s;
}
}
/**
*
* Optional redemption user agent, can be used in case where a Merchant uses the PassKit scanning solution combined with their own POS redemption and wants to differentiate the source of redemption.
*
*
* string redemptionSource = 6;
* @return The bytes for redemptionSource.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getRedemptionSourceBytes() {
java.lang.Object ref = redemptionSource_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
redemptionSource_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int REDEMPTIONREFERENCE_FIELD_NUMBER = 7;
private volatile java.lang.Object redemptionReference_;
/**
*
* Optional redemption reference, can be used for staff name, username, POS ID, location ID, etc.
*
*
* string redemptionReference = 7;
* @return The redemptionReference.
*/
@java.lang.Override
public java.lang.String getRedemptionReference() {
java.lang.Object ref = redemptionReference_;
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();
redemptionReference_ = s;
return s;
}
}
/**
*
* Optional redemption reference, can be used for staff name, username, POS ID, location ID, etc.
*
*
* string redemptionReference = 7;
* @return The bytes for redemptionReference.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getRedemptionReferenceBytes() {
java.lang.Object ref = redemptionReference_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
redemptionReference_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int TRANSACTIONREFERENCE_FIELD_NUMBER = 8;
private volatile java.lang.Object transactionReference_;
/**
*
* Optional transaction reference, can be used to consolidate baskets at a later stage via a manual process.
*
*
* string transactionReference = 8;
* @return The transactionReference.
*/
@java.lang.Override
public java.lang.String getTransactionReference() {
java.lang.Object ref = transactionReference_;
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();
transactionReference_ = s;
return s;
}
}
/**
*
* Optional transaction reference, can be used to consolidate baskets at a later stage via a manual process.
*
*
* string transactionReference = 8;
* @return The bytes for transactionReference.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getTransactionReferenceBytes() {
java.lang.Object ref = transactionReference_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
transactionReference_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int TRANSACTIONAMOUNT_FIELD_NUMBER = 9;
private double transactionAmount_;
/**
*
* Optional total transaction amount.
*
*
* double transactionAmount = 9;
* @return The transactionAmount.
*/
@java.lang.Override
public double getTransactionAmount() {
return transactionAmount_;
}
public static final int METADATA_FIELD_NUMBER = 10;
private static final class MetaDataDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.String, java.lang.String> defaultEntry =
com.google.protobuf.MapEntry
.newDefaultInstance(
com.passkit.grpc.SingleUseCoupons.CouponOuterClass.internal_static_single_use_coupons_RedemptionDetails_MetaDataEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.STRING,
"");
}
private com.google.protobuf.MapField<
java.lang.String, java.lang.String> metaData_;
private com.google.protobuf.MapField
internalGetMetaData() {
if (metaData_ == null) {
return com.google.protobuf.MapField.emptyMapField(
MetaDataDefaultEntryHolder.defaultEntry);
}
return metaData_;
}
public int getMetaDataCount() {
return internalGetMetaData().getMap().size();
}
/**
*
* Any other meta data re. the redemption
*
*
* map<string, string> metaData = 10;
*/
@java.lang.Override
public boolean containsMetaData(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
return internalGetMetaData().getMap().containsKey(key);
}
/**
* Use {@link #getMetaDataMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getMetaData() {
return getMetaDataMap();
}
/**
*
* Any other meta data re. the redemption
*
*
* map<string, string> metaData = 10;
*/
@java.lang.Override
public java.util.Map getMetaDataMap() {
return internalGetMetaData().getMap();
}
/**
*
* Any other meta data re. the redemption
*
*
* map<string, string> metaData = 10;
*/
@java.lang.Override
public java.lang.String getMetaDataOrDefault(
java.lang.String key,
java.lang.String defaultValue) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetMetaData().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* Any other meta data re. the redemption
*
*
* map<string, string> metaData = 10;
*/
@java.lang.Override
public java.lang.String getMetaDataOrThrow(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetMetaData().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
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 (redemptionDate_ != null) {
output.writeMessage(1, getRedemptionDate());
}
if (!getRedemptionCodeBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, redemptionCode_);
}
if (lat_ != 0D) {
output.writeDouble(3, lat_);
}
if (lon_ != 0D) {
output.writeDouble(4, lon_);
}
if (alt_ != 0) {
output.writeInt32(5, alt_);
}
if (!getRedemptionSourceBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 6, redemptionSource_);
}
if (!getRedemptionReferenceBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 7, redemptionReference_);
}
if (!getTransactionReferenceBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 8, transactionReference_);
}
if (transactionAmount_ != 0D) {
output.writeDouble(9, transactionAmount_);
}
com.google.protobuf.GeneratedMessageV3
.serializeStringMapTo(
output,
internalGetMetaData(),
MetaDataDefaultEntryHolder.defaultEntry,
10);
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (redemptionDate_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getRedemptionDate());
}
if (!getRedemptionCodeBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, redemptionCode_);
}
if (lat_ != 0D) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(3, lat_);
}
if (lon_ != 0D) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(4, lon_);
}
if (alt_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(5, alt_);
}
if (!getRedemptionSourceBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, redemptionSource_);
}
if (!getRedemptionReferenceBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, redemptionReference_);
}
if (!getTransactionReferenceBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, transactionReference_);
}
if (transactionAmount_ != 0D) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(9, transactionAmount_);
}
for (java.util.Map.Entry entry
: internalGetMetaData().getMap().entrySet()) {
com.google.protobuf.MapEntry
metaData__ = MetaDataDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(10, metaData__);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.passkit.grpc.SingleUseCoupons.CouponOuterClass.RedemptionDetails)) {
return super.equals(obj);
}
com.passkit.grpc.SingleUseCoupons.CouponOuterClass.RedemptionDetails other = (com.passkit.grpc.SingleUseCoupons.CouponOuterClass.RedemptionDetails) obj;
if (hasRedemptionDate() != other.hasRedemptionDate()) return false;
if (hasRedemptionDate()) {
if (!getRedemptionDate()
.equals(other.getRedemptionDate())) return false;
}
if (!getRedemptionCode()
.equals(other.getRedemptionCode())) return false;
if (java.lang.Double.doubleToLongBits(getLat())
!= java.lang.Double.doubleToLongBits(
other.getLat())) return false;
if (java.lang.Double.doubleToLongBits(getLon())
!= java.lang.Double.doubleToLongBits(
other.getLon())) return false;
if (getAlt()
!= other.getAlt()) return false;
if (!getRedemptionSource()
.equals(other.getRedemptionSource())) return false;
if (!getRedemptionReference()
.equals(other.getRedemptionReference())) return false;
if (!getTransactionReference()
.equals(other.getTransactionReference())) return false;
if (java.lang.Double.doubleToLongBits(getTransactionAmount())
!= java.lang.Double.doubleToLongBits(
other.getTransactionAmount())) return false;
if (!internalGetMetaData().equals(
other.internalGetMetaData())) 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 (hasRedemptionDate()) {
hash = (37 * hash) + REDEMPTIONDATE_FIELD_NUMBER;
hash = (53 * hash) + getRedemptionDate().hashCode();
}
hash = (37 * hash) + REDEMPTIONCODE_FIELD_NUMBER;
hash = (53 * hash) + getRedemptionCode().hashCode();
hash = (37 * hash) + LAT_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getLat()));
hash = (37 * hash) + LON_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getLon()));
hash = (37 * hash) + ALT_FIELD_NUMBER;
hash = (53 * hash) + getAlt();
hash = (37 * hash) + REDEMPTIONSOURCE_FIELD_NUMBER;
hash = (53 * hash) + getRedemptionSource().hashCode();
hash = (37 * hash) + REDEMPTIONREFERENCE_FIELD_NUMBER;
hash = (53 * hash) + getRedemptionReference().hashCode();
hash = (37 * hash) + TRANSACTIONREFERENCE_FIELD_NUMBER;
hash = (53 * hash) + getTransactionReference().hashCode();
hash = (37 * hash) + TRANSACTIONAMOUNT_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getTransactionAmount()));
if (!internalGetMetaData().getMap().isEmpty()) {
hash = (37 * hash) + METADATA_FIELD_NUMBER;
hash = (53 * hash) + internalGetMetaData().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.passkit.grpc.SingleUseCoupons.CouponOuterClass.RedemptionDetails parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.passkit.grpc.SingleUseCoupons.CouponOuterClass.RedemptionDetails 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.SingleUseCoupons.CouponOuterClass.RedemptionDetails parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.passkit.grpc.SingleUseCoupons.CouponOuterClass.RedemptionDetails 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.SingleUseCoupons.CouponOuterClass.RedemptionDetails parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.passkit.grpc.SingleUseCoupons.CouponOuterClass.RedemptionDetails parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.passkit.grpc.SingleUseCoupons.CouponOuterClass.RedemptionDetails parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.passkit.grpc.SingleUseCoupons.CouponOuterClass.RedemptionDetails 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.SingleUseCoupons.CouponOuterClass.RedemptionDetails parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.passkit.grpc.SingleUseCoupons.CouponOuterClass.RedemptionDetails 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.SingleUseCoupons.CouponOuterClass.RedemptionDetails parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.passkit.grpc.SingleUseCoupons.CouponOuterClass.RedemptionDetails 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.SingleUseCoupons.CouponOuterClass.RedemptionDetails 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 single_use_coupons.RedemptionDetails}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:single_use_coupons.RedemptionDetails)
com.passkit.grpc.SingleUseCoupons.CouponOuterClass.RedemptionDetailsOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.passkit.grpc.SingleUseCoupons.CouponOuterClass.internal_static_single_use_coupons_RedemptionDetails_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 10:
return internalGetMetaData();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMutableMapField(
int number) {
switch (number) {
case 10:
return internalGetMutableMetaData();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.passkit.grpc.SingleUseCoupons.CouponOuterClass.internal_static_single_use_coupons_RedemptionDetails_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.passkit.grpc.SingleUseCoupons.CouponOuterClass.RedemptionDetails.class, com.passkit.grpc.SingleUseCoupons.CouponOuterClass.RedemptionDetails.Builder.class);
}
// Construct using com.passkit.grpc.SingleUseCoupons.CouponOuterClass.RedemptionDetails.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (redemptionDateBuilder_ == null) {
redemptionDate_ = null;
} else {
redemptionDate_ = null;
redemptionDateBuilder_ = null;
}
redemptionCode_ = "";
lat_ = 0D;
lon_ = 0D;
alt_ = 0;
redemptionSource_ = "";
redemptionReference_ = "";
transactionReference_ = "";
transactionAmount_ = 0D;
internalGetMutableMetaData().clear();
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.passkit.grpc.SingleUseCoupons.CouponOuterClass.internal_static_single_use_coupons_RedemptionDetails_descriptor;
}
@java.lang.Override
public com.passkit.grpc.SingleUseCoupons.CouponOuterClass.RedemptionDetails getDefaultInstanceForType() {
return com.passkit.grpc.SingleUseCoupons.CouponOuterClass.RedemptionDetails.getDefaultInstance();
}
@java.lang.Override
public com.passkit.grpc.SingleUseCoupons.CouponOuterClass.RedemptionDetails build() {
com.passkit.grpc.SingleUseCoupons.CouponOuterClass.RedemptionDetails result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.passkit.grpc.SingleUseCoupons.CouponOuterClass.RedemptionDetails buildPartial() {
com.passkit.grpc.SingleUseCoupons.CouponOuterClass.RedemptionDetails result = new com.passkit.grpc.SingleUseCoupons.CouponOuterClass.RedemptionDetails(this);
int from_bitField0_ = bitField0_;
if (redemptionDateBuilder_ == null) {
result.redemptionDate_ = redemptionDate_;
} else {
result.redemptionDate_ = redemptionDateBuilder_.build();
}
result.redemptionCode_ = redemptionCode_;
result.lat_ = lat_;
result.lon_ = lon_;
result.alt_ = alt_;
result.redemptionSource_ = redemptionSource_;
result.redemptionReference_ = redemptionReference_;
result.transactionReference_ = transactionReference_;
result.transactionAmount_ = transactionAmount_;
result.metaData_ = internalGetMetaData();
result.metaData_.makeImmutable();
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.SingleUseCoupons.CouponOuterClass.RedemptionDetails) {
return mergeFrom((com.passkit.grpc.SingleUseCoupons.CouponOuterClass.RedemptionDetails)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.passkit.grpc.SingleUseCoupons.CouponOuterClass.RedemptionDetails other) {
if (other == com.passkit.grpc.SingleUseCoupons.CouponOuterClass.RedemptionDetails.getDefaultInstance()) return this;
if (other.hasRedemptionDate()) {
mergeRedemptionDate(other.getRedemptionDate());
}
if (!other.getRedemptionCode().isEmpty()) {
redemptionCode_ = other.redemptionCode_;
onChanged();
}
if (other.getLat() != 0D) {
setLat(other.getLat());
}
if (other.getLon() != 0D) {
setLon(other.getLon());
}
if (other.getAlt() != 0) {
setAlt(other.getAlt());
}
if (!other.getRedemptionSource().isEmpty()) {
redemptionSource_ = other.redemptionSource_;
onChanged();
}
if (!other.getRedemptionReference().isEmpty()) {
redemptionReference_ = other.redemptionReference_;
onChanged();
}
if (!other.getTransactionReference().isEmpty()) {
transactionReference_ = other.transactionReference_;
onChanged();
}
if (other.getTransactionAmount() != 0D) {
setTransactionAmount(other.getTransactionAmount());
}
internalGetMutableMetaData().mergeFrom(
other.internalGetMetaData());
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.SingleUseCoupons.CouponOuterClass.RedemptionDetails parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.passkit.grpc.SingleUseCoupons.CouponOuterClass.RedemptionDetails) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private com.google.protobuf.Timestamp redemptionDate_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> redemptionDateBuilder_;
/**
*
* The date the coupon was redeemed (set by the system when the redeem endpoint is called).
*
*
* .google.protobuf.Timestamp redemptionDate = 1;
* @return Whether the redemptionDate field is set.
*/
public boolean hasRedemptionDate() {
return redemptionDateBuilder_ != null || redemptionDate_ != null;
}
/**
*
* The date the coupon was redeemed (set by the system when the redeem endpoint is called).
*
*
* .google.protobuf.Timestamp redemptionDate = 1;
* @return The redemptionDate.
*/
public com.google.protobuf.Timestamp getRedemptionDate() {
if (redemptionDateBuilder_ == null) {
return redemptionDate_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : redemptionDate_;
} else {
return redemptionDateBuilder_.getMessage();
}
}
/**
*
* The date the coupon was redeemed (set by the system when the redeem endpoint is called).
*
*
* .google.protobuf.Timestamp redemptionDate = 1;
*/
public Builder setRedemptionDate(com.google.protobuf.Timestamp value) {
if (redemptionDateBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
redemptionDate_ = value;
onChanged();
} else {
redemptionDateBuilder_.setMessage(value);
}
return this;
}
/**
*
* The date the coupon was redeemed (set by the system when the redeem endpoint is called).
*
*
* .google.protobuf.Timestamp redemptionDate = 1;
*/
public Builder setRedemptionDate(
com.google.protobuf.Timestamp.Builder builderForValue) {
if (redemptionDateBuilder_ == null) {
redemptionDate_ = builderForValue.build();
onChanged();
} else {
redemptionDateBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* The date the coupon was redeemed (set by the system when the redeem endpoint is called).
*
*
* .google.protobuf.Timestamp redemptionDate = 1;
*/
public Builder mergeRedemptionDate(com.google.protobuf.Timestamp value) {
if (redemptionDateBuilder_ == null) {
if (redemptionDate_ != null) {
redemptionDate_ =
com.google.protobuf.Timestamp.newBuilder(redemptionDate_).mergeFrom(value).buildPartial();
} else {
redemptionDate_ = value;
}
onChanged();
} else {
redemptionDateBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* The date the coupon was redeemed (set by the system when the redeem endpoint is called).
*
*
* .google.protobuf.Timestamp redemptionDate = 1;
*/
public Builder clearRedemptionDate() {
if (redemptionDateBuilder_ == null) {
redemptionDate_ = null;
onChanged();
} else {
redemptionDate_ = null;
redemptionDateBuilder_ = null;
}
return this;
}
/**
*
* The date the coupon was redeemed (set by the system when the redeem endpoint is called).
*
*
* .google.protobuf.Timestamp redemptionDate = 1;
*/
public com.google.protobuf.Timestamp.Builder getRedemptionDateBuilder() {
onChanged();
return getRedemptionDateFieldBuilder().getBuilder();
}
/**
*
* The date the coupon was redeemed (set by the system when the redeem endpoint is called).
*
*
* .google.protobuf.Timestamp redemptionDate = 1;
*/
public com.google.protobuf.TimestampOrBuilder getRedemptionDateOrBuilder() {
if (redemptionDateBuilder_ != null) {
return redemptionDateBuilder_.getMessageOrBuilder();
} else {
return redemptionDate_ == null ?
com.google.protobuf.Timestamp.getDefaultInstance() : redemptionDate_;
}
}
/**
*
* The date the coupon was redeemed (set by the system when the redeem endpoint is called).
*
*
* .google.protobuf.Timestamp redemptionDate = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>
getRedemptionDateFieldBuilder() {
if (redemptionDateBuilder_ == null) {
redemptionDateBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>(
getRedemptionDate(),
getParentForChildren(),
isClean());
redemptionDate_ = null;
}
return redemptionDateBuilder_;
}
private java.lang.Object redemptionCode_ = "";
/**
*
* Optional field that contains the redemption code provided on redeem (either the fixed one if set, or user provided).
*
*
* string redemptionCode = 2;
* @return The redemptionCode.
*/
public java.lang.String getRedemptionCode() {
java.lang.Object ref = redemptionCode_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
redemptionCode_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Optional field that contains the redemption code provided on redeem (either the fixed one if set, or user provided).
*
*
* string redemptionCode = 2;
* @return The bytes for redemptionCode.
*/
public com.google.protobuf.ByteString
getRedemptionCodeBytes() {
java.lang.Object ref = redemptionCode_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
redemptionCode_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Optional field that contains the redemption code provided on redeem (either the fixed one if set, or user provided).
*
*
* string redemptionCode = 2;
* @param value The redemptionCode to set.
* @return This builder for chaining.
*/
public Builder setRedemptionCode(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
redemptionCode_ = value;
onChanged();
return this;
}
/**
*
* Optional field that contains the redemption code provided on redeem (either the fixed one if set, or user provided).
*
*
* string redemptionCode = 2;
* @return This builder for chaining.
*/
public Builder clearRedemptionCode() {
redemptionCode_ = getDefaultInstance().getRedemptionCode();
onChanged();
return this;
}
/**
*
* Optional field that contains the redemption code provided on redeem (either the fixed one if set, or user provided).
*
*
* string redemptionCode = 2;
* @param value The bytes for redemptionCode to set.
* @return This builder for chaining.
*/
public Builder setRedemptionCodeBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
redemptionCode_ = value;
onChanged();
return this;
}
private double lat_ ;
/**
*
* Option redemption GPS lat, lon & alt.
*
*
* double lat = 3;
* @return The lat.
*/
@java.lang.Override
public double getLat() {
return lat_;
}
/**
*
* Option redemption GPS lat, lon & alt.
*
*
* double lat = 3;
* @param value The lat to set.
* @return This builder for chaining.
*/
public Builder setLat(double value) {
lat_ = value;
onChanged();
return this;
}
/**
*
* Option redemption GPS lat, lon & alt.
*
*
* double lat = 3;
* @return This builder for chaining.
*/
public Builder clearLat() {
lat_ = 0D;
onChanged();
return this;
}
private double lon_ ;
/**
*
* Longitude.
*
*
* double lon = 4;
* @return The lon.
*/
@java.lang.Override
public double getLon() {
return lon_;
}
/**
*
* Longitude.
*
*
* double lon = 4;
* @param value The lon to set.
* @return This builder for chaining.
*/
public Builder setLon(double value) {
lon_ = value;
onChanged();
return this;
}
/**
*
* Longitude.
*
*
* double lon = 4;
* @return This builder for chaining.
*/
public Builder clearLon() {
lon_ = 0D;
onChanged();
return this;
}
private int alt_ ;
/**
*
* Altitude in metres.
*
*
* int32 alt = 5;
* @return The alt.
*/
@java.lang.Override
public int getAlt() {
return alt_;
}
/**
*
* Altitude in metres.
*
*
* int32 alt = 5;
* @param value The alt to set.
* @return This builder for chaining.
*/
public Builder setAlt(int value) {
alt_ = value;
onChanged();
return this;
}
/**
*
* Altitude in metres.
*
*
* int32 alt = 5;
* @return This builder for chaining.
*/
public Builder clearAlt() {
alt_ = 0;
onChanged();
return this;
}
private java.lang.Object redemptionSource_ = "";
/**
*
* Optional redemption user agent, can be used in case where a Merchant uses the PassKit scanning solution combined with their own POS redemption and wants to differentiate the source of redemption.
*
*
* string redemptionSource = 6;
* @return The redemptionSource.
*/
public java.lang.String getRedemptionSource() {
java.lang.Object ref = redemptionSource_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
redemptionSource_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Optional redemption user agent, can be used in case where a Merchant uses the PassKit scanning solution combined with their own POS redemption and wants to differentiate the source of redemption.
*
*
* string redemptionSource = 6;
* @return The bytes for redemptionSource.
*/
public com.google.protobuf.ByteString
getRedemptionSourceBytes() {
java.lang.Object ref = redemptionSource_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
redemptionSource_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Optional redemption user agent, can be used in case where a Merchant uses the PassKit scanning solution combined with their own POS redemption and wants to differentiate the source of redemption.
*
*
* string redemptionSource = 6;
* @param value The redemptionSource to set.
* @return This builder for chaining.
*/
public Builder setRedemptionSource(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
redemptionSource_ = value;
onChanged();
return this;
}
/**
*
* Optional redemption user agent, can be used in case where a Merchant uses the PassKit scanning solution combined with their own POS redemption and wants to differentiate the source of redemption.
*
*
* string redemptionSource = 6;
* @return This builder for chaining.
*/
public Builder clearRedemptionSource() {
redemptionSource_ = getDefaultInstance().getRedemptionSource();
onChanged();
return this;
}
/**
*
* Optional redemption user agent, can be used in case where a Merchant uses the PassKit scanning solution combined with their own POS redemption and wants to differentiate the source of redemption.
*
*
* string redemptionSource = 6;
* @param value The bytes for redemptionSource to set.
* @return This builder for chaining.
*/
public Builder setRedemptionSourceBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
redemptionSource_ = value;
onChanged();
return this;
}
private java.lang.Object redemptionReference_ = "";
/**
*
* Optional redemption reference, can be used for staff name, username, POS ID, location ID, etc.
*
*
* string redemptionReference = 7;
* @return The redemptionReference.
*/
public java.lang.String getRedemptionReference() {
java.lang.Object ref = redemptionReference_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
redemptionReference_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Optional redemption reference, can be used for staff name, username, POS ID, location ID, etc.
*
*
* string redemptionReference = 7;
* @return The bytes for redemptionReference.
*/
public com.google.protobuf.ByteString
getRedemptionReferenceBytes() {
java.lang.Object ref = redemptionReference_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
redemptionReference_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Optional redemption reference, can be used for staff name, username, POS ID, location ID, etc.
*
*
* string redemptionReference = 7;
* @param value The redemptionReference to set.
* @return This builder for chaining.
*/
public Builder setRedemptionReference(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
redemptionReference_ = value;
onChanged();
return this;
}
/**
*
* Optional redemption reference, can be used for staff name, username, POS ID, location ID, etc.
*
*
* string redemptionReference = 7;
* @return This builder for chaining.
*/
public Builder clearRedemptionReference() {
redemptionReference_ = getDefaultInstance().getRedemptionReference();
onChanged();
return this;
}
/**
*
* Optional redemption reference, can be used for staff name, username, POS ID, location ID, etc.
*
*
* string redemptionReference = 7;
* @param value The bytes for redemptionReference to set.
* @return This builder for chaining.
*/
public Builder setRedemptionReferenceBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
redemptionReference_ = value;
onChanged();
return this;
}
private java.lang.Object transactionReference_ = "";
/**
*
* Optional transaction reference, can be used to consolidate baskets at a later stage via a manual process.
*
*
* string transactionReference = 8;
* @return The transactionReference.
*/
public java.lang.String getTransactionReference() {
java.lang.Object ref = transactionReference_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
transactionReference_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Optional transaction reference, can be used to consolidate baskets at a later stage via a manual process.
*
*
* string transactionReference = 8;
* @return The bytes for transactionReference.
*/
public com.google.protobuf.ByteString
getTransactionReferenceBytes() {
java.lang.Object ref = transactionReference_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
transactionReference_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Optional transaction reference, can be used to consolidate baskets at a later stage via a manual process.
*
*
* string transactionReference = 8;
* @param value The transactionReference to set.
* @return This builder for chaining.
*/
public Builder setTransactionReference(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
transactionReference_ = value;
onChanged();
return this;
}
/**
*
* Optional transaction reference, can be used to consolidate baskets at a later stage via a manual process.
*
*
* string transactionReference = 8;
* @return This builder for chaining.
*/
public Builder clearTransactionReference() {
transactionReference_ = getDefaultInstance().getTransactionReference();
onChanged();
return this;
}
/**
*
* Optional transaction reference, can be used to consolidate baskets at a later stage via a manual process.
*
*
* string transactionReference = 8;
* @param value The bytes for transactionReference to set.
* @return This builder for chaining.
*/
public Builder setTransactionReferenceBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
transactionReference_ = value;
onChanged();
return this;
}
private double transactionAmount_ ;
/**
*
* Optional total transaction amount.
*
*
* double transactionAmount = 9;
* @return The transactionAmount.
*/
@java.lang.Override
public double getTransactionAmount() {
return transactionAmount_;
}
/**
*
* Optional total transaction amount.
*
*
* double transactionAmount = 9;
* @param value The transactionAmount to set.
* @return This builder for chaining.
*/
public Builder setTransactionAmount(double value) {
transactionAmount_ = value;
onChanged();
return this;
}
/**
*
* Optional total transaction amount.
*
*
* double transactionAmount = 9;
* @return This builder for chaining.
*/
public Builder clearTransactionAmount() {
transactionAmount_ = 0D;
onChanged();
return this;
}
private com.google.protobuf.MapField<
java.lang.String, java.lang.String> metaData_;
private com.google.protobuf.MapField
internalGetMetaData() {
if (metaData_ == null) {
return com.google.protobuf.MapField.emptyMapField(
MetaDataDefaultEntryHolder.defaultEntry);
}
return metaData_;
}
private com.google.protobuf.MapField
internalGetMutableMetaData() {
onChanged();;
if (metaData_ == null) {
metaData_ = com.google.protobuf.MapField.newMapField(
MetaDataDefaultEntryHolder.defaultEntry);
}
if (!metaData_.isMutable()) {
metaData_ = metaData_.copy();
}
return metaData_;
}
public int getMetaDataCount() {
return internalGetMetaData().getMap().size();
}
/**
*
* Any other meta data re. the redemption
*
*
* map<string, string> metaData = 10;
*/
@java.lang.Override
public boolean containsMetaData(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
return internalGetMetaData().getMap().containsKey(key);
}
/**
* Use {@link #getMetaDataMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getMetaData() {
return getMetaDataMap();
}
/**
*
* Any other meta data re. the redemption
*
*
* map<string, string> metaData = 10;
*/
@java.lang.Override
public java.util.Map getMetaDataMap() {
return internalGetMetaData().getMap();
}
/**
*
* Any other meta data re. the redemption
*
*
* map<string, string> metaData = 10;
*/
@java.lang.Override
public java.lang.String getMetaDataOrDefault(
java.lang.String key,
java.lang.String defaultValue) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetMetaData().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* Any other meta data re. the redemption
*
*
* map<string, string> metaData = 10;
*/
@java.lang.Override
public java.lang.String getMetaDataOrThrow(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetMetaData().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearMetaData() {
internalGetMutableMetaData().getMutableMap()
.clear();
return this;
}
/**
*
* Any other meta data re. the redemption
*
*
* map<string, string> metaData = 10;
*/
public Builder removeMetaData(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
internalGetMutableMetaData().getMutableMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutableMetaData() {
return internalGetMutableMetaData().getMutableMap();
}
/**
*
* Any other meta data re. the redemption
*
*
* map<string, string> metaData = 10;
*/
public Builder putMetaData(
java.lang.String key,
java.lang.String value) {
if (key == null) { throw new java.lang.NullPointerException(); }
if (value == null) { throw new java.lang.NullPointerException(); }
internalGetMutableMetaData().getMutableMap()
.put(key, value);
return this;
}
/**
*
* Any other meta data re. the redemption
*
*
* map<string, string> metaData = 10;
*/
public Builder putAllMetaData(
java.util.Map values) {
internalGetMutableMetaData().getMutableMap()
.putAll(values);
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:single_use_coupons.RedemptionDetails)
}
// @@protoc_insertion_point(class_scope:single_use_coupons.RedemptionDetails)
private static final com.passkit.grpc.SingleUseCoupons.CouponOuterClass.RedemptionDetails DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.passkit.grpc.SingleUseCoupons.CouponOuterClass.RedemptionDetails();
}
public static com.passkit.grpc.SingleUseCoupons.CouponOuterClass.RedemptionDetails getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public RedemptionDetails parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new RedemptionDetails(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.SingleUseCoupons.CouponOuterClass.RedemptionDetails getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ExternalIdRequestOrBuilder extends
// @@protoc_insertion_point(interface_extends:single_use_coupons.ExternalIdRequest)
com.google.protobuf.MessageOrBuilder {
/**
*
* Coupon Campaign ID
*
*
* string couponCampaignId = 1;
* @return The couponCampaignId.
*/
java.lang.String getCouponCampaignId();
/**
*
* Coupon Campaign ID
*
*
* string couponCampaignId = 1;
* @return The bytes for couponCampaignId.
*/
com.google.protobuf.ByteString
getCouponCampaignIdBytes();
/**
*
* External ID
*
*
* string externalId = 2;
* @return The externalId.
*/
java.lang.String getExternalId();
/**
*
* External ID
*
*
* string externalId = 2;
* @return The bytes for externalId.
*/
com.google.protobuf.ByteString
getExternalIdBytes();
}
/**
* Protobuf type {@code single_use_coupons.ExternalIdRequest}
*/
public static final class ExternalIdRequest extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:single_use_coupons.ExternalIdRequest)
ExternalIdRequestOrBuilder {
private static final long serialVersionUID = 0L;
// Use ExternalIdRequest.newBuilder() to construct.
private ExternalIdRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ExternalIdRequest() {
couponCampaignId_ = "";
externalId_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new ExternalIdRequest();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private ExternalIdRequest(
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 10: {
java.lang.String s = input.readStringRequireUtf8();
couponCampaignId_ = s;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
externalId_ = s;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.passkit.grpc.SingleUseCoupons.CouponOuterClass.internal_static_single_use_coupons_ExternalIdRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.passkit.grpc.SingleUseCoupons.CouponOuterClass.internal_static_single_use_coupons_ExternalIdRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ExternalIdRequest.class, com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ExternalIdRequest.Builder.class);
}
public static final int COUPONCAMPAIGNID_FIELD_NUMBER = 1;
private volatile java.lang.Object couponCampaignId_;
/**
*
* Coupon Campaign ID
*
*
* string couponCampaignId = 1;
* @return The couponCampaignId.
*/
@java.lang.Override
public java.lang.String getCouponCampaignId() {
java.lang.Object ref = couponCampaignId_;
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();
couponCampaignId_ = s;
return s;
}
}
/**
*
* Coupon Campaign ID
*
*
* string couponCampaignId = 1;
* @return The bytes for couponCampaignId.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getCouponCampaignIdBytes() {
java.lang.Object ref = couponCampaignId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
couponCampaignId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int EXTERNALID_FIELD_NUMBER = 2;
private volatile java.lang.Object externalId_;
/**
*
* External ID
*
*
* string externalId = 2;
* @return The externalId.
*/
@java.lang.Override
public java.lang.String getExternalId() {
java.lang.Object ref = externalId_;
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();
externalId_ = s;
return s;
}
}
/**
*
* External ID
*
*
* string externalId = 2;
* @return The bytes for externalId.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getExternalIdBytes() {
java.lang.Object ref = externalId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
externalId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getCouponCampaignIdBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, couponCampaignId_);
}
if (!getExternalIdBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, externalId_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getCouponCampaignIdBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, couponCampaignId_);
}
if (!getExternalIdBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, externalId_);
}
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.SingleUseCoupons.CouponOuterClass.ExternalIdRequest)) {
return super.equals(obj);
}
com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ExternalIdRequest other = (com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ExternalIdRequest) obj;
if (!getCouponCampaignId()
.equals(other.getCouponCampaignId())) return false;
if (!getExternalId()
.equals(other.getExternalId())) 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) + COUPONCAMPAIGNID_FIELD_NUMBER;
hash = (53 * hash) + getCouponCampaignId().hashCode();
hash = (37 * hash) + EXTERNALID_FIELD_NUMBER;
hash = (53 * hash) + getExternalId().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ExternalIdRequest parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ExternalIdRequest 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.SingleUseCoupons.CouponOuterClass.ExternalIdRequest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ExternalIdRequest 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.SingleUseCoupons.CouponOuterClass.ExternalIdRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ExternalIdRequest parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ExternalIdRequest parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ExternalIdRequest 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.SingleUseCoupons.CouponOuterClass.ExternalIdRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ExternalIdRequest 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.SingleUseCoupons.CouponOuterClass.ExternalIdRequest parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ExternalIdRequest 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.SingleUseCoupons.CouponOuterClass.ExternalIdRequest 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 single_use_coupons.ExternalIdRequest}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:single_use_coupons.ExternalIdRequest)
com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ExternalIdRequestOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.passkit.grpc.SingleUseCoupons.CouponOuterClass.internal_static_single_use_coupons_ExternalIdRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.passkit.grpc.SingleUseCoupons.CouponOuterClass.internal_static_single_use_coupons_ExternalIdRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ExternalIdRequest.class, com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ExternalIdRequest.Builder.class);
}
// Construct using com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ExternalIdRequest.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();
couponCampaignId_ = "";
externalId_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.passkit.grpc.SingleUseCoupons.CouponOuterClass.internal_static_single_use_coupons_ExternalIdRequest_descriptor;
}
@java.lang.Override
public com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ExternalIdRequest getDefaultInstanceForType() {
return com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ExternalIdRequest.getDefaultInstance();
}
@java.lang.Override
public com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ExternalIdRequest build() {
com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ExternalIdRequest result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ExternalIdRequest buildPartial() {
com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ExternalIdRequest result = new com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ExternalIdRequest(this);
result.couponCampaignId_ = couponCampaignId_;
result.externalId_ = externalId_;
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.SingleUseCoupons.CouponOuterClass.ExternalIdRequest) {
return mergeFrom((com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ExternalIdRequest)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ExternalIdRequest other) {
if (other == com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ExternalIdRequest.getDefaultInstance()) return this;
if (!other.getCouponCampaignId().isEmpty()) {
couponCampaignId_ = other.couponCampaignId_;
onChanged();
}
if (!other.getExternalId().isEmpty()) {
externalId_ = other.externalId_;
onChanged();
}
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.SingleUseCoupons.CouponOuterClass.ExternalIdRequest parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ExternalIdRequest) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object couponCampaignId_ = "";
/**
*
* Coupon Campaign ID
*
*
* string couponCampaignId = 1;
* @return The couponCampaignId.
*/
public java.lang.String getCouponCampaignId() {
java.lang.Object ref = couponCampaignId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
couponCampaignId_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Coupon Campaign ID
*
*
* string couponCampaignId = 1;
* @return The bytes for couponCampaignId.
*/
public com.google.protobuf.ByteString
getCouponCampaignIdBytes() {
java.lang.Object ref = couponCampaignId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
couponCampaignId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Coupon Campaign ID
*
*
* string couponCampaignId = 1;
* @param value The couponCampaignId to set.
* @return This builder for chaining.
*/
public Builder setCouponCampaignId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
couponCampaignId_ = value;
onChanged();
return this;
}
/**
*
* Coupon Campaign ID
*
*
* string couponCampaignId = 1;
* @return This builder for chaining.
*/
public Builder clearCouponCampaignId() {
couponCampaignId_ = getDefaultInstance().getCouponCampaignId();
onChanged();
return this;
}
/**
*
* Coupon Campaign ID
*
*
* string couponCampaignId = 1;
* @param value The bytes for couponCampaignId to set.
* @return This builder for chaining.
*/
public Builder setCouponCampaignIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
couponCampaignId_ = value;
onChanged();
return this;
}
private java.lang.Object externalId_ = "";
/**
*
* External ID
*
*
* string externalId = 2;
* @return The externalId.
*/
public java.lang.String getExternalId() {
java.lang.Object ref = externalId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
externalId_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* External ID
*
*
* string externalId = 2;
* @return The bytes for externalId.
*/
public com.google.protobuf.ByteString
getExternalIdBytes() {
java.lang.Object ref = externalId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
externalId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* External ID
*
*
* string externalId = 2;
* @param value The externalId to set.
* @return This builder for chaining.
*/
public Builder setExternalId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
externalId_ = value;
onChanged();
return this;
}
/**
*
* External ID
*
*
* string externalId = 2;
* @return This builder for chaining.
*/
public Builder clearExternalId() {
externalId_ = getDefaultInstance().getExternalId();
onChanged();
return this;
}
/**
*
* External ID
*
*
* string externalId = 2;
* @param value The bytes for externalId to set.
* @return This builder for chaining.
*/
public Builder setExternalIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
externalId_ = value;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:single_use_coupons.ExternalIdRequest)
}
// @@protoc_insertion_point(class_scope:single_use_coupons.ExternalIdRequest)
private static final com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ExternalIdRequest DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ExternalIdRequest();
}
public static com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ExternalIdRequest getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ExternalIdRequest parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ExternalIdRequest(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.SingleUseCoupons.CouponOuterClass.ExternalIdRequest getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ListRequestDeprecatedOrBuilder extends
// @@protoc_insertion_point(interface_extends:single_use_coupons.ListRequestDeprecated)
com.google.protobuf.MessageOrBuilder {
/**
*
* Coupon Campaign ID
*
*
* string couponCampaignId = 1;
* @return The couponCampaignId.
*/
java.lang.String getCouponCampaignId();
/**
*
* Coupon Campaign ID
*
*
* string couponCampaignId = 1;
* @return The bytes for couponCampaignId.
*/
com.google.protobuf.ByteString
getCouponCampaignIdBytes();
/**
*
* External ID
*
*
* .io.Pagination pagination = 2;
* @return Whether the pagination field is set.
*/
boolean hasPagination();
/**
*
* External ID
*
*
* .io.Pagination pagination = 2;
* @return The pagination.
*/
com.passkit.grpc.PaginationOuterClass.Pagination getPagination();
/**
*
* External ID
*
*
* .io.Pagination pagination = 2;
*/
com.passkit.grpc.PaginationOuterClass.PaginationOrBuilder getPaginationOrBuilder();
}
/**
* Protobuf type {@code single_use_coupons.ListRequestDeprecated}
*/
public static final class ListRequestDeprecated extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:single_use_coupons.ListRequestDeprecated)
ListRequestDeprecatedOrBuilder {
private static final long serialVersionUID = 0L;
// Use ListRequestDeprecated.newBuilder() to construct.
private ListRequestDeprecated(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ListRequestDeprecated() {
couponCampaignId_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new ListRequestDeprecated();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private ListRequestDeprecated(
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 10: {
java.lang.String s = input.readStringRequireUtf8();
couponCampaignId_ = s;
break;
}
case 18: {
com.passkit.grpc.PaginationOuterClass.Pagination.Builder subBuilder = null;
if (pagination_ != null) {
subBuilder = pagination_.toBuilder();
}
pagination_ = input.readMessage(com.passkit.grpc.PaginationOuterClass.Pagination.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(pagination_);
pagination_ = subBuilder.buildPartial();
}
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.SingleUseCoupons.CouponOuterClass.internal_static_single_use_coupons_ListRequestDeprecated_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.passkit.grpc.SingleUseCoupons.CouponOuterClass.internal_static_single_use_coupons_ListRequestDeprecated_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ListRequestDeprecated.class, com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ListRequestDeprecated.Builder.class);
}
public static final int COUPONCAMPAIGNID_FIELD_NUMBER = 1;
private volatile java.lang.Object couponCampaignId_;
/**
*
* Coupon Campaign ID
*
*
* string couponCampaignId = 1;
* @return The couponCampaignId.
*/
@java.lang.Override
public java.lang.String getCouponCampaignId() {
java.lang.Object ref = couponCampaignId_;
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();
couponCampaignId_ = s;
return s;
}
}
/**
*
* Coupon Campaign ID
*
*
* string couponCampaignId = 1;
* @return The bytes for couponCampaignId.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getCouponCampaignIdBytes() {
java.lang.Object ref = couponCampaignId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
couponCampaignId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int PAGINATION_FIELD_NUMBER = 2;
private com.passkit.grpc.PaginationOuterClass.Pagination pagination_;
/**
*
* External ID
*
*
* .io.Pagination pagination = 2;
* @return Whether the pagination field is set.
*/
@java.lang.Override
public boolean hasPagination() {
return pagination_ != null;
}
/**
*
* External ID
*
*
* .io.Pagination pagination = 2;
* @return The pagination.
*/
@java.lang.Override
public com.passkit.grpc.PaginationOuterClass.Pagination getPagination() {
return pagination_ == null ? com.passkit.grpc.PaginationOuterClass.Pagination.getDefaultInstance() : pagination_;
}
/**
*
* External ID
*
*
* .io.Pagination pagination = 2;
*/
@java.lang.Override
public com.passkit.grpc.PaginationOuterClass.PaginationOrBuilder getPaginationOrBuilder() {
return getPagination();
}
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 (!getCouponCampaignIdBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, couponCampaignId_);
}
if (pagination_ != null) {
output.writeMessage(2, getPagination());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getCouponCampaignIdBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, couponCampaignId_);
}
if (pagination_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getPagination());
}
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.SingleUseCoupons.CouponOuterClass.ListRequestDeprecated)) {
return super.equals(obj);
}
com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ListRequestDeprecated other = (com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ListRequestDeprecated) obj;
if (!getCouponCampaignId()
.equals(other.getCouponCampaignId())) return false;
if (hasPagination() != other.hasPagination()) return false;
if (hasPagination()) {
if (!getPagination()
.equals(other.getPagination())) 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) + COUPONCAMPAIGNID_FIELD_NUMBER;
hash = (53 * hash) + getCouponCampaignId().hashCode();
if (hasPagination()) {
hash = (37 * hash) + PAGINATION_FIELD_NUMBER;
hash = (53 * hash) + getPagination().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ListRequestDeprecated parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ListRequestDeprecated 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.SingleUseCoupons.CouponOuterClass.ListRequestDeprecated parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ListRequestDeprecated 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.SingleUseCoupons.CouponOuterClass.ListRequestDeprecated parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ListRequestDeprecated parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ListRequestDeprecated parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ListRequestDeprecated 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.SingleUseCoupons.CouponOuterClass.ListRequestDeprecated parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ListRequestDeprecated 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.SingleUseCoupons.CouponOuterClass.ListRequestDeprecated parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ListRequestDeprecated 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.SingleUseCoupons.CouponOuterClass.ListRequestDeprecated 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 single_use_coupons.ListRequestDeprecated}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:single_use_coupons.ListRequestDeprecated)
com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ListRequestDeprecatedOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.passkit.grpc.SingleUseCoupons.CouponOuterClass.internal_static_single_use_coupons_ListRequestDeprecated_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.passkit.grpc.SingleUseCoupons.CouponOuterClass.internal_static_single_use_coupons_ListRequestDeprecated_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ListRequestDeprecated.class, com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ListRequestDeprecated.Builder.class);
}
// Construct using com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ListRequestDeprecated.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();
couponCampaignId_ = "";
if (paginationBuilder_ == null) {
pagination_ = null;
} else {
pagination_ = null;
paginationBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.passkit.grpc.SingleUseCoupons.CouponOuterClass.internal_static_single_use_coupons_ListRequestDeprecated_descriptor;
}
@java.lang.Override
public com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ListRequestDeprecated getDefaultInstanceForType() {
return com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ListRequestDeprecated.getDefaultInstance();
}
@java.lang.Override
public com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ListRequestDeprecated build() {
com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ListRequestDeprecated result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ListRequestDeprecated buildPartial() {
com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ListRequestDeprecated result = new com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ListRequestDeprecated(this);
result.couponCampaignId_ = couponCampaignId_;
if (paginationBuilder_ == null) {
result.pagination_ = pagination_;
} else {
result.pagination_ = paginationBuilder_.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.SingleUseCoupons.CouponOuterClass.ListRequestDeprecated) {
return mergeFrom((com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ListRequestDeprecated)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ListRequestDeprecated other) {
if (other == com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ListRequestDeprecated.getDefaultInstance()) return this;
if (!other.getCouponCampaignId().isEmpty()) {
couponCampaignId_ = other.couponCampaignId_;
onChanged();
}
if (other.hasPagination()) {
mergePagination(other.getPagination());
}
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.SingleUseCoupons.CouponOuterClass.ListRequestDeprecated parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ListRequestDeprecated) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object couponCampaignId_ = "";
/**
*
* Coupon Campaign ID
*
*
* string couponCampaignId = 1;
* @return The couponCampaignId.
*/
public java.lang.String getCouponCampaignId() {
java.lang.Object ref = couponCampaignId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
couponCampaignId_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Coupon Campaign ID
*
*
* string couponCampaignId = 1;
* @return The bytes for couponCampaignId.
*/
public com.google.protobuf.ByteString
getCouponCampaignIdBytes() {
java.lang.Object ref = couponCampaignId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
couponCampaignId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Coupon Campaign ID
*
*
* string couponCampaignId = 1;
* @param value The couponCampaignId to set.
* @return This builder for chaining.
*/
public Builder setCouponCampaignId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
couponCampaignId_ = value;
onChanged();
return this;
}
/**
*
* Coupon Campaign ID
*
*
* string couponCampaignId = 1;
* @return This builder for chaining.
*/
public Builder clearCouponCampaignId() {
couponCampaignId_ = getDefaultInstance().getCouponCampaignId();
onChanged();
return this;
}
/**
*
* Coupon Campaign ID
*
*
* string couponCampaignId = 1;
* @param value The bytes for couponCampaignId to set.
* @return This builder for chaining.
*/
public Builder setCouponCampaignIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
couponCampaignId_ = value;
onChanged();
return this;
}
private com.passkit.grpc.PaginationOuterClass.Pagination pagination_;
private com.google.protobuf.SingleFieldBuilderV3<
com.passkit.grpc.PaginationOuterClass.Pagination, com.passkit.grpc.PaginationOuterClass.Pagination.Builder, com.passkit.grpc.PaginationOuterClass.PaginationOrBuilder> paginationBuilder_;
/**
*
* External ID
*
*
* .io.Pagination pagination = 2;
* @return Whether the pagination field is set.
*/
public boolean hasPagination() {
return paginationBuilder_ != null || pagination_ != null;
}
/**
*
* External ID
*
*
* .io.Pagination pagination = 2;
* @return The pagination.
*/
public com.passkit.grpc.PaginationOuterClass.Pagination getPagination() {
if (paginationBuilder_ == null) {
return pagination_ == null ? com.passkit.grpc.PaginationOuterClass.Pagination.getDefaultInstance() : pagination_;
} else {
return paginationBuilder_.getMessage();
}
}
/**
*
* External ID
*
*
* .io.Pagination pagination = 2;
*/
public Builder setPagination(com.passkit.grpc.PaginationOuterClass.Pagination value) {
if (paginationBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
pagination_ = value;
onChanged();
} else {
paginationBuilder_.setMessage(value);
}
return this;
}
/**
*
* External ID
*
*
* .io.Pagination pagination = 2;
*/
public Builder setPagination(
com.passkit.grpc.PaginationOuterClass.Pagination.Builder builderForValue) {
if (paginationBuilder_ == null) {
pagination_ = builderForValue.build();
onChanged();
} else {
paginationBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* External ID
*
*
* .io.Pagination pagination = 2;
*/
public Builder mergePagination(com.passkit.grpc.PaginationOuterClass.Pagination value) {
if (paginationBuilder_ == null) {
if (pagination_ != null) {
pagination_ =
com.passkit.grpc.PaginationOuterClass.Pagination.newBuilder(pagination_).mergeFrom(value).buildPartial();
} else {
pagination_ = value;
}
onChanged();
} else {
paginationBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* External ID
*
*
* .io.Pagination pagination = 2;
*/
public Builder clearPagination() {
if (paginationBuilder_ == null) {
pagination_ = null;
onChanged();
} else {
pagination_ = null;
paginationBuilder_ = null;
}
return this;
}
/**
*
* External ID
*
*
* .io.Pagination pagination = 2;
*/
public com.passkit.grpc.PaginationOuterClass.Pagination.Builder getPaginationBuilder() {
onChanged();
return getPaginationFieldBuilder().getBuilder();
}
/**
*
* External ID
*
*
* .io.Pagination pagination = 2;
*/
public com.passkit.grpc.PaginationOuterClass.PaginationOrBuilder getPaginationOrBuilder() {
if (paginationBuilder_ != null) {
return paginationBuilder_.getMessageOrBuilder();
} else {
return pagination_ == null ?
com.passkit.grpc.PaginationOuterClass.Pagination.getDefaultInstance() : pagination_;
}
}
/**
*
* External ID
*
*
* .io.Pagination pagination = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.passkit.grpc.PaginationOuterClass.Pagination, com.passkit.grpc.PaginationOuterClass.Pagination.Builder, com.passkit.grpc.PaginationOuterClass.PaginationOrBuilder>
getPaginationFieldBuilder() {
if (paginationBuilder_ == null) {
paginationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.passkit.grpc.PaginationOuterClass.Pagination, com.passkit.grpc.PaginationOuterClass.Pagination.Builder, com.passkit.grpc.PaginationOuterClass.PaginationOrBuilder>(
getPagination(),
getParentForChildren(),
isClean());
pagination_ = null;
}
return paginationBuilder_;
}
@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:single_use_coupons.ListRequestDeprecated)
}
// @@protoc_insertion_point(class_scope:single_use_coupons.ListRequestDeprecated)
private static final com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ListRequestDeprecated DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ListRequestDeprecated();
}
public static com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ListRequestDeprecated getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ListRequestDeprecated parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ListRequestDeprecated(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.SingleUseCoupons.CouponOuterClass.ListRequestDeprecated getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ListRequestOrBuilder extends
// @@protoc_insertion_point(interface_extends:single_use_coupons.ListRequest)
com.google.protobuf.MessageOrBuilder {
/**
*
* Coupon Campaign ID
*
*
* string couponCampaignId = 1;
* @return The couponCampaignId.
*/
java.lang.String getCouponCampaignId();
/**
*
* Coupon Campaign ID
*
*
* string couponCampaignId = 1;
* @return The bytes for couponCampaignId.
*/
com.google.protobuf.ByteString
getCouponCampaignIdBytes();
/**
*
* External ID
*
*
* .io.Filters filters = 2;
* @return Whether the filters field is set.
*/
boolean hasFilters();
/**
*
* External ID
*
*
* .io.Filters filters = 2;
* @return The filters.
*/
com.passkit.grpc.Filter.Filters getFilters();
/**
*
* External ID
*
*
* .io.Filters filters = 2;
*/
com.passkit.grpc.Filter.FiltersOrBuilder getFiltersOrBuilder();
/**
* bool emailAsCsv = 3;
* @return The emailAsCsv.
*/
boolean getEmailAsCsv();
}
/**
* Protobuf type {@code single_use_coupons.ListRequest}
*/
public static final class ListRequest extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:single_use_coupons.ListRequest)
ListRequestOrBuilder {
private static final long serialVersionUID = 0L;
// Use ListRequest.newBuilder() to construct.
private ListRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ListRequest() {
couponCampaignId_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new ListRequest();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private ListRequest(
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 10: {
java.lang.String s = input.readStringRequireUtf8();
couponCampaignId_ = s;
break;
}
case 18: {
com.passkit.grpc.Filter.Filters.Builder subBuilder = null;
if (filters_ != null) {
subBuilder = filters_.toBuilder();
}
filters_ = input.readMessage(com.passkit.grpc.Filter.Filters.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(filters_);
filters_ = subBuilder.buildPartial();
}
break;
}
case 24: {
emailAsCsv_ = input.readBool();
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.SingleUseCoupons.CouponOuterClass.internal_static_single_use_coupons_ListRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.passkit.grpc.SingleUseCoupons.CouponOuterClass.internal_static_single_use_coupons_ListRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ListRequest.class, com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ListRequest.Builder.class);
}
public static final int COUPONCAMPAIGNID_FIELD_NUMBER = 1;
private volatile java.lang.Object couponCampaignId_;
/**
*
* Coupon Campaign ID
*
*
* string couponCampaignId = 1;
* @return The couponCampaignId.
*/
@java.lang.Override
public java.lang.String getCouponCampaignId() {
java.lang.Object ref = couponCampaignId_;
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();
couponCampaignId_ = s;
return s;
}
}
/**
*
* Coupon Campaign ID
*
*
* string couponCampaignId = 1;
* @return The bytes for couponCampaignId.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getCouponCampaignIdBytes() {
java.lang.Object ref = couponCampaignId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
couponCampaignId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int FILTERS_FIELD_NUMBER = 2;
private com.passkit.grpc.Filter.Filters filters_;
/**
*
* External ID
*
*
* .io.Filters filters = 2;
* @return Whether the filters field is set.
*/
@java.lang.Override
public boolean hasFilters() {
return filters_ != null;
}
/**
*
* External ID
*
*
* .io.Filters filters = 2;
* @return The filters.
*/
@java.lang.Override
public com.passkit.grpc.Filter.Filters getFilters() {
return filters_ == null ? com.passkit.grpc.Filter.Filters.getDefaultInstance() : filters_;
}
/**
*
* External ID
*
*
* .io.Filters filters = 2;
*/
@java.lang.Override
public com.passkit.grpc.Filter.FiltersOrBuilder getFiltersOrBuilder() {
return getFilters();
}
public static final int EMAILASCSV_FIELD_NUMBER = 3;
private boolean emailAsCsv_;
/**
* bool emailAsCsv = 3;
* @return The emailAsCsv.
*/
@java.lang.Override
public boolean getEmailAsCsv() {
return emailAsCsv_;
}
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 (!getCouponCampaignIdBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, couponCampaignId_);
}
if (filters_ != null) {
output.writeMessage(2, getFilters());
}
if (emailAsCsv_ != false) {
output.writeBool(3, emailAsCsv_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getCouponCampaignIdBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, couponCampaignId_);
}
if (filters_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getFilters());
}
if (emailAsCsv_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(3, emailAsCsv_);
}
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.SingleUseCoupons.CouponOuterClass.ListRequest)) {
return super.equals(obj);
}
com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ListRequest other = (com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ListRequest) obj;
if (!getCouponCampaignId()
.equals(other.getCouponCampaignId())) return false;
if (hasFilters() != other.hasFilters()) return false;
if (hasFilters()) {
if (!getFilters()
.equals(other.getFilters())) return false;
}
if (getEmailAsCsv()
!= other.getEmailAsCsv()) 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) + COUPONCAMPAIGNID_FIELD_NUMBER;
hash = (53 * hash) + getCouponCampaignId().hashCode();
if (hasFilters()) {
hash = (37 * hash) + FILTERS_FIELD_NUMBER;
hash = (53 * hash) + getFilters().hashCode();
}
hash = (37 * hash) + EMAILASCSV_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getEmailAsCsv());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ListRequest parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ListRequest 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.SingleUseCoupons.CouponOuterClass.ListRequest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ListRequest 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.SingleUseCoupons.CouponOuterClass.ListRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ListRequest parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ListRequest parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ListRequest 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.SingleUseCoupons.CouponOuterClass.ListRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ListRequest 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.SingleUseCoupons.CouponOuterClass.ListRequest parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ListRequest 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.SingleUseCoupons.CouponOuterClass.ListRequest 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 single_use_coupons.ListRequest}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:single_use_coupons.ListRequest)
com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ListRequestOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.passkit.grpc.SingleUseCoupons.CouponOuterClass.internal_static_single_use_coupons_ListRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.passkit.grpc.SingleUseCoupons.CouponOuterClass.internal_static_single_use_coupons_ListRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ListRequest.class, com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ListRequest.Builder.class);
}
// Construct using com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ListRequest.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();
couponCampaignId_ = "";
if (filtersBuilder_ == null) {
filters_ = null;
} else {
filters_ = null;
filtersBuilder_ = null;
}
emailAsCsv_ = false;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.passkit.grpc.SingleUseCoupons.CouponOuterClass.internal_static_single_use_coupons_ListRequest_descriptor;
}
@java.lang.Override
public com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ListRequest getDefaultInstanceForType() {
return com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ListRequest.getDefaultInstance();
}
@java.lang.Override
public com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ListRequest build() {
com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ListRequest result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ListRequest buildPartial() {
com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ListRequest result = new com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ListRequest(this);
result.couponCampaignId_ = couponCampaignId_;
if (filtersBuilder_ == null) {
result.filters_ = filters_;
} else {
result.filters_ = filtersBuilder_.build();
}
result.emailAsCsv_ = emailAsCsv_;
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.SingleUseCoupons.CouponOuterClass.ListRequest) {
return mergeFrom((com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ListRequest)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ListRequest other) {
if (other == com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ListRequest.getDefaultInstance()) return this;
if (!other.getCouponCampaignId().isEmpty()) {
couponCampaignId_ = other.couponCampaignId_;
onChanged();
}
if (other.hasFilters()) {
mergeFilters(other.getFilters());
}
if (other.getEmailAsCsv() != false) {
setEmailAsCsv(other.getEmailAsCsv());
}
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.SingleUseCoupons.CouponOuterClass.ListRequest parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ListRequest) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object couponCampaignId_ = "";
/**
*
* Coupon Campaign ID
*
*
* string couponCampaignId = 1;
* @return The couponCampaignId.
*/
public java.lang.String getCouponCampaignId() {
java.lang.Object ref = couponCampaignId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
couponCampaignId_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Coupon Campaign ID
*
*
* string couponCampaignId = 1;
* @return The bytes for couponCampaignId.
*/
public com.google.protobuf.ByteString
getCouponCampaignIdBytes() {
java.lang.Object ref = couponCampaignId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
couponCampaignId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Coupon Campaign ID
*
*
* string couponCampaignId = 1;
* @param value The couponCampaignId to set.
* @return This builder for chaining.
*/
public Builder setCouponCampaignId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
couponCampaignId_ = value;
onChanged();
return this;
}
/**
*
* Coupon Campaign ID
*
*
* string couponCampaignId = 1;
* @return This builder for chaining.
*/
public Builder clearCouponCampaignId() {
couponCampaignId_ = getDefaultInstance().getCouponCampaignId();
onChanged();
return this;
}
/**
*
* Coupon Campaign ID
*
*
* string couponCampaignId = 1;
* @param value The bytes for couponCampaignId to set.
* @return This builder for chaining.
*/
public Builder setCouponCampaignIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
couponCampaignId_ = value;
onChanged();
return this;
}
private com.passkit.grpc.Filter.Filters filters_;
private com.google.protobuf.SingleFieldBuilderV3<
com.passkit.grpc.Filter.Filters, com.passkit.grpc.Filter.Filters.Builder, com.passkit.grpc.Filter.FiltersOrBuilder> filtersBuilder_;
/**
*
* External ID
*
*
* .io.Filters filters = 2;
* @return Whether the filters field is set.
*/
public boolean hasFilters() {
return filtersBuilder_ != null || filters_ != null;
}
/**
*
* External ID
*
*
* .io.Filters filters = 2;
* @return The filters.
*/
public com.passkit.grpc.Filter.Filters getFilters() {
if (filtersBuilder_ == null) {
return filters_ == null ? com.passkit.grpc.Filter.Filters.getDefaultInstance() : filters_;
} else {
return filtersBuilder_.getMessage();
}
}
/**
*
* External ID
*
*
* .io.Filters filters = 2;
*/
public Builder setFilters(com.passkit.grpc.Filter.Filters value) {
if (filtersBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
filters_ = value;
onChanged();
} else {
filtersBuilder_.setMessage(value);
}
return this;
}
/**
*
* External ID
*
*
* .io.Filters filters = 2;
*/
public Builder setFilters(
com.passkit.grpc.Filter.Filters.Builder builderForValue) {
if (filtersBuilder_ == null) {
filters_ = builderForValue.build();
onChanged();
} else {
filtersBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* External ID
*
*
* .io.Filters filters = 2;
*/
public Builder mergeFilters(com.passkit.grpc.Filter.Filters value) {
if (filtersBuilder_ == null) {
if (filters_ != null) {
filters_ =
com.passkit.grpc.Filter.Filters.newBuilder(filters_).mergeFrom(value).buildPartial();
} else {
filters_ = value;
}
onChanged();
} else {
filtersBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* External ID
*
*
* .io.Filters filters = 2;
*/
public Builder clearFilters() {
if (filtersBuilder_ == null) {
filters_ = null;
onChanged();
} else {
filters_ = null;
filtersBuilder_ = null;
}
return this;
}
/**
*
* External ID
*
*
* .io.Filters filters = 2;
*/
public com.passkit.grpc.Filter.Filters.Builder getFiltersBuilder() {
onChanged();
return getFiltersFieldBuilder().getBuilder();
}
/**
*
* External ID
*
*
* .io.Filters filters = 2;
*/
public com.passkit.grpc.Filter.FiltersOrBuilder getFiltersOrBuilder() {
if (filtersBuilder_ != null) {
return filtersBuilder_.getMessageOrBuilder();
} else {
return filters_ == null ?
com.passkit.grpc.Filter.Filters.getDefaultInstance() : filters_;
}
}
/**
*
* External ID
*
*
* .io.Filters filters = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.passkit.grpc.Filter.Filters, com.passkit.grpc.Filter.Filters.Builder, com.passkit.grpc.Filter.FiltersOrBuilder>
getFiltersFieldBuilder() {
if (filtersBuilder_ == null) {
filtersBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.passkit.grpc.Filter.Filters, com.passkit.grpc.Filter.Filters.Builder, com.passkit.grpc.Filter.FiltersOrBuilder>(
getFilters(),
getParentForChildren(),
isClean());
filters_ = null;
}
return filtersBuilder_;
}
private boolean emailAsCsv_ ;
/**
* bool emailAsCsv = 3;
* @return The emailAsCsv.
*/
@java.lang.Override
public boolean getEmailAsCsv() {
return emailAsCsv_;
}
/**
* bool emailAsCsv = 3;
* @param value The emailAsCsv to set.
* @return This builder for chaining.
*/
public Builder setEmailAsCsv(boolean value) {
emailAsCsv_ = value;
onChanged();
return this;
}
/**
* bool emailAsCsv = 3;
* @return This builder for chaining.
*/
public Builder clearEmailAsCsv() {
emailAsCsv_ = false;
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:single_use_coupons.ListRequest)
}
// @@protoc_insertion_point(class_scope:single_use_coupons.ListRequest)
private static final com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ListRequest DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ListRequest();
}
public static com.passkit.grpc.SingleUseCoupons.CouponOuterClass.ListRequest getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ListRequest parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ListRequest(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.SingleUseCoupons.CouponOuterClass.ListRequest getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_single_use_coupons_Coupon_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_single_use_coupons_Coupon_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_single_use_coupons_Coupon_MetaDataEntry_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_single_use_coupons_Coupon_MetaDataEntry_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_single_use_coupons_RedemptionDetails_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_single_use_coupons_RedemptionDetails_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_single_use_coupons_RedemptionDetails_MetaDataEntry_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_single_use_coupons_RedemptionDetails_MetaDataEntry_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_single_use_coupons_ExternalIdRequest_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_single_use_coupons_ExternalIdRequest_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_single_use_coupons_ListRequestDeprecated_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_single_use_coupons_ListRequestDeprecated_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_single_use_coupons_ListRequest_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_single_use_coupons_ListRequest_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\"io/single_use_coupons/coupon.proto\022\022si" +
"ngle_use_coupons\032\037google/protobuf/timest" +
"amp.proto\032\032io/common/pagination.proto\032\026i" +
"o/common/filter.proto\032\024io/common/pass.pr" +
"oto\032\030io/common/personal.proto\032\027io/common" +
"/metrics.proto\032.protoc-gen-openapiv2/opt" +
"ions/annotations.proto\"\274\005\n\006Coupon\022\n\n\002id\030" +
"\001 \001(\t\022\022\n\nexternalId\030\002 \001(\t\022\017\n\007offerId\030\003 \001" +
"(\t\022\022\n\ncampaignId\030\004 \001(\t\022\032\n\006person\030\005 \001(\0132\n" +
".io.Person\022:\n\010metaData\030\006 \003(\0132(.single_us" +
"e_coupons.Coupon.MetaDataEntry\022\013\n\003sku\030\007 " +
"\001(\t\022\016\n\006optOut\030\010 \001(\010\0220\n\006status\030\n \001(\0162 .si" +
"ngle_use_coupons.CouponStatus\022.\n\nexpiryD" +
"ate\030\013 \001(\0132\032.google.protobuf.Timestamp\022@\n" +
"\021redemptionDetails\030\014 \001(\0132%.single_use_co" +
"upons.RedemptionDetails\022(\n\rpassOverrides" +
"\030\r \001(\0132\021.io.PassOverrides\022\"\n\014passMetaDat" +
"a\030\016 \001(\0132\014.io.Metadata\022+\n\007created\030\017 \001(\0132\032" +
".google.protobuf.Timestamp\022+\n\007updated\030\020 " +
"\001(\0132\032.google.protobuf.Timestamp\032/\n\rMetaD" +
"ataEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001" +
":u\222Ar\np*\006Coupon2OHolds the details & sta" +
"te of a unique individual coupon instanc" +
"e (i.e. a pass).\322\001\007offerId\322\001\ncampaignIdJ" +
"\004\010\t\020\n\"\356\002\n\021RedemptionDetails\0222\n\016redemptio" +
"nDate\030\001 \001(\0132\032.google.protobuf.Timestamp\022" +
"\026\n\016redemptionCode\030\002 \001(\t\022\013\n\003lat\030\003 \001(\001\022\013\n\003" +
"lon\030\004 \001(\001\022\013\n\003alt\030\005 \001(\005\022\030\n\020redemptionSour" +
"ce\030\006 \001(\t\022\033\n\023redemptionReference\030\007 \001(\t\022\034\n" +
"\024transactionReference\030\010 \001(\t\022\031\n\021transacti" +
"onAmount\030\t \001(\001\022E\n\010metaData\030\n \003(\01323.singl" +
"e_use_coupons.RedemptionDetails.MetaData" +
"Entry\032/\n\rMetaDataEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005v" +
"alue\030\002 \001(\t:\0028\001\"A\n\021ExternalIdRequest\022\030\n\020c" +
"ouponCampaignId\030\001 \001(\t\022\022\n\nexternalId\030\002 \001(" +
"\t\"U\n\025ListRequestDeprecated\022\030\n\020couponCamp" +
"aignId\030\001 \001(\t\022\"\n\npagination\030\002 \001(\0132\016.io.Pa" +
"gination\"Y\n\013ListRequest\022\030\n\020couponCampaig" +
"nId\030\001 \001(\t\022\034\n\007filters\030\002 \001(\0132\013.io.Filters\022" +
"\022\n\nemailAsCsv\030\003 \001(\010*,\n\014CouponStatus\022\016\n\nU" +
"NREDEEMED\020\000\022\014\n\010REDEEMED\020\001B|\n!com.passkit" +
".grpc.SingleUseCouponsZ7stash.passkit.co" +
"m/io/model/sdk/go/io/single_use_coupons\252" +
"\002\035PassKit.Grpc.SingleUseCouponsb\006proto3"
};
descriptor = com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
com.google.protobuf.TimestampProto.getDescriptor(),
com.passkit.grpc.PaginationOuterClass.getDescriptor(),
com.passkit.grpc.Filter.getDescriptor(),
com.passkit.grpc.PassOuterClass.getDescriptor(),
com.passkit.grpc.Personal.getDescriptor(),
com.passkit.grpc.MetricsOuterClass.getDescriptor(),
grpc.gateway.protoc_gen_openapiv2.options.Annotations.getDescriptor(),
});
internal_static_single_use_coupons_Coupon_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_single_use_coupons_Coupon_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_single_use_coupons_Coupon_descriptor,
new java.lang.String[] { "Id", "ExternalId", "OfferId", "CampaignId", "Person", "MetaData", "Sku", "OptOut", "Status", "ExpiryDate", "RedemptionDetails", "PassOverrides", "PassMetaData", "Created", "Updated", });
internal_static_single_use_coupons_Coupon_MetaDataEntry_descriptor =
internal_static_single_use_coupons_Coupon_descriptor.getNestedTypes().get(0);
internal_static_single_use_coupons_Coupon_MetaDataEntry_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_single_use_coupons_Coupon_MetaDataEntry_descriptor,
new java.lang.String[] { "Key", "Value", });
internal_static_single_use_coupons_RedemptionDetails_descriptor =
getDescriptor().getMessageTypes().get(1);
internal_static_single_use_coupons_RedemptionDetails_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_single_use_coupons_RedemptionDetails_descriptor,
new java.lang.String[] { "RedemptionDate", "RedemptionCode", "Lat", "Lon", "Alt", "RedemptionSource", "RedemptionReference", "TransactionReference", "TransactionAmount", "MetaData", });
internal_static_single_use_coupons_RedemptionDetails_MetaDataEntry_descriptor =
internal_static_single_use_coupons_RedemptionDetails_descriptor.getNestedTypes().get(0);
internal_static_single_use_coupons_RedemptionDetails_MetaDataEntry_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_single_use_coupons_RedemptionDetails_MetaDataEntry_descriptor,
new java.lang.String[] { "Key", "Value", });
internal_static_single_use_coupons_ExternalIdRequest_descriptor =
getDescriptor().getMessageTypes().get(2);
internal_static_single_use_coupons_ExternalIdRequest_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_single_use_coupons_ExternalIdRequest_descriptor,
new java.lang.String[] { "CouponCampaignId", "ExternalId", });
internal_static_single_use_coupons_ListRequestDeprecated_descriptor =
getDescriptor().getMessageTypes().get(3);
internal_static_single_use_coupons_ListRequestDeprecated_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_single_use_coupons_ListRequestDeprecated_descriptor,
new java.lang.String[] { "CouponCampaignId", "Pagination", });
internal_static_single_use_coupons_ListRequest_descriptor =
getDescriptor().getMessageTypes().get(4);
internal_static_single_use_coupons_ListRequest_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_single_use_coupons_ListRequest_descriptor,
new java.lang.String[] { "CouponCampaignId", "Filters", "EmailAsCsv", });
com.google.protobuf.ExtensionRegistry registry =
com.google.protobuf.ExtensionRegistry.newInstance();
registry.add(grpc.gateway.protoc_gen_openapiv2.options.Annotations.openapiv2Schema);
com.google.protobuf.Descriptors.FileDescriptor
.internalUpdateFileDescriptor(descriptor, registry);
com.google.protobuf.TimestampProto.getDescriptor();
com.passkit.grpc.PaginationOuterClass.getDescriptor();
com.passkit.grpc.Filter.getDescriptor();
com.passkit.grpc.PassOuterClass.getDescriptor();
com.passkit.grpc.Personal.getDescriptor();
com.passkit.grpc.MetricsOuterClass.getDescriptor();
grpc.gateway.protoc_gen_openapiv2.options.Annotations.getDescriptor();
}
// @@protoc_insertion_point(outer_class_scope)
}