com.passkit.grpc.SingleUseCoupons.Campaign Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: io/single_use_coupons/campaign.proto
package com.passkit.grpc.SingleUseCoupons;
public final class Campaign {
private Campaign() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistryLite registry) {
}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
registerAllExtensions(
(com.google.protobuf.ExtensionRegistryLite) registry);
}
public interface CouponCampaignOrBuilder extends
// @@protoc_insertion_point(interface_extends:single_use_coupons.CouponCampaign)
com.google.protobuf.MessageOrBuilder {
/**
*
* PassKit generated program id (22 characters).
*
*
* string id = 1;
* @return The id.
*/
java.lang.String getId();
/**
*
* PassKit generated program id (22 characters).
*
*
* string id = 1;
* @return The bytes for id.
*/
com.google.protobuf.ByteString
getIdBytes();
/**
*
* Name of the coupon campaign; used in the portal / API. Not shown to the end-customer.
*
*
* string name = 2;
* @return The name.
*/
java.lang.String getName();
/**
*
* Name of the coupon campaign; used in the portal / API. Not shown to the end-customer.
*
*
* string name = 2;
* @return The bytes for name.
*/
com.google.protobuf.ByteString
getNameBytes();
/**
*
* Localized name of the coupon campaign.
*
*
* .io.LocalizedString localizedName = 3;
* @return Whether the localizedName field is set.
*/
boolean hasLocalizedName();
/**
*
* Localized name of the coupon campaign.
*
*
* .io.LocalizedString localizedName = 3;
* @return The localizedName.
*/
com.passkit.grpc.Localization.LocalizedString getLocalizedName();
/**
*
* Localized name of the coupon campaign.
*
*
* .io.LocalizedString localizedName = 3;
*/
com.passkit.grpc.Localization.LocalizedStringOrBuilder getLocalizedNameOrBuilder();
/**
*
* The program status (bitmask of ProjectStatus). Defaults to io.ProjectStatus.PROJECT_ACTIVE_FOR_OBJECT_CREATION + io.ProjectStatus.PROJECT_DRAFT.
*
*
* repeated .io.ProjectStatus status = 5;
* @return A list containing the status.
*/
java.util.List getStatusList();
/**
*
* The program status (bitmask of ProjectStatus). Defaults to io.ProjectStatus.PROJECT_ACTIVE_FOR_OBJECT_CREATION + io.ProjectStatus.PROJECT_DRAFT.
*
*
* repeated .io.ProjectStatus status = 5;
* @return The count of status.
*/
int getStatusCount();
/**
*
* The program status (bitmask of ProjectStatus). Defaults to io.ProjectStatus.PROJECT_ACTIVE_FOR_OBJECT_CREATION + io.ProjectStatus.PROJECT_DRAFT.
*
*
* repeated .io.ProjectStatus status = 5;
* @param index The index of the element to return.
* @return The status at the given index.
*/
com.passkit.grpc.ProjectOuterClass.ProjectStatus getStatus(int index);
/**
*
* The program status (bitmask of ProjectStatus). Defaults to io.ProjectStatus.PROJECT_ACTIVE_FOR_OBJECT_CREATION + io.ProjectStatus.PROJECT_DRAFT.
*
*
* repeated .io.ProjectStatus status = 5;
* @return A list containing the enum numeric values on the wire for status.
*/
java.util.List
getStatusValueList();
/**
*
* The program status (bitmask of ProjectStatus). Defaults to io.ProjectStatus.PROJECT_ACTIVE_FOR_OBJECT_CREATION + io.ProjectStatus.PROJECT_DRAFT.
*
*
* repeated .io.ProjectStatus status = 5;
* @param index The index of the value to return.
* @return The enum numeric value on the wire of status at the given index.
*/
int getStatusValue(int index);
/**
*
* Leave empty for draft campaigns. Needs to be set for campaigns where status contains PROJECT_PUBLISHED.
*
*
* string passTypeIdentifier = 6;
* @return The passTypeIdentifier.
*/
java.lang.String getPassTypeIdentifier();
/**
*
* Leave empty for draft campaigns. Needs to be set for campaigns where status contains PROJECT_PUBLISHED.
*
*
* string passTypeIdentifier = 6;
* @return The bytes for passTypeIdentifier.
*/
com.google.protobuf.ByteString
getPassTypeIdentifierBytes();
/**
*
* The campaign timezone.
*
*
* string ianaTimezone = 7;
* @return The ianaTimezone.
*/
java.lang.String getIanaTimezone();
/**
*
* The campaign timezone.
*
*
* string ianaTimezone = 7;
* @return The bytes for ianaTimezone.
*/
com.google.protobuf.ByteString
getIanaTimezoneBytes();
/**
*
* The date the campaign was created.
*
*
* .google.protobuf.Timestamp created = 10;
* @return Whether the created field is set.
*/
boolean hasCreated();
/**
*
* The date the campaign was created.
*
*
* .google.protobuf.Timestamp created = 10;
* @return The created.
*/
com.google.protobuf.Timestamp getCreated();
/**
*
* The date the campaign was created.
*
*
* .google.protobuf.Timestamp created = 10;
*/
com.google.protobuf.TimestampOrBuilder getCreatedOrBuilder();
/**
*
* The date the campaign updated.
*
*
* .google.protobuf.Timestamp updated = 11;
* @return Whether the updated field is set.
*/
boolean hasUpdated();
/**
*
* The date the campaign updated.
*
*
* .google.protobuf.Timestamp updated = 11;
* @return The updated.
*/
com.google.protobuf.Timestamp getUpdated();
/**
*
* The date the campaign updated.
*
*
* .google.protobuf.Timestamp updated = 11;
*/
com.google.protobuf.TimestampOrBuilder getUpdatedOrBuilder();
}
/**
*
* The Coupon Campaign Details.
*
*
* Protobuf type {@code single_use_coupons.CouponCampaign}
*/
public static final class CouponCampaign extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:single_use_coupons.CouponCampaign)
CouponCampaignOrBuilder {
private static final long serialVersionUID = 0L;
// Use CouponCampaign.newBuilder() to construct.
private CouponCampaign(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private CouponCampaign() {
id_ = "";
name_ = "";
status_ = java.util.Collections.emptyList();
passTypeIdentifier_ = "";
ianaTimezone_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new CouponCampaign();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private CouponCampaign(
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();
name_ = s;
break;
}
case 26: {
com.passkit.grpc.Localization.LocalizedString.Builder subBuilder = null;
if (localizedName_ != null) {
subBuilder = localizedName_.toBuilder();
}
localizedName_ = input.readMessage(com.passkit.grpc.Localization.LocalizedString.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(localizedName_);
localizedName_ = subBuilder.buildPartial();
}
break;
}
case 40: {
int rawValue = input.readEnum();
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
status_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
status_.add(rawValue);
break;
}
case 42: {
int length = input.readRawVarint32();
int oldLimit = input.pushLimit(length);
while(input.getBytesUntilLimit() > 0) {
int rawValue = input.readEnum();
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
status_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
status_.add(rawValue);
}
input.popLimit(oldLimit);
break;
}
case 50: {
java.lang.String s = input.readStringRequireUtf8();
passTypeIdentifier_ = s;
break;
}
case 58: {
java.lang.String s = input.readStringRequireUtf8();
ianaTimezone_ = s;
break;
}
case 82: {
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 90: {
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 {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
status_ = java.util.Collections.unmodifiableList(status_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.passkit.grpc.SingleUseCoupons.Campaign.internal_static_single_use_coupons_CouponCampaign_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.passkit.grpc.SingleUseCoupons.Campaign.internal_static_single_use_coupons_CouponCampaign_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.passkit.grpc.SingleUseCoupons.Campaign.CouponCampaign.class, com.passkit.grpc.SingleUseCoupons.Campaign.CouponCampaign.Builder.class);
}
public static final int ID_FIELD_NUMBER = 1;
private volatile java.lang.Object id_;
/**
*
* PassKit generated program 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 program 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 NAME_FIELD_NUMBER = 2;
private volatile java.lang.Object name_;
/**
*
* Name of the coupon campaign; used in the portal / API. Not shown to the end-customer.
*
*
* string name = 2;
* @return The name.
*/
@java.lang.Override
public java.lang.String getName() {
java.lang.Object ref = name_;
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();
name_ = s;
return s;
}
}
/**
*
* Name of the coupon campaign; used in the portal / API. Not shown to the end-customer.
*
*
* string name = 2;
* @return The bytes for name.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int LOCALIZEDNAME_FIELD_NUMBER = 3;
private com.passkit.grpc.Localization.LocalizedString localizedName_;
/**
*
* Localized name of the coupon campaign.
*
*
* .io.LocalizedString localizedName = 3;
* @return Whether the localizedName field is set.
*/
@java.lang.Override
public boolean hasLocalizedName() {
return localizedName_ != null;
}
/**
*
* Localized name of the coupon campaign.
*
*
* .io.LocalizedString localizedName = 3;
* @return The localizedName.
*/
@java.lang.Override
public com.passkit.grpc.Localization.LocalizedString getLocalizedName() {
return localizedName_ == null ? com.passkit.grpc.Localization.LocalizedString.getDefaultInstance() : localizedName_;
}
/**
*
* Localized name of the coupon campaign.
*
*
* .io.LocalizedString localizedName = 3;
*/
@java.lang.Override
public com.passkit.grpc.Localization.LocalizedStringOrBuilder getLocalizedNameOrBuilder() {
return getLocalizedName();
}
public static final int STATUS_FIELD_NUMBER = 5;
private java.util.List status_;
private static final com.google.protobuf.Internal.ListAdapter.Converter<
java.lang.Integer, com.passkit.grpc.ProjectOuterClass.ProjectStatus> status_converter_ =
new com.google.protobuf.Internal.ListAdapter.Converter<
java.lang.Integer, com.passkit.grpc.ProjectOuterClass.ProjectStatus>() {
public com.passkit.grpc.ProjectOuterClass.ProjectStatus convert(java.lang.Integer from) {
@SuppressWarnings("deprecation")
com.passkit.grpc.ProjectOuterClass.ProjectStatus result = com.passkit.grpc.ProjectOuterClass.ProjectStatus.valueOf(from);
return result == null ? com.passkit.grpc.ProjectOuterClass.ProjectStatus.UNRECOGNIZED : result;
}
};
/**
*
* The program status (bitmask of ProjectStatus). Defaults to io.ProjectStatus.PROJECT_ACTIVE_FOR_OBJECT_CREATION + io.ProjectStatus.PROJECT_DRAFT.
*
*
* repeated .io.ProjectStatus status = 5;
* @return A list containing the status.
*/
@java.lang.Override
public java.util.List getStatusList() {
return new com.google.protobuf.Internal.ListAdapter<
java.lang.Integer, com.passkit.grpc.ProjectOuterClass.ProjectStatus>(status_, status_converter_);
}
/**
*
* The program status (bitmask of ProjectStatus). Defaults to io.ProjectStatus.PROJECT_ACTIVE_FOR_OBJECT_CREATION + io.ProjectStatus.PROJECT_DRAFT.
*
*
* repeated .io.ProjectStatus status = 5;
* @return The count of status.
*/
@java.lang.Override
public int getStatusCount() {
return status_.size();
}
/**
*
* The program status (bitmask of ProjectStatus). Defaults to io.ProjectStatus.PROJECT_ACTIVE_FOR_OBJECT_CREATION + io.ProjectStatus.PROJECT_DRAFT.
*
*
* repeated .io.ProjectStatus status = 5;
* @param index The index of the element to return.
* @return The status at the given index.
*/
@java.lang.Override
public com.passkit.grpc.ProjectOuterClass.ProjectStatus getStatus(int index) {
return status_converter_.convert(status_.get(index));
}
/**
*
* The program status (bitmask of ProjectStatus). Defaults to io.ProjectStatus.PROJECT_ACTIVE_FOR_OBJECT_CREATION + io.ProjectStatus.PROJECT_DRAFT.
*
*
* repeated .io.ProjectStatus status = 5;
* @return A list containing the enum numeric values on the wire for status.
*/
@java.lang.Override
public java.util.List
getStatusValueList() {
return status_;
}
/**
*
* The program status (bitmask of ProjectStatus). Defaults to io.ProjectStatus.PROJECT_ACTIVE_FOR_OBJECT_CREATION + io.ProjectStatus.PROJECT_DRAFT.
*
*
* repeated .io.ProjectStatus status = 5;
* @param index The index of the value to return.
* @return The enum numeric value on the wire of status at the given index.
*/
@java.lang.Override
public int getStatusValue(int index) {
return status_.get(index);
}
private int statusMemoizedSerializedSize;
public static final int PASSTYPEIDENTIFIER_FIELD_NUMBER = 6;
private volatile java.lang.Object passTypeIdentifier_;
/**
*
* Leave empty for draft campaigns. Needs to be set for campaigns where status contains PROJECT_PUBLISHED.
*
*
* string passTypeIdentifier = 6;
* @return The passTypeIdentifier.
*/
@java.lang.Override
public java.lang.String getPassTypeIdentifier() {
java.lang.Object ref = passTypeIdentifier_;
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();
passTypeIdentifier_ = s;
return s;
}
}
/**
*
* Leave empty for draft campaigns. Needs to be set for campaigns where status contains PROJECT_PUBLISHED.
*
*
* string passTypeIdentifier = 6;
* @return The bytes for passTypeIdentifier.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getPassTypeIdentifierBytes() {
java.lang.Object ref = passTypeIdentifier_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
passTypeIdentifier_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int IANATIMEZONE_FIELD_NUMBER = 7;
private volatile java.lang.Object ianaTimezone_;
/**
*
* The campaign timezone.
*
*
* string ianaTimezone = 7;
* @return The ianaTimezone.
*/
@java.lang.Override
public java.lang.String getIanaTimezone() {
java.lang.Object ref = ianaTimezone_;
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();
ianaTimezone_ = s;
return s;
}
}
/**
*
* The campaign timezone.
*
*
* string ianaTimezone = 7;
* @return The bytes for ianaTimezone.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getIanaTimezoneBytes() {
java.lang.Object ref = ianaTimezone_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
ianaTimezone_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int CREATED_FIELD_NUMBER = 10;
private com.google.protobuf.Timestamp created_;
/**
*
* The date the campaign was created.
*
*
* .google.protobuf.Timestamp created = 10;
* @return Whether the created field is set.
*/
@java.lang.Override
public boolean hasCreated() {
return created_ != null;
}
/**
*
* The date the campaign was created.
*
*
* .google.protobuf.Timestamp created = 10;
* @return The created.
*/
@java.lang.Override
public com.google.protobuf.Timestamp getCreated() {
return created_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : created_;
}
/**
*
* The date the campaign was created.
*
*
* .google.protobuf.Timestamp created = 10;
*/
@java.lang.Override
public com.google.protobuf.TimestampOrBuilder getCreatedOrBuilder() {
return getCreated();
}
public static final int UPDATED_FIELD_NUMBER = 11;
private com.google.protobuf.Timestamp updated_;
/**
*
* The date the campaign updated.
*
*
* .google.protobuf.Timestamp updated = 11;
* @return Whether the updated field is set.
*/
@java.lang.Override
public boolean hasUpdated() {
return updated_ != null;
}
/**
*
* The date the campaign updated.
*
*
* .google.protobuf.Timestamp updated = 11;
* @return The updated.
*/
@java.lang.Override
public com.google.protobuf.Timestamp getUpdated() {
return updated_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updated_;
}
/**
*
* The date the campaign updated.
*
*
* .google.protobuf.Timestamp updated = 11;
*/
@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 {
getSerializedSize();
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_);
}
if (localizedName_ != null) {
output.writeMessage(3, getLocalizedName());
}
if (getStatusList().size() > 0) {
output.writeUInt32NoTag(42);
output.writeUInt32NoTag(statusMemoizedSerializedSize);
}
for (int i = 0; i < status_.size(); i++) {
output.writeEnumNoTag(status_.get(i));
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(passTypeIdentifier_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 6, passTypeIdentifier_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ianaTimezone_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 7, ianaTimezone_);
}
if (created_ != null) {
output.writeMessage(10, getCreated());
}
if (updated_ != null) {
output.writeMessage(11, getUpdated());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_);
}
if (localizedName_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getLocalizedName());
}
{
int dataSize = 0;
for (int i = 0; i < status_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeEnumSizeNoTag(status_.get(i));
}
size += dataSize;
if (!getStatusList().isEmpty()) { size += 1;
size += com.google.protobuf.CodedOutputStream
.computeUInt32SizeNoTag(dataSize);
}statusMemoizedSerializedSize = dataSize;
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(passTypeIdentifier_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, passTypeIdentifier_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ianaTimezone_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, ianaTimezone_);
}
if (created_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(10, getCreated());
}
if (updated_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(11, 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.Campaign.CouponCampaign)) {
return super.equals(obj);
}
com.passkit.grpc.SingleUseCoupons.Campaign.CouponCampaign other = (com.passkit.grpc.SingleUseCoupons.Campaign.CouponCampaign) obj;
if (!getId()
.equals(other.getId())) return false;
if (!getName()
.equals(other.getName())) return false;
if (hasLocalizedName() != other.hasLocalizedName()) return false;
if (hasLocalizedName()) {
if (!getLocalizedName()
.equals(other.getLocalizedName())) return false;
}
if (!status_.equals(other.status_)) return false;
if (!getPassTypeIdentifier()
.equals(other.getPassTypeIdentifier())) return false;
if (!getIanaTimezone()
.equals(other.getIanaTimezone())) 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) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
if (hasLocalizedName()) {
hash = (37 * hash) + LOCALIZEDNAME_FIELD_NUMBER;
hash = (53 * hash) + getLocalizedName().hashCode();
}
if (getStatusCount() > 0) {
hash = (37 * hash) + STATUS_FIELD_NUMBER;
hash = (53 * hash) + status_.hashCode();
}
hash = (37 * hash) + PASSTYPEIDENTIFIER_FIELD_NUMBER;
hash = (53 * hash) + getPassTypeIdentifier().hashCode();
hash = (37 * hash) + IANATIMEZONE_FIELD_NUMBER;
hash = (53 * hash) + getIanaTimezone().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.Campaign.CouponCampaign parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.passkit.grpc.SingleUseCoupons.Campaign.CouponCampaign 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.Campaign.CouponCampaign parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.passkit.grpc.SingleUseCoupons.Campaign.CouponCampaign 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.Campaign.CouponCampaign parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.passkit.grpc.SingleUseCoupons.Campaign.CouponCampaign parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.passkit.grpc.SingleUseCoupons.Campaign.CouponCampaign parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.passkit.grpc.SingleUseCoupons.Campaign.CouponCampaign 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.Campaign.CouponCampaign parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.passkit.grpc.SingleUseCoupons.Campaign.CouponCampaign 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.Campaign.CouponCampaign parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.passkit.grpc.SingleUseCoupons.Campaign.CouponCampaign 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.Campaign.CouponCampaign 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 Campaign Details.
*
*
* Protobuf type {@code single_use_coupons.CouponCampaign}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:single_use_coupons.CouponCampaign)
com.passkit.grpc.SingleUseCoupons.Campaign.CouponCampaignOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.passkit.grpc.SingleUseCoupons.Campaign.internal_static_single_use_coupons_CouponCampaign_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.passkit.grpc.SingleUseCoupons.Campaign.internal_static_single_use_coupons_CouponCampaign_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.passkit.grpc.SingleUseCoupons.Campaign.CouponCampaign.class, com.passkit.grpc.SingleUseCoupons.Campaign.CouponCampaign.Builder.class);
}
// Construct using com.passkit.grpc.SingleUseCoupons.Campaign.CouponCampaign.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_ = "";
name_ = "";
if (localizedNameBuilder_ == null) {
localizedName_ = null;
} else {
localizedName_ = null;
localizedNameBuilder_ = null;
}
status_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
passTypeIdentifier_ = "";
ianaTimezone_ = "";
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.Campaign.internal_static_single_use_coupons_CouponCampaign_descriptor;
}
@java.lang.Override
public com.passkit.grpc.SingleUseCoupons.Campaign.CouponCampaign getDefaultInstanceForType() {
return com.passkit.grpc.SingleUseCoupons.Campaign.CouponCampaign.getDefaultInstance();
}
@java.lang.Override
public com.passkit.grpc.SingleUseCoupons.Campaign.CouponCampaign build() {
com.passkit.grpc.SingleUseCoupons.Campaign.CouponCampaign result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.passkit.grpc.SingleUseCoupons.Campaign.CouponCampaign buildPartial() {
com.passkit.grpc.SingleUseCoupons.Campaign.CouponCampaign result = new com.passkit.grpc.SingleUseCoupons.Campaign.CouponCampaign(this);
int from_bitField0_ = bitField0_;
result.id_ = id_;
result.name_ = name_;
if (localizedNameBuilder_ == null) {
result.localizedName_ = localizedName_;
} else {
result.localizedName_ = localizedNameBuilder_.build();
}
if (((bitField0_ & 0x00000001) != 0)) {
status_ = java.util.Collections.unmodifiableList(status_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.status_ = status_;
result.passTypeIdentifier_ = passTypeIdentifier_;
result.ianaTimezone_ = ianaTimezone_;
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.Campaign.CouponCampaign) {
return mergeFrom((com.passkit.grpc.SingleUseCoupons.Campaign.CouponCampaign)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.passkit.grpc.SingleUseCoupons.Campaign.CouponCampaign other) {
if (other == com.passkit.grpc.SingleUseCoupons.Campaign.CouponCampaign.getDefaultInstance()) return this;
if (!other.getId().isEmpty()) {
id_ = other.id_;
onChanged();
}
if (!other.getName().isEmpty()) {
name_ = other.name_;
onChanged();
}
if (other.hasLocalizedName()) {
mergeLocalizedName(other.getLocalizedName());
}
if (!other.status_.isEmpty()) {
if (status_.isEmpty()) {
status_ = other.status_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureStatusIsMutable();
status_.addAll(other.status_);
}
onChanged();
}
if (!other.getPassTypeIdentifier().isEmpty()) {
passTypeIdentifier_ = other.passTypeIdentifier_;
onChanged();
}
if (!other.getIanaTimezone().isEmpty()) {
ianaTimezone_ = other.ianaTimezone_;
onChanged();
}
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.Campaign.CouponCampaign parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.passkit.grpc.SingleUseCoupons.Campaign.CouponCampaign) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object id_ = "";
/**
*
* PassKit generated program 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 program 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 program 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 program id (22 characters).
*
*
* string id = 1;
* @return This builder for chaining.
*/
public Builder clearId() {
id_ = getDefaultInstance().getId();
onChanged();
return this;
}
/**
*
* PassKit generated program 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 name_ = "";
/**
*
* Name of the coupon campaign; used in the portal / API. Not shown to the end-customer.
*
*
* string name = 2;
* @return The name.
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Name of the coupon campaign; used in the portal / API. Not shown to the end-customer.
*
*
* string name = 2;
* @return The bytes for name.
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Name of the coupon campaign; used in the portal / API. Not shown to the end-customer.
*
*
* string name = 2;
* @param value The name to set.
* @return This builder for chaining.
*/
public Builder setName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
name_ = value;
onChanged();
return this;
}
/**
*
* Name of the coupon campaign; used in the portal / API. Not shown to the end-customer.
*
*
* string name = 2;
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
onChanged();
return this;
}
/**
*
* Name of the coupon campaign; used in the portal / API. Not shown to the end-customer.
*
*
* string name = 2;
* @param value The bytes for name to set.
* @return This builder for chaining.
*/
public Builder setNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
name_ = value;
onChanged();
return this;
}
private com.passkit.grpc.Localization.LocalizedString localizedName_;
private com.google.protobuf.SingleFieldBuilderV3<
com.passkit.grpc.Localization.LocalizedString, com.passkit.grpc.Localization.LocalizedString.Builder, com.passkit.grpc.Localization.LocalizedStringOrBuilder> localizedNameBuilder_;
/**
*
* Localized name of the coupon campaign.
*
*
* .io.LocalizedString localizedName = 3;
* @return Whether the localizedName field is set.
*/
public boolean hasLocalizedName() {
return localizedNameBuilder_ != null || localizedName_ != null;
}
/**
*
* Localized name of the coupon campaign.
*
*
* .io.LocalizedString localizedName = 3;
* @return The localizedName.
*/
public com.passkit.grpc.Localization.LocalizedString getLocalizedName() {
if (localizedNameBuilder_ == null) {
return localizedName_ == null ? com.passkit.grpc.Localization.LocalizedString.getDefaultInstance() : localizedName_;
} else {
return localizedNameBuilder_.getMessage();
}
}
/**
*
* Localized name of the coupon campaign.
*
*
* .io.LocalizedString localizedName = 3;
*/
public Builder setLocalizedName(com.passkit.grpc.Localization.LocalizedString value) {
if (localizedNameBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
localizedName_ = value;
onChanged();
} else {
localizedNameBuilder_.setMessage(value);
}
return this;
}
/**
*
* Localized name of the coupon campaign.
*
*
* .io.LocalizedString localizedName = 3;
*/
public Builder setLocalizedName(
com.passkit.grpc.Localization.LocalizedString.Builder builderForValue) {
if (localizedNameBuilder_ == null) {
localizedName_ = builderForValue.build();
onChanged();
} else {
localizedNameBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Localized name of the coupon campaign.
*
*
* .io.LocalizedString localizedName = 3;
*/
public Builder mergeLocalizedName(com.passkit.grpc.Localization.LocalizedString value) {
if (localizedNameBuilder_ == null) {
if (localizedName_ != null) {
localizedName_ =
com.passkit.grpc.Localization.LocalizedString.newBuilder(localizedName_).mergeFrom(value).buildPartial();
} else {
localizedName_ = value;
}
onChanged();
} else {
localizedNameBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Localized name of the coupon campaign.
*
*
* .io.LocalizedString localizedName = 3;
*/
public Builder clearLocalizedName() {
if (localizedNameBuilder_ == null) {
localizedName_ = null;
onChanged();
} else {
localizedName_ = null;
localizedNameBuilder_ = null;
}
return this;
}
/**
*
* Localized name of the coupon campaign.
*
*
* .io.LocalizedString localizedName = 3;
*/
public com.passkit.grpc.Localization.LocalizedString.Builder getLocalizedNameBuilder() {
onChanged();
return getLocalizedNameFieldBuilder().getBuilder();
}
/**
*
* Localized name of the coupon campaign.
*
*
* .io.LocalizedString localizedName = 3;
*/
public com.passkit.grpc.Localization.LocalizedStringOrBuilder getLocalizedNameOrBuilder() {
if (localizedNameBuilder_ != null) {
return localizedNameBuilder_.getMessageOrBuilder();
} else {
return localizedName_ == null ?
com.passkit.grpc.Localization.LocalizedString.getDefaultInstance() : localizedName_;
}
}
/**
*
* Localized name of the coupon campaign.
*
*
* .io.LocalizedString localizedName = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.passkit.grpc.Localization.LocalizedString, com.passkit.grpc.Localization.LocalizedString.Builder, com.passkit.grpc.Localization.LocalizedStringOrBuilder>
getLocalizedNameFieldBuilder() {
if (localizedNameBuilder_ == null) {
localizedNameBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.passkit.grpc.Localization.LocalizedString, com.passkit.grpc.Localization.LocalizedString.Builder, com.passkit.grpc.Localization.LocalizedStringOrBuilder>(
getLocalizedName(),
getParentForChildren(),
isClean());
localizedName_ = null;
}
return localizedNameBuilder_;
}
private java.util.List status_ =
java.util.Collections.emptyList();
private void ensureStatusIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
status_ = new java.util.ArrayList(status_);
bitField0_ |= 0x00000001;
}
}
/**
*
* The program status (bitmask of ProjectStatus). Defaults to io.ProjectStatus.PROJECT_ACTIVE_FOR_OBJECT_CREATION + io.ProjectStatus.PROJECT_DRAFT.
*
*
* repeated .io.ProjectStatus status = 5;
* @return A list containing the status.
*/
public java.util.List getStatusList() {
return new com.google.protobuf.Internal.ListAdapter<
java.lang.Integer, com.passkit.grpc.ProjectOuterClass.ProjectStatus>(status_, status_converter_);
}
/**
*
* The program status (bitmask of ProjectStatus). Defaults to io.ProjectStatus.PROJECT_ACTIVE_FOR_OBJECT_CREATION + io.ProjectStatus.PROJECT_DRAFT.
*
*
* repeated .io.ProjectStatus status = 5;
* @return The count of status.
*/
public int getStatusCount() {
return status_.size();
}
/**
*
* The program status (bitmask of ProjectStatus). Defaults to io.ProjectStatus.PROJECT_ACTIVE_FOR_OBJECT_CREATION + io.ProjectStatus.PROJECT_DRAFT.
*
*
* repeated .io.ProjectStatus status = 5;
* @param index The index of the element to return.
* @return The status at the given index.
*/
public com.passkit.grpc.ProjectOuterClass.ProjectStatus getStatus(int index) {
return status_converter_.convert(status_.get(index));
}
/**
*
* The program status (bitmask of ProjectStatus). Defaults to io.ProjectStatus.PROJECT_ACTIVE_FOR_OBJECT_CREATION + io.ProjectStatus.PROJECT_DRAFT.
*
*
* repeated .io.ProjectStatus status = 5;
* @param index The index to set the value at.
* @param value The status to set.
* @return This builder for chaining.
*/
public Builder setStatus(
int index, com.passkit.grpc.ProjectOuterClass.ProjectStatus value) {
if (value == null) {
throw new NullPointerException();
}
ensureStatusIsMutable();
status_.set(index, value.getNumber());
onChanged();
return this;
}
/**
*
* The program status (bitmask of ProjectStatus). Defaults to io.ProjectStatus.PROJECT_ACTIVE_FOR_OBJECT_CREATION + io.ProjectStatus.PROJECT_DRAFT.
*
*
* repeated .io.ProjectStatus status = 5;
* @param value The status to add.
* @return This builder for chaining.
*/
public Builder addStatus(com.passkit.grpc.ProjectOuterClass.ProjectStatus value) {
if (value == null) {
throw new NullPointerException();
}
ensureStatusIsMutable();
status_.add(value.getNumber());
onChanged();
return this;
}
/**
*
* The program status (bitmask of ProjectStatus). Defaults to io.ProjectStatus.PROJECT_ACTIVE_FOR_OBJECT_CREATION + io.ProjectStatus.PROJECT_DRAFT.
*
*
* repeated .io.ProjectStatus status = 5;
* @param values The status to add.
* @return This builder for chaining.
*/
public Builder addAllStatus(
java.lang.Iterable extends com.passkit.grpc.ProjectOuterClass.ProjectStatus> values) {
ensureStatusIsMutable();
for (com.passkit.grpc.ProjectOuterClass.ProjectStatus value : values) {
status_.add(value.getNumber());
}
onChanged();
return this;
}
/**
*
* The program status (bitmask of ProjectStatus). Defaults to io.ProjectStatus.PROJECT_ACTIVE_FOR_OBJECT_CREATION + io.ProjectStatus.PROJECT_DRAFT.
*
*
* repeated .io.ProjectStatus status = 5;
* @return This builder for chaining.
*/
public Builder clearStatus() {
status_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
* The program status (bitmask of ProjectStatus). Defaults to io.ProjectStatus.PROJECT_ACTIVE_FOR_OBJECT_CREATION + io.ProjectStatus.PROJECT_DRAFT.
*
*
* repeated .io.ProjectStatus status = 5;
* @return A list containing the enum numeric values on the wire for status.
*/
public java.util.List
getStatusValueList() {
return java.util.Collections.unmodifiableList(status_);
}
/**
*
* The program status (bitmask of ProjectStatus). Defaults to io.ProjectStatus.PROJECT_ACTIVE_FOR_OBJECT_CREATION + io.ProjectStatus.PROJECT_DRAFT.
*
*
* repeated .io.ProjectStatus status = 5;
* @param index The index of the value to return.
* @return The enum numeric value on the wire of status at the given index.
*/
public int getStatusValue(int index) {
return status_.get(index);
}
/**
*
* The program status (bitmask of ProjectStatus). Defaults to io.ProjectStatus.PROJECT_ACTIVE_FOR_OBJECT_CREATION + io.ProjectStatus.PROJECT_DRAFT.
*
*
* repeated .io.ProjectStatus status = 5;
* @param index The index of the value to return.
* @return The enum numeric value on the wire of status at the given index.
* @return This builder for chaining.
*/
public Builder setStatusValue(
int index, int value) {
ensureStatusIsMutable();
status_.set(index, value);
onChanged();
return this;
}
/**
*
* The program status (bitmask of ProjectStatus). Defaults to io.ProjectStatus.PROJECT_ACTIVE_FOR_OBJECT_CREATION + io.ProjectStatus.PROJECT_DRAFT.
*
*
* repeated .io.ProjectStatus status = 5;
* @param value The enum numeric value on the wire for status to add.
* @return This builder for chaining.
*/
public Builder addStatusValue(int value) {
ensureStatusIsMutable();
status_.add(value);
onChanged();
return this;
}
/**
*
* The program status (bitmask of ProjectStatus). Defaults to io.ProjectStatus.PROJECT_ACTIVE_FOR_OBJECT_CREATION + io.ProjectStatus.PROJECT_DRAFT.
*
*
* repeated .io.ProjectStatus status = 5;
* @param values The enum numeric values on the wire for status to add.
* @return This builder for chaining.
*/
public Builder addAllStatusValue(
java.lang.Iterable values) {
ensureStatusIsMutable();
for (int value : values) {
status_.add(value);
}
onChanged();
return this;
}
private java.lang.Object passTypeIdentifier_ = "";
/**
*
* Leave empty for draft campaigns. Needs to be set for campaigns where status contains PROJECT_PUBLISHED.
*
*
* string passTypeIdentifier = 6;
* @return The passTypeIdentifier.
*/
public java.lang.String getPassTypeIdentifier() {
java.lang.Object ref = passTypeIdentifier_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
passTypeIdentifier_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Leave empty for draft campaigns. Needs to be set for campaigns where status contains PROJECT_PUBLISHED.
*
*
* string passTypeIdentifier = 6;
* @return The bytes for passTypeIdentifier.
*/
public com.google.protobuf.ByteString
getPassTypeIdentifierBytes() {
java.lang.Object ref = passTypeIdentifier_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
passTypeIdentifier_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Leave empty for draft campaigns. Needs to be set for campaigns where status contains PROJECT_PUBLISHED.
*
*
* string passTypeIdentifier = 6;
* @param value The passTypeIdentifier to set.
* @return This builder for chaining.
*/
public Builder setPassTypeIdentifier(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
passTypeIdentifier_ = value;
onChanged();
return this;
}
/**
*
* Leave empty for draft campaigns. Needs to be set for campaigns where status contains PROJECT_PUBLISHED.
*
*
* string passTypeIdentifier = 6;
* @return This builder for chaining.
*/
public Builder clearPassTypeIdentifier() {
passTypeIdentifier_ = getDefaultInstance().getPassTypeIdentifier();
onChanged();
return this;
}
/**
*
* Leave empty for draft campaigns. Needs to be set for campaigns where status contains PROJECT_PUBLISHED.
*
*
* string passTypeIdentifier = 6;
* @param value The bytes for passTypeIdentifier to set.
* @return This builder for chaining.
*/
public Builder setPassTypeIdentifierBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
passTypeIdentifier_ = value;
onChanged();
return this;
}
private java.lang.Object ianaTimezone_ = "";
/**
*
* The campaign timezone.
*
*
* string ianaTimezone = 7;
* @return The ianaTimezone.
*/
public java.lang.String getIanaTimezone() {
java.lang.Object ref = ianaTimezone_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
ianaTimezone_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The campaign timezone.
*
*
* string ianaTimezone = 7;
* @return The bytes for ianaTimezone.
*/
public com.google.protobuf.ByteString
getIanaTimezoneBytes() {
java.lang.Object ref = ianaTimezone_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
ianaTimezone_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The campaign timezone.
*
*
* string ianaTimezone = 7;
* @param value The ianaTimezone to set.
* @return This builder for chaining.
*/
public Builder setIanaTimezone(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ianaTimezone_ = value;
onChanged();
return this;
}
/**
*
* The campaign timezone.
*
*
* string ianaTimezone = 7;
* @return This builder for chaining.
*/
public Builder clearIanaTimezone() {
ianaTimezone_ = getDefaultInstance().getIanaTimezone();
onChanged();
return this;
}
/**
*
* The campaign timezone.
*
*
* string ianaTimezone = 7;
* @param value The bytes for ianaTimezone to set.
* @return This builder for chaining.
*/
public Builder setIanaTimezoneBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ianaTimezone_ = value;
onChanged();
return this;
}
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 campaign was created.
*
*
* .google.protobuf.Timestamp created = 10;
* @return Whether the created field is set.
*/
public boolean hasCreated() {
return createdBuilder_ != null || created_ != null;
}
/**
*
* The date the campaign was created.
*
*
* .google.protobuf.Timestamp created = 10;
* @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 campaign was created.
*
*
* .google.protobuf.Timestamp created = 10;
*/
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 campaign was created.
*
*
* .google.protobuf.Timestamp created = 10;
*/
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 campaign was created.
*
*
* .google.protobuf.Timestamp created = 10;
*/
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 campaign was created.
*
*
* .google.protobuf.Timestamp created = 10;
*/
public Builder clearCreated() {
if (createdBuilder_ == null) {
created_ = null;
onChanged();
} else {
created_ = null;
createdBuilder_ = null;
}
return this;
}
/**
*
* The date the campaign was created.
*
*
* .google.protobuf.Timestamp created = 10;
*/
public com.google.protobuf.Timestamp.Builder getCreatedBuilder() {
onChanged();
return getCreatedFieldBuilder().getBuilder();
}
/**
*
* The date the campaign was created.
*
*
* .google.protobuf.Timestamp created = 10;
*/
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 campaign was created.
*
*
* .google.protobuf.Timestamp created = 10;
*/
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 campaign updated.
*
*
* .google.protobuf.Timestamp updated = 11;
* @return Whether the updated field is set.
*/
public boolean hasUpdated() {
return updatedBuilder_ != null || updated_ != null;
}
/**
*
* The date the campaign updated.
*
*
* .google.protobuf.Timestamp updated = 11;
* @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 campaign updated.
*
*
* .google.protobuf.Timestamp updated = 11;
*/
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 campaign updated.
*
*
* .google.protobuf.Timestamp updated = 11;
*/
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 campaign updated.
*
*
* .google.protobuf.Timestamp updated = 11;
*/
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 campaign updated.
*
*
* .google.protobuf.Timestamp updated = 11;
*/
public Builder clearUpdated() {
if (updatedBuilder_ == null) {
updated_ = null;
onChanged();
} else {
updated_ = null;
updatedBuilder_ = null;
}
return this;
}
/**
*
* The date the campaign updated.
*
*
* .google.protobuf.Timestamp updated = 11;
*/
public com.google.protobuf.Timestamp.Builder getUpdatedBuilder() {
onChanged();
return getUpdatedFieldBuilder().getBuilder();
}
/**
*
* The date the campaign updated.
*
*
* .google.protobuf.Timestamp updated = 11;
*/
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 campaign updated.
*
*
* .google.protobuf.Timestamp updated = 11;
*/
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.CouponCampaign)
}
// @@protoc_insertion_point(class_scope:single_use_coupons.CouponCampaign)
private static final com.passkit.grpc.SingleUseCoupons.Campaign.CouponCampaign DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.passkit.grpc.SingleUseCoupons.Campaign.CouponCampaign();
}
public static com.passkit.grpc.SingleUseCoupons.Campaign.CouponCampaign getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public CouponCampaign parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new CouponCampaign(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.Campaign.CouponCampaign getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface CouponCampaignAnalyticsResponseOrBuilder extends
// @@protoc_insertion_point(interface_extends:single_use_coupons.CouponCampaignAnalyticsResponse)
com.google.protobuf.MessageOrBuilder {
/**
*
* Period unit of data returned (day, month or year).
*
*
* .io.Period period = 1;
* @return The enum numeric value on the wire for period.
*/
int getPeriodValue();
/**
*
* Period unit of data returned (day, month or year).
*
*
* .io.Period period = 1;
* @return The period.
*/
com.passkit.grpc.Reporting.Period getPeriod();
/**
*
* Passes redeemed in this period.
*
*
* uint32 redeemed = 2;
* @return The redeemed.
*/
int getRedeemed();
/**
*
* Total number of pass redeemed for each device type.
*
*
* .io.DeviceBreakdown devices = 3;
* @return Whether the devices field is set.
*/
boolean hasDevices();
/**
*
* Total number of pass redeemed for each device type.
*
*
* .io.DeviceBreakdown devices = 3;
* @return The devices.
*/
com.passkit.grpc.Reporting.DeviceBreakdown getDevices();
/**
*
* Total number of pass redeemed for each device type.
*
*
* .io.DeviceBreakdown devices = 3;
*/
com.passkit.grpc.Reporting.DeviceBreakdownOrBuilder getDevicesOrBuilder();
/**
*
* Total number of pass redeemed for each distribution source.
*
*
* map<string, uint32> sources = 4;
*/
int getSourcesCount();
/**
*
* Total number of pass redeemed for each distribution source.
*
*
* map<string, uint32> sources = 4;
*/
boolean containsSources(
java.lang.String key);
/**
* Use {@link #getSourcesMap()} instead.
*/
@java.lang.Deprecated
java.util.Map
getSources();
/**
*
* Total number of pass redeemed for each distribution source.
*
*
* map<string, uint32> sources = 4;
*/
java.util.Map
getSourcesMap();
/**
*
* Total number of pass redeemed for each distribution source.
*
*
* map<string, uint32> sources = 4;
*/
int getSourcesOrDefault(
java.lang.String key,
int defaultValue);
/**
*
* Total number of pass redeemed for each distribution source.
*
*
* map<string, uint32> sources = 4;
*/
int getSourcesOrThrow(
java.lang.String key);
/**
*
* Breakdown of data by day, month or year.
*
*
* repeated .io.ChartDataPoints data = 5;
*/
java.util.List
getDataList();
/**
*
* Breakdown of data by day, month or year.
*
*
* repeated .io.ChartDataPoints data = 5;
*/
com.passkit.grpc.Reporting.ChartDataPoints getData(int index);
/**
*
* Breakdown of data by day, month or year.
*
*
* repeated .io.ChartDataPoints data = 5;
*/
int getDataCount();
/**
*
* Breakdown of data by day, month or year.
*
*
* repeated .io.ChartDataPoints data = 5;
*/
java.util.List extends com.passkit.grpc.Reporting.ChartDataPointsOrBuilder>
getDataOrBuilderList();
/**
*
* Breakdown of data by day, month or year.
*
*
* repeated .io.ChartDataPoints data = 5;
*/
com.passkit.grpc.Reporting.ChartDataPointsOrBuilder getDataOrBuilder(
int index);
}
/**
*
* CouponCampaignAnalyticsResponse contains redemption stats for the campaign. Other campaign analytics can be taken from the generic analytics endpoint.
*
*
* Protobuf type {@code single_use_coupons.CouponCampaignAnalyticsResponse}
*/
public static final class CouponCampaignAnalyticsResponse extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:single_use_coupons.CouponCampaignAnalyticsResponse)
CouponCampaignAnalyticsResponseOrBuilder {
private static final long serialVersionUID = 0L;
// Use CouponCampaignAnalyticsResponse.newBuilder() to construct.
private CouponCampaignAnalyticsResponse(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private CouponCampaignAnalyticsResponse() {
period_ = 0;
data_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new CouponCampaignAnalyticsResponse();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private CouponCampaignAnalyticsResponse(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
int rawValue = input.readEnum();
period_ = rawValue;
break;
}
case 16: {
redeemed_ = input.readUInt32();
break;
}
case 26: {
com.passkit.grpc.Reporting.DeviceBreakdown.Builder subBuilder = null;
if (devices_ != null) {
subBuilder = devices_.toBuilder();
}
devices_ = input.readMessage(com.passkit.grpc.Reporting.DeviceBreakdown.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(devices_);
devices_ = subBuilder.buildPartial();
}
break;
}
case 34: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
sources_ = com.google.protobuf.MapField.newMapField(
SourcesDefaultEntryHolder.defaultEntry);
mutable_bitField0_ |= 0x00000001;
}
com.google.protobuf.MapEntry
sources__ = input.readMessage(
SourcesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
sources_.getMutableMap().put(
sources__.getKey(), sources__.getValue());
break;
}
case 42: {
if (!((mutable_bitField0_ & 0x00000002) != 0)) {
data_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000002;
}
data_.add(
input.readMessage(com.passkit.grpc.Reporting.ChartDataPoints.parser(), extensionRegistry));
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000002) != 0)) {
data_ = java.util.Collections.unmodifiableList(data_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.passkit.grpc.SingleUseCoupons.Campaign.internal_static_single_use_coupons_CouponCampaignAnalyticsResponse_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 4:
return internalGetSources();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.passkit.grpc.SingleUseCoupons.Campaign.internal_static_single_use_coupons_CouponCampaignAnalyticsResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.passkit.grpc.SingleUseCoupons.Campaign.CouponCampaignAnalyticsResponse.class, com.passkit.grpc.SingleUseCoupons.Campaign.CouponCampaignAnalyticsResponse.Builder.class);
}
public static final int PERIOD_FIELD_NUMBER = 1;
private int period_;
/**
*
* Period unit of data returned (day, month or year).
*
*
* .io.Period period = 1;
* @return The enum numeric value on the wire for period.
*/
@java.lang.Override public int getPeriodValue() {
return period_;
}
/**
*
* Period unit of data returned (day, month or year).
*
*
* .io.Period period = 1;
* @return The period.
*/
@java.lang.Override public com.passkit.grpc.Reporting.Period getPeriod() {
@SuppressWarnings("deprecation")
com.passkit.grpc.Reporting.Period result = com.passkit.grpc.Reporting.Period.valueOf(period_);
return result == null ? com.passkit.grpc.Reporting.Period.UNRECOGNIZED : result;
}
public static final int REDEEMED_FIELD_NUMBER = 2;
private int redeemed_;
/**
*
* Passes redeemed in this period.
*
*
* uint32 redeemed = 2;
* @return The redeemed.
*/
@java.lang.Override
public int getRedeemed() {
return redeemed_;
}
public static final int DEVICES_FIELD_NUMBER = 3;
private com.passkit.grpc.Reporting.DeviceBreakdown devices_;
/**
*
* Total number of pass redeemed for each device type.
*
*
* .io.DeviceBreakdown devices = 3;
* @return Whether the devices field is set.
*/
@java.lang.Override
public boolean hasDevices() {
return devices_ != null;
}
/**
*
* Total number of pass redeemed for each device type.
*
*
* .io.DeviceBreakdown devices = 3;
* @return The devices.
*/
@java.lang.Override
public com.passkit.grpc.Reporting.DeviceBreakdown getDevices() {
return devices_ == null ? com.passkit.grpc.Reporting.DeviceBreakdown.getDefaultInstance() : devices_;
}
/**
*
* Total number of pass redeemed for each device type.
*
*
* .io.DeviceBreakdown devices = 3;
*/
@java.lang.Override
public com.passkit.grpc.Reporting.DeviceBreakdownOrBuilder getDevicesOrBuilder() {
return getDevices();
}
public static final int SOURCES_FIELD_NUMBER = 4;
private static final class SourcesDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.String, java.lang.Integer> defaultEntry =
com.google.protobuf.MapEntry
.newDefaultInstance(
com.passkit.grpc.SingleUseCoupons.Campaign.internal_static_single_use_coupons_CouponCampaignAnalyticsResponse_SourcesEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.UINT32,
0);
}
private com.google.protobuf.MapField<
java.lang.String, java.lang.Integer> sources_;
private com.google.protobuf.MapField
internalGetSources() {
if (sources_ == null) {
return com.google.protobuf.MapField.emptyMapField(
SourcesDefaultEntryHolder.defaultEntry);
}
return sources_;
}
public int getSourcesCount() {
return internalGetSources().getMap().size();
}
/**
*
* Total number of pass redeemed for each distribution source.
*
*
* map<string, uint32> sources = 4;
*/
@java.lang.Override
public boolean containsSources(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetSources().getMap().containsKey(key);
}
/**
* Use {@link #getSourcesMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getSources() {
return getSourcesMap();
}
/**
*
* Total number of pass redeemed for each distribution source.
*
*
* map<string, uint32> sources = 4;
*/
@java.lang.Override
public java.util.Map getSourcesMap() {
return internalGetSources().getMap();
}
/**
*
* Total number of pass redeemed for each distribution source.
*
*
* map<string, uint32> sources = 4;
*/
@java.lang.Override
public int getSourcesOrDefault(
java.lang.String key,
int defaultValue) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetSources().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* Total number of pass redeemed for each distribution source.
*
*
* map<string, uint32> sources = 4;
*/
@java.lang.Override
public int getSourcesOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetSources().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public static final int DATA_FIELD_NUMBER = 5;
private java.util.List data_;
/**
*
* Breakdown of data by day, month or year.
*
*
* repeated .io.ChartDataPoints data = 5;
*/
@java.lang.Override
public java.util.List getDataList() {
return data_;
}
/**
*
* Breakdown of data by day, month or year.
*
*
* repeated .io.ChartDataPoints data = 5;
*/
@java.lang.Override
public java.util.List extends com.passkit.grpc.Reporting.ChartDataPointsOrBuilder>
getDataOrBuilderList() {
return data_;
}
/**
*
* Breakdown of data by day, month or year.
*
*
* repeated .io.ChartDataPoints data = 5;
*/
@java.lang.Override
public int getDataCount() {
return data_.size();
}
/**
*
* Breakdown of data by day, month or year.
*
*
* repeated .io.ChartDataPoints data = 5;
*/
@java.lang.Override
public com.passkit.grpc.Reporting.ChartDataPoints getData(int index) {
return data_.get(index);
}
/**
*
* Breakdown of data by day, month or year.
*
*
* repeated .io.ChartDataPoints data = 5;
*/
@java.lang.Override
public com.passkit.grpc.Reporting.ChartDataPointsOrBuilder getDataOrBuilder(
int index) {
return data_.get(index);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (period_ != com.passkit.grpc.Reporting.Period.DAY.getNumber()) {
output.writeEnum(1, period_);
}
if (redeemed_ != 0) {
output.writeUInt32(2, redeemed_);
}
if (devices_ != null) {
output.writeMessage(3, getDevices());
}
com.google.protobuf.GeneratedMessageV3
.serializeStringMapTo(
output,
internalGetSources(),
SourcesDefaultEntryHolder.defaultEntry,
4);
for (int i = 0; i < data_.size(); i++) {
output.writeMessage(5, data_.get(i));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (period_ != com.passkit.grpc.Reporting.Period.DAY.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(1, period_);
}
if (redeemed_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeUInt32Size(2, redeemed_);
}
if (devices_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getDevices());
}
for (java.util.Map.Entry entry
: internalGetSources().getMap().entrySet()) {
com.google.protobuf.MapEntry
sources__ = SourcesDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, sources__);
}
for (int i = 0; i < data_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, data_.get(i));
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.passkit.grpc.SingleUseCoupons.Campaign.CouponCampaignAnalyticsResponse)) {
return super.equals(obj);
}
com.passkit.grpc.SingleUseCoupons.Campaign.CouponCampaignAnalyticsResponse other = (com.passkit.grpc.SingleUseCoupons.Campaign.CouponCampaignAnalyticsResponse) obj;
if (period_ != other.period_) return false;
if (getRedeemed()
!= other.getRedeemed()) return false;
if (hasDevices() != other.hasDevices()) return false;
if (hasDevices()) {
if (!getDevices()
.equals(other.getDevices())) return false;
}
if (!internalGetSources().equals(
other.internalGetSources())) return false;
if (!getDataList()
.equals(other.getDataList())) 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) + PERIOD_FIELD_NUMBER;
hash = (53 * hash) + period_;
hash = (37 * hash) + REDEEMED_FIELD_NUMBER;
hash = (53 * hash) + getRedeemed();
if (hasDevices()) {
hash = (37 * hash) + DEVICES_FIELD_NUMBER;
hash = (53 * hash) + getDevices().hashCode();
}
if (!internalGetSources().getMap().isEmpty()) {
hash = (37 * hash) + SOURCES_FIELD_NUMBER;
hash = (53 * hash) + internalGetSources().hashCode();
}
if (getDataCount() > 0) {
hash = (37 * hash) + DATA_FIELD_NUMBER;
hash = (53 * hash) + getDataList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.passkit.grpc.SingleUseCoupons.Campaign.CouponCampaignAnalyticsResponse parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.passkit.grpc.SingleUseCoupons.Campaign.CouponCampaignAnalyticsResponse 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.Campaign.CouponCampaignAnalyticsResponse parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.passkit.grpc.SingleUseCoupons.Campaign.CouponCampaignAnalyticsResponse 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.Campaign.CouponCampaignAnalyticsResponse parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.passkit.grpc.SingleUseCoupons.Campaign.CouponCampaignAnalyticsResponse parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.passkit.grpc.SingleUseCoupons.Campaign.CouponCampaignAnalyticsResponse parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.passkit.grpc.SingleUseCoupons.Campaign.CouponCampaignAnalyticsResponse 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.Campaign.CouponCampaignAnalyticsResponse parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.passkit.grpc.SingleUseCoupons.Campaign.CouponCampaignAnalyticsResponse 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.Campaign.CouponCampaignAnalyticsResponse parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.passkit.grpc.SingleUseCoupons.Campaign.CouponCampaignAnalyticsResponse 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.Campaign.CouponCampaignAnalyticsResponse 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;
}
/**
*
* CouponCampaignAnalyticsResponse contains redemption stats for the campaign. Other campaign analytics can be taken from the generic analytics endpoint.
*
*
* Protobuf type {@code single_use_coupons.CouponCampaignAnalyticsResponse}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:single_use_coupons.CouponCampaignAnalyticsResponse)
com.passkit.grpc.SingleUseCoupons.Campaign.CouponCampaignAnalyticsResponseOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.passkit.grpc.SingleUseCoupons.Campaign.internal_static_single_use_coupons_CouponCampaignAnalyticsResponse_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 4:
return internalGetSources();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMutableMapField(
int number) {
switch (number) {
case 4:
return internalGetMutableSources();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.passkit.grpc.SingleUseCoupons.Campaign.internal_static_single_use_coupons_CouponCampaignAnalyticsResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.passkit.grpc.SingleUseCoupons.Campaign.CouponCampaignAnalyticsResponse.class, com.passkit.grpc.SingleUseCoupons.Campaign.CouponCampaignAnalyticsResponse.Builder.class);
}
// Construct using com.passkit.grpc.SingleUseCoupons.Campaign.CouponCampaignAnalyticsResponse.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getDataFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
period_ = 0;
redeemed_ = 0;
if (devicesBuilder_ == null) {
devices_ = null;
} else {
devices_ = null;
devicesBuilder_ = null;
}
internalGetMutableSources().clear();
if (dataBuilder_ == null) {
data_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
} else {
dataBuilder_.clear();
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.passkit.grpc.SingleUseCoupons.Campaign.internal_static_single_use_coupons_CouponCampaignAnalyticsResponse_descriptor;
}
@java.lang.Override
public com.passkit.grpc.SingleUseCoupons.Campaign.CouponCampaignAnalyticsResponse getDefaultInstanceForType() {
return com.passkit.grpc.SingleUseCoupons.Campaign.CouponCampaignAnalyticsResponse.getDefaultInstance();
}
@java.lang.Override
public com.passkit.grpc.SingleUseCoupons.Campaign.CouponCampaignAnalyticsResponse build() {
com.passkit.grpc.SingleUseCoupons.Campaign.CouponCampaignAnalyticsResponse result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.passkit.grpc.SingleUseCoupons.Campaign.CouponCampaignAnalyticsResponse buildPartial() {
com.passkit.grpc.SingleUseCoupons.Campaign.CouponCampaignAnalyticsResponse result = new com.passkit.grpc.SingleUseCoupons.Campaign.CouponCampaignAnalyticsResponse(this);
int from_bitField0_ = bitField0_;
result.period_ = period_;
result.redeemed_ = redeemed_;
if (devicesBuilder_ == null) {
result.devices_ = devices_;
} else {
result.devices_ = devicesBuilder_.build();
}
result.sources_ = internalGetSources();
result.sources_.makeImmutable();
if (dataBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)) {
data_ = java.util.Collections.unmodifiableList(data_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.data_ = data_;
} else {
result.data_ = dataBuilder_.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.Campaign.CouponCampaignAnalyticsResponse) {
return mergeFrom((com.passkit.grpc.SingleUseCoupons.Campaign.CouponCampaignAnalyticsResponse)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.passkit.grpc.SingleUseCoupons.Campaign.CouponCampaignAnalyticsResponse other) {
if (other == com.passkit.grpc.SingleUseCoupons.Campaign.CouponCampaignAnalyticsResponse.getDefaultInstance()) return this;
if (other.period_ != 0) {
setPeriodValue(other.getPeriodValue());
}
if (other.getRedeemed() != 0) {
setRedeemed(other.getRedeemed());
}
if (other.hasDevices()) {
mergeDevices(other.getDevices());
}
internalGetMutableSources().mergeFrom(
other.internalGetSources());
if (dataBuilder_ == null) {
if (!other.data_.isEmpty()) {
if (data_.isEmpty()) {
data_ = other.data_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureDataIsMutable();
data_.addAll(other.data_);
}
onChanged();
}
} else {
if (!other.data_.isEmpty()) {
if (dataBuilder_.isEmpty()) {
dataBuilder_.dispose();
dataBuilder_ = null;
data_ = other.data_;
bitField0_ = (bitField0_ & ~0x00000002);
dataBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getDataFieldBuilder() : null;
} else {
dataBuilder_.addAllMessages(other.data_);
}
}
}
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.Campaign.CouponCampaignAnalyticsResponse parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.passkit.grpc.SingleUseCoupons.Campaign.CouponCampaignAnalyticsResponse) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private int period_ = 0;
/**
*
* Period unit of data returned (day, month or year).
*
*
* .io.Period period = 1;
* @return The enum numeric value on the wire for period.
*/
@java.lang.Override public int getPeriodValue() {
return period_;
}
/**
*
* Period unit of data returned (day, month or year).
*
*
* .io.Period period = 1;
* @param value The enum numeric value on the wire for period to set.
* @return This builder for chaining.
*/
public Builder setPeriodValue(int value) {
period_ = value;
onChanged();
return this;
}
/**
*
* Period unit of data returned (day, month or year).
*
*
* .io.Period period = 1;
* @return The period.
*/
@java.lang.Override
public com.passkit.grpc.Reporting.Period getPeriod() {
@SuppressWarnings("deprecation")
com.passkit.grpc.Reporting.Period result = com.passkit.grpc.Reporting.Period.valueOf(period_);
return result == null ? com.passkit.grpc.Reporting.Period.UNRECOGNIZED : result;
}
/**
*
* Period unit of data returned (day, month or year).
*
*
* .io.Period period = 1;
* @param value The period to set.
* @return This builder for chaining.
*/
public Builder setPeriod(com.passkit.grpc.Reporting.Period value) {
if (value == null) {
throw new NullPointerException();
}
period_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Period unit of data returned (day, month or year).
*
*
* .io.Period period = 1;
* @return This builder for chaining.
*/
public Builder clearPeriod() {
period_ = 0;
onChanged();
return this;
}
private int redeemed_ ;
/**
*
* Passes redeemed in this period.
*
*
* uint32 redeemed = 2;
* @return The redeemed.
*/
@java.lang.Override
public int getRedeemed() {
return redeemed_;
}
/**
*
* Passes redeemed in this period.
*
*
* uint32 redeemed = 2;
* @param value The redeemed to set.
* @return This builder for chaining.
*/
public Builder setRedeemed(int value) {
redeemed_ = value;
onChanged();
return this;
}
/**
*
* Passes redeemed in this period.
*
*
* uint32 redeemed = 2;
* @return This builder for chaining.
*/
public Builder clearRedeemed() {
redeemed_ = 0;
onChanged();
return this;
}
private com.passkit.grpc.Reporting.DeviceBreakdown devices_;
private com.google.protobuf.SingleFieldBuilderV3<
com.passkit.grpc.Reporting.DeviceBreakdown, com.passkit.grpc.Reporting.DeviceBreakdown.Builder, com.passkit.grpc.Reporting.DeviceBreakdownOrBuilder> devicesBuilder_;
/**
*
* Total number of pass redeemed for each device type.
*
*
* .io.DeviceBreakdown devices = 3;
* @return Whether the devices field is set.
*/
public boolean hasDevices() {
return devicesBuilder_ != null || devices_ != null;
}
/**
*
* Total number of pass redeemed for each device type.
*
*
* .io.DeviceBreakdown devices = 3;
* @return The devices.
*/
public com.passkit.grpc.Reporting.DeviceBreakdown getDevices() {
if (devicesBuilder_ == null) {
return devices_ == null ? com.passkit.grpc.Reporting.DeviceBreakdown.getDefaultInstance() : devices_;
} else {
return devicesBuilder_.getMessage();
}
}
/**
*
* Total number of pass redeemed for each device type.
*
*
* .io.DeviceBreakdown devices = 3;
*/
public Builder setDevices(com.passkit.grpc.Reporting.DeviceBreakdown value) {
if (devicesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
devices_ = value;
onChanged();
} else {
devicesBuilder_.setMessage(value);
}
return this;
}
/**
*
* Total number of pass redeemed for each device type.
*
*
* .io.DeviceBreakdown devices = 3;
*/
public Builder setDevices(
com.passkit.grpc.Reporting.DeviceBreakdown.Builder builderForValue) {
if (devicesBuilder_ == null) {
devices_ = builderForValue.build();
onChanged();
} else {
devicesBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Total number of pass redeemed for each device type.
*
*
* .io.DeviceBreakdown devices = 3;
*/
public Builder mergeDevices(com.passkit.grpc.Reporting.DeviceBreakdown value) {
if (devicesBuilder_ == null) {
if (devices_ != null) {
devices_ =
com.passkit.grpc.Reporting.DeviceBreakdown.newBuilder(devices_).mergeFrom(value).buildPartial();
} else {
devices_ = value;
}
onChanged();
} else {
devicesBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Total number of pass redeemed for each device type.
*
*
* .io.DeviceBreakdown devices = 3;
*/
public Builder clearDevices() {
if (devicesBuilder_ == null) {
devices_ = null;
onChanged();
} else {
devices_ = null;
devicesBuilder_ = null;
}
return this;
}
/**
*
* Total number of pass redeemed for each device type.
*
*
* .io.DeviceBreakdown devices = 3;
*/
public com.passkit.grpc.Reporting.DeviceBreakdown.Builder getDevicesBuilder() {
onChanged();
return getDevicesFieldBuilder().getBuilder();
}
/**
*
* Total number of pass redeemed for each device type.
*
*
* .io.DeviceBreakdown devices = 3;
*/
public com.passkit.grpc.Reporting.DeviceBreakdownOrBuilder getDevicesOrBuilder() {
if (devicesBuilder_ != null) {
return devicesBuilder_.getMessageOrBuilder();
} else {
return devices_ == null ?
com.passkit.grpc.Reporting.DeviceBreakdown.getDefaultInstance() : devices_;
}
}
/**
*
* Total number of pass redeemed for each device type.
*
*
* .io.DeviceBreakdown devices = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.passkit.grpc.Reporting.DeviceBreakdown, com.passkit.grpc.Reporting.DeviceBreakdown.Builder, com.passkit.grpc.Reporting.DeviceBreakdownOrBuilder>
getDevicesFieldBuilder() {
if (devicesBuilder_ == null) {
devicesBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.passkit.grpc.Reporting.DeviceBreakdown, com.passkit.grpc.Reporting.DeviceBreakdown.Builder, com.passkit.grpc.Reporting.DeviceBreakdownOrBuilder>(
getDevices(),
getParentForChildren(),
isClean());
devices_ = null;
}
return devicesBuilder_;
}
private com.google.protobuf.MapField<
java.lang.String, java.lang.Integer> sources_;
private com.google.protobuf.MapField
internalGetSources() {
if (sources_ == null) {
return com.google.protobuf.MapField.emptyMapField(
SourcesDefaultEntryHolder.defaultEntry);
}
return sources_;
}
private com.google.protobuf.MapField
internalGetMutableSources() {
onChanged();;
if (sources_ == null) {
sources_ = com.google.protobuf.MapField.newMapField(
SourcesDefaultEntryHolder.defaultEntry);
}
if (!sources_.isMutable()) {
sources_ = sources_.copy();
}
return sources_;
}
public int getSourcesCount() {
return internalGetSources().getMap().size();
}
/**
*
* Total number of pass redeemed for each distribution source.
*
*
* map<string, uint32> sources = 4;
*/
@java.lang.Override
public boolean containsSources(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetSources().getMap().containsKey(key);
}
/**
* Use {@link #getSourcesMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getSources() {
return getSourcesMap();
}
/**
*
* Total number of pass redeemed for each distribution source.
*
*
* map<string, uint32> sources = 4;
*/
@java.lang.Override
public java.util.Map getSourcesMap() {
return internalGetSources().getMap();
}
/**
*
* Total number of pass redeemed for each distribution source.
*
*
* map<string, uint32> sources = 4;
*/
@java.lang.Override
public int getSourcesOrDefault(
java.lang.String key,
int defaultValue) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetSources().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* Total number of pass redeemed for each distribution source.
*
*
* map<string, uint32> sources = 4;
*/
@java.lang.Override
public int getSourcesOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetSources().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearSources() {
internalGetMutableSources().getMutableMap()
.clear();
return this;
}
/**
*
* Total number of pass redeemed for each distribution source.
*
*
* map<string, uint32> sources = 4;
*/
public Builder removeSources(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
internalGetMutableSources().getMutableMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutableSources() {
return internalGetMutableSources().getMutableMap();
}
/**
*
* Total number of pass redeemed for each distribution source.
*
*
* map<string, uint32> sources = 4;
*/
public Builder putSources(
java.lang.String key,
int value) {
if (key == null) { throw new NullPointerException("map key"); }
internalGetMutableSources().getMutableMap()
.put(key, value);
return this;
}
/**
*
* Total number of pass redeemed for each distribution source.
*
*
* map<string, uint32> sources = 4;
*/
public Builder putAllSources(
java.util.Map values) {
internalGetMutableSources().getMutableMap()
.putAll(values);
return this;
}
private java.util.List data_ =
java.util.Collections.emptyList();
private void ensureDataIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
data_ = new java.util.ArrayList(data_);
bitField0_ |= 0x00000002;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.passkit.grpc.Reporting.ChartDataPoints, com.passkit.grpc.Reporting.ChartDataPoints.Builder, com.passkit.grpc.Reporting.ChartDataPointsOrBuilder> dataBuilder_;
/**
*
* Breakdown of data by day, month or year.
*
*
* repeated .io.ChartDataPoints data = 5;
*/
public java.util.List getDataList() {
if (dataBuilder_ == null) {
return java.util.Collections.unmodifiableList(data_);
} else {
return dataBuilder_.getMessageList();
}
}
/**
*
* Breakdown of data by day, month or year.
*
*
* repeated .io.ChartDataPoints data = 5;
*/
public int getDataCount() {
if (dataBuilder_ == null) {
return data_.size();
} else {
return dataBuilder_.getCount();
}
}
/**
*
* Breakdown of data by day, month or year.
*
*
* repeated .io.ChartDataPoints data = 5;
*/
public com.passkit.grpc.Reporting.ChartDataPoints getData(int index) {
if (dataBuilder_ == null) {
return data_.get(index);
} else {
return dataBuilder_.getMessage(index);
}
}
/**
*
* Breakdown of data by day, month or year.
*
*
* repeated .io.ChartDataPoints data = 5;
*/
public Builder setData(
int index, com.passkit.grpc.Reporting.ChartDataPoints value) {
if (dataBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureDataIsMutable();
data_.set(index, value);
onChanged();
} else {
dataBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Breakdown of data by day, month or year.
*
*
* repeated .io.ChartDataPoints data = 5;
*/
public Builder setData(
int index, com.passkit.grpc.Reporting.ChartDataPoints.Builder builderForValue) {
if (dataBuilder_ == null) {
ensureDataIsMutable();
data_.set(index, builderForValue.build());
onChanged();
} else {
dataBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Breakdown of data by day, month or year.
*
*
* repeated .io.ChartDataPoints data = 5;
*/
public Builder addData(com.passkit.grpc.Reporting.ChartDataPoints value) {
if (dataBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureDataIsMutable();
data_.add(value);
onChanged();
} else {
dataBuilder_.addMessage(value);
}
return this;
}
/**
*
* Breakdown of data by day, month or year.
*
*
* repeated .io.ChartDataPoints data = 5;
*/
public Builder addData(
int index, com.passkit.grpc.Reporting.ChartDataPoints value) {
if (dataBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureDataIsMutable();
data_.add(index, value);
onChanged();
} else {
dataBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Breakdown of data by day, month or year.
*
*
* repeated .io.ChartDataPoints data = 5;
*/
public Builder addData(
com.passkit.grpc.Reporting.ChartDataPoints.Builder builderForValue) {
if (dataBuilder_ == null) {
ensureDataIsMutable();
data_.add(builderForValue.build());
onChanged();
} else {
dataBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Breakdown of data by day, month or year.
*
*
* repeated .io.ChartDataPoints data = 5;
*/
public Builder addData(
int index, com.passkit.grpc.Reporting.ChartDataPoints.Builder builderForValue) {
if (dataBuilder_ == null) {
ensureDataIsMutable();
data_.add(index, builderForValue.build());
onChanged();
} else {
dataBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Breakdown of data by day, month or year.
*
*
* repeated .io.ChartDataPoints data = 5;
*/
public Builder addAllData(
java.lang.Iterable extends com.passkit.grpc.Reporting.ChartDataPoints> values) {
if (dataBuilder_ == null) {
ensureDataIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, data_);
onChanged();
} else {
dataBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Breakdown of data by day, month or year.
*
*
* repeated .io.ChartDataPoints data = 5;
*/
public Builder clearData() {
if (dataBuilder_ == null) {
data_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
} else {
dataBuilder_.clear();
}
return this;
}
/**
*
* Breakdown of data by day, month or year.
*
*
* repeated .io.ChartDataPoints data = 5;
*/
public Builder removeData(int index) {
if (dataBuilder_ == null) {
ensureDataIsMutable();
data_.remove(index);
onChanged();
} else {
dataBuilder_.remove(index);
}
return this;
}
/**
*
* Breakdown of data by day, month or year.
*
*
* repeated .io.ChartDataPoints data = 5;
*/
public com.passkit.grpc.Reporting.ChartDataPoints.Builder getDataBuilder(
int index) {
return getDataFieldBuilder().getBuilder(index);
}
/**
*
* Breakdown of data by day, month or year.
*
*
* repeated .io.ChartDataPoints data = 5;
*/
public com.passkit.grpc.Reporting.ChartDataPointsOrBuilder getDataOrBuilder(
int index) {
if (dataBuilder_ == null) {
return data_.get(index); } else {
return dataBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Breakdown of data by day, month or year.
*
*
* repeated .io.ChartDataPoints data = 5;
*/
public java.util.List extends com.passkit.grpc.Reporting.ChartDataPointsOrBuilder>
getDataOrBuilderList() {
if (dataBuilder_ != null) {
return dataBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(data_);
}
}
/**
*
* Breakdown of data by day, month or year.
*
*
* repeated .io.ChartDataPoints data = 5;
*/
public com.passkit.grpc.Reporting.ChartDataPoints.Builder addDataBuilder() {
return getDataFieldBuilder().addBuilder(
com.passkit.grpc.Reporting.ChartDataPoints.getDefaultInstance());
}
/**
*
* Breakdown of data by day, month or year.
*
*
* repeated .io.ChartDataPoints data = 5;
*/
public com.passkit.grpc.Reporting.ChartDataPoints.Builder addDataBuilder(
int index) {
return getDataFieldBuilder().addBuilder(
index, com.passkit.grpc.Reporting.ChartDataPoints.getDefaultInstance());
}
/**
*
* Breakdown of data by day, month or year.
*
*
* repeated .io.ChartDataPoints data = 5;
*/
public java.util.List
getDataBuilderList() {
return getDataFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.passkit.grpc.Reporting.ChartDataPoints, com.passkit.grpc.Reporting.ChartDataPoints.Builder, com.passkit.grpc.Reporting.ChartDataPointsOrBuilder>
getDataFieldBuilder() {
if (dataBuilder_ == null) {
dataBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.passkit.grpc.Reporting.ChartDataPoints, com.passkit.grpc.Reporting.ChartDataPoints.Builder, com.passkit.grpc.Reporting.ChartDataPointsOrBuilder>(
data_,
((bitField0_ & 0x00000002) != 0),
getParentForChildren(),
isClean());
data_ = null;
}
return dataBuilder_;
}
@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.CouponCampaignAnalyticsResponse)
}
// @@protoc_insertion_point(class_scope:single_use_coupons.CouponCampaignAnalyticsResponse)
private static final com.passkit.grpc.SingleUseCoupons.Campaign.CouponCampaignAnalyticsResponse DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.passkit.grpc.SingleUseCoupons.Campaign.CouponCampaignAnalyticsResponse();
}
public static com.passkit.grpc.SingleUseCoupons.Campaign.CouponCampaignAnalyticsResponse getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public CouponCampaignAnalyticsResponse parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new CouponCampaignAnalyticsResponse(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.Campaign.CouponCampaignAnalyticsResponse getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface CampaignCopyRequestOrBuilder extends
// @@protoc_insertion_point(interface_extends:single_use_coupons.CampaignCopyRequest)
com.google.protobuf.MessageOrBuilder {
/**
*
* uuid of the campaign to copy.
*
*
* string id = 1;
* @return The id.
*/
java.lang.String getId();
/**
*
* uuid of the campaign to copy.
*
*
* string id = 1;
* @return The bytes for id.
*/
com.google.protobuf.ByteString
getIdBytes();
/**
*
* Optional name for the new campaign.
*
*
* string name = 2;
* @return The name.
*/
java.lang.String getName();
/**
*
* Optional name for the new campaign.
*
*
* string name = 2;
* @return The bytes for name.
*/
com.google.protobuf.ByteString
getNameBytes();
/**
*
* Status to set the copied campaign to.
*
*
* repeated .io.ProjectStatus status = 3;
* @return A list containing the status.
*/
java.util.List getStatusList();
/**
*
* Status to set the copied campaign to.
*
*
* repeated .io.ProjectStatus status = 3;
* @return The count of status.
*/
int getStatusCount();
/**
*
* Status to set the copied campaign to.
*
*
* repeated .io.ProjectStatus status = 3;
* @param index The index of the element to return.
* @return The status at the given index.
*/
com.passkit.grpc.ProjectOuterClass.ProjectStatus getStatus(int index);
/**
*
* Status to set the copied campaign to.
*
*
* repeated .io.ProjectStatus status = 3;
* @return A list containing the enum numeric values on the wire for status.
*/
java.util.List
getStatusValueList();
/**
*
* Status to set the copied campaign to.
*
*
* repeated .io.ProjectStatus status = 3;
* @param index The index of the value to return.
* @return The enum numeric value on the wire of status at the given index.
*/
int getStatusValue(int index);
/**
*
* Can optionally be provided if setting status to published (requires a prod cert).
*
*
* string passTypeIdentifier = 4;
* @return The passTypeIdentifier.
*/
java.lang.String getPassTypeIdentifier();
/**
*
* Can optionally be provided if setting status to published (requires a prod cert).
*
*
* string passTypeIdentifier = 4;
* @return The bytes for passTypeIdentifier.
*/
com.google.protobuf.ByteString
getPassTypeIdentifierBytes();
}
/**
*
* Contains payload for copying a campaign.
*
*
* Protobuf type {@code single_use_coupons.CampaignCopyRequest}
*/
public static final class CampaignCopyRequest extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:single_use_coupons.CampaignCopyRequest)
CampaignCopyRequestOrBuilder {
private static final long serialVersionUID = 0L;
// Use CampaignCopyRequest.newBuilder() to construct.
private CampaignCopyRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private CampaignCopyRequest() {
id_ = "";
name_ = "";
status_ = java.util.Collections.emptyList();
passTypeIdentifier_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new CampaignCopyRequest();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private CampaignCopyRequest(
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();
name_ = s;
break;
}
case 24: {
int rawValue = input.readEnum();
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
status_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
status_.add(rawValue);
break;
}
case 26: {
int length = input.readRawVarint32();
int oldLimit = input.pushLimit(length);
while(input.getBytesUntilLimit() > 0) {
int rawValue = input.readEnum();
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
status_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
status_.add(rawValue);
}
input.popLimit(oldLimit);
break;
}
case 34: {
java.lang.String s = input.readStringRequireUtf8();
passTypeIdentifier_ = 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 {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
status_ = java.util.Collections.unmodifiableList(status_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.passkit.grpc.SingleUseCoupons.Campaign.internal_static_single_use_coupons_CampaignCopyRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.passkit.grpc.SingleUseCoupons.Campaign.internal_static_single_use_coupons_CampaignCopyRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.passkit.grpc.SingleUseCoupons.Campaign.CampaignCopyRequest.class, com.passkit.grpc.SingleUseCoupons.Campaign.CampaignCopyRequest.Builder.class);
}
public static final int ID_FIELD_NUMBER = 1;
private volatile java.lang.Object id_;
/**
*
* uuid of the campaign to copy.
*
*
* 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;
}
}
/**
*
* uuid of the campaign to copy.
*
*
* 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 NAME_FIELD_NUMBER = 2;
private volatile java.lang.Object name_;
/**
*
* Optional name for the new campaign.
*
*
* string name = 2;
* @return The name.
*/
@java.lang.Override
public java.lang.String getName() {
java.lang.Object ref = name_;
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();
name_ = s;
return s;
}
}
/**
*
* Optional name for the new campaign.
*
*
* string name = 2;
* @return The bytes for name.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int STATUS_FIELD_NUMBER = 3;
private java.util.List status_;
private static final com.google.protobuf.Internal.ListAdapter.Converter<
java.lang.Integer, com.passkit.grpc.ProjectOuterClass.ProjectStatus> status_converter_ =
new com.google.protobuf.Internal.ListAdapter.Converter<
java.lang.Integer, com.passkit.grpc.ProjectOuterClass.ProjectStatus>() {
public com.passkit.grpc.ProjectOuterClass.ProjectStatus convert(java.lang.Integer from) {
@SuppressWarnings("deprecation")
com.passkit.grpc.ProjectOuterClass.ProjectStatus result = com.passkit.grpc.ProjectOuterClass.ProjectStatus.valueOf(from);
return result == null ? com.passkit.grpc.ProjectOuterClass.ProjectStatus.UNRECOGNIZED : result;
}
};
/**
*
* Status to set the copied campaign to.
*
*
* repeated .io.ProjectStatus status = 3;
* @return A list containing the status.
*/
@java.lang.Override
public java.util.List getStatusList() {
return new com.google.protobuf.Internal.ListAdapter<
java.lang.Integer, com.passkit.grpc.ProjectOuterClass.ProjectStatus>(status_, status_converter_);
}
/**
*
* Status to set the copied campaign to.
*
*
* repeated .io.ProjectStatus status = 3;
* @return The count of status.
*/
@java.lang.Override
public int getStatusCount() {
return status_.size();
}
/**
*
* Status to set the copied campaign to.
*
*
* repeated .io.ProjectStatus status = 3;
* @param index The index of the element to return.
* @return The status at the given index.
*/
@java.lang.Override
public com.passkit.grpc.ProjectOuterClass.ProjectStatus getStatus(int index) {
return status_converter_.convert(status_.get(index));
}
/**
*
* Status to set the copied campaign to.
*
*
* repeated .io.ProjectStatus status = 3;
* @return A list containing the enum numeric values on the wire for status.
*/
@java.lang.Override
public java.util.List
getStatusValueList() {
return status_;
}
/**
*
* Status to set the copied campaign to.
*
*
* repeated .io.ProjectStatus status = 3;
* @param index The index of the value to return.
* @return The enum numeric value on the wire of status at the given index.
*/
@java.lang.Override
public int getStatusValue(int index) {
return status_.get(index);
}
private int statusMemoizedSerializedSize;
public static final int PASSTYPEIDENTIFIER_FIELD_NUMBER = 4;
private volatile java.lang.Object passTypeIdentifier_;
/**
*
* Can optionally be provided if setting status to published (requires a prod cert).
*
*
* string passTypeIdentifier = 4;
* @return The passTypeIdentifier.
*/
@java.lang.Override
public java.lang.String getPassTypeIdentifier() {
java.lang.Object ref = passTypeIdentifier_;
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();
passTypeIdentifier_ = s;
return s;
}
}
/**
*
* Can optionally be provided if setting status to published (requires a prod cert).
*
*
* string passTypeIdentifier = 4;
* @return The bytes for passTypeIdentifier.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getPassTypeIdentifierBytes() {
java.lang.Object ref = passTypeIdentifier_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
passTypeIdentifier_ = 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 {
getSerializedSize();
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_);
}
if (getStatusList().size() > 0) {
output.writeUInt32NoTag(26);
output.writeUInt32NoTag(statusMemoizedSerializedSize);
}
for (int i = 0; i < status_.size(); i++) {
output.writeEnumNoTag(status_.get(i));
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(passTypeIdentifier_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, passTypeIdentifier_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_);
}
{
int dataSize = 0;
for (int i = 0; i < status_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeEnumSizeNoTag(status_.get(i));
}
size += dataSize;
if (!getStatusList().isEmpty()) { size += 1;
size += com.google.protobuf.CodedOutputStream
.computeUInt32SizeNoTag(dataSize);
}statusMemoizedSerializedSize = dataSize;
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(passTypeIdentifier_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, passTypeIdentifier_);
}
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.Campaign.CampaignCopyRequest)) {
return super.equals(obj);
}
com.passkit.grpc.SingleUseCoupons.Campaign.CampaignCopyRequest other = (com.passkit.grpc.SingleUseCoupons.Campaign.CampaignCopyRequest) obj;
if (!getId()
.equals(other.getId())) return false;
if (!getName()
.equals(other.getName())) return false;
if (!status_.equals(other.status_)) return false;
if (!getPassTypeIdentifier()
.equals(other.getPassTypeIdentifier())) 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) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
if (getStatusCount() > 0) {
hash = (37 * hash) + STATUS_FIELD_NUMBER;
hash = (53 * hash) + status_.hashCode();
}
hash = (37 * hash) + PASSTYPEIDENTIFIER_FIELD_NUMBER;
hash = (53 * hash) + getPassTypeIdentifier().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.passkit.grpc.SingleUseCoupons.Campaign.CampaignCopyRequest parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.passkit.grpc.SingleUseCoupons.Campaign.CampaignCopyRequest 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.Campaign.CampaignCopyRequest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.passkit.grpc.SingleUseCoupons.Campaign.CampaignCopyRequest 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.Campaign.CampaignCopyRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.passkit.grpc.SingleUseCoupons.Campaign.CampaignCopyRequest parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.passkit.grpc.SingleUseCoupons.Campaign.CampaignCopyRequest parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.passkit.grpc.SingleUseCoupons.Campaign.CampaignCopyRequest 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.Campaign.CampaignCopyRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.passkit.grpc.SingleUseCoupons.Campaign.CampaignCopyRequest 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.Campaign.CampaignCopyRequest parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.passkit.grpc.SingleUseCoupons.Campaign.CampaignCopyRequest 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.Campaign.CampaignCopyRequest 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;
}
/**
*
* Contains payload for copying a campaign.
*
*
* Protobuf type {@code single_use_coupons.CampaignCopyRequest}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:single_use_coupons.CampaignCopyRequest)
com.passkit.grpc.SingleUseCoupons.Campaign.CampaignCopyRequestOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.passkit.grpc.SingleUseCoupons.Campaign.internal_static_single_use_coupons_CampaignCopyRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.passkit.grpc.SingleUseCoupons.Campaign.internal_static_single_use_coupons_CampaignCopyRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.passkit.grpc.SingleUseCoupons.Campaign.CampaignCopyRequest.class, com.passkit.grpc.SingleUseCoupons.Campaign.CampaignCopyRequest.Builder.class);
}
// Construct using com.passkit.grpc.SingleUseCoupons.Campaign.CampaignCopyRequest.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_ = "";
name_ = "";
status_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
passTypeIdentifier_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.passkit.grpc.SingleUseCoupons.Campaign.internal_static_single_use_coupons_CampaignCopyRequest_descriptor;
}
@java.lang.Override
public com.passkit.grpc.SingleUseCoupons.Campaign.CampaignCopyRequest getDefaultInstanceForType() {
return com.passkit.grpc.SingleUseCoupons.Campaign.CampaignCopyRequest.getDefaultInstance();
}
@java.lang.Override
public com.passkit.grpc.SingleUseCoupons.Campaign.CampaignCopyRequest build() {
com.passkit.grpc.SingleUseCoupons.Campaign.CampaignCopyRequest result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.passkit.grpc.SingleUseCoupons.Campaign.CampaignCopyRequest buildPartial() {
com.passkit.grpc.SingleUseCoupons.Campaign.CampaignCopyRequest result = new com.passkit.grpc.SingleUseCoupons.Campaign.CampaignCopyRequest(this);
int from_bitField0_ = bitField0_;
result.id_ = id_;
result.name_ = name_;
if (((bitField0_ & 0x00000001) != 0)) {
status_ = java.util.Collections.unmodifiableList(status_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.status_ = status_;
result.passTypeIdentifier_ = passTypeIdentifier_;
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.Campaign.CampaignCopyRequest) {
return mergeFrom((com.passkit.grpc.SingleUseCoupons.Campaign.CampaignCopyRequest)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.passkit.grpc.SingleUseCoupons.Campaign.CampaignCopyRequest other) {
if (other == com.passkit.grpc.SingleUseCoupons.Campaign.CampaignCopyRequest.getDefaultInstance()) return this;
if (!other.getId().isEmpty()) {
id_ = other.id_;
onChanged();
}
if (!other.getName().isEmpty()) {
name_ = other.name_;
onChanged();
}
if (!other.status_.isEmpty()) {
if (status_.isEmpty()) {
status_ = other.status_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureStatusIsMutable();
status_.addAll(other.status_);
}
onChanged();
}
if (!other.getPassTypeIdentifier().isEmpty()) {
passTypeIdentifier_ = other.passTypeIdentifier_;
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.Campaign.CampaignCopyRequest parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.passkit.grpc.SingleUseCoupons.Campaign.CampaignCopyRequest) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object id_ = "";
/**
*
* uuid of the campaign to copy.
*
*
* 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;
}
}
/**
*
* uuid of the campaign to copy.
*
*
* 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;
}
}
/**
*
* uuid of the campaign to copy.
*
*
* 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;
}
/**
*
* uuid of the campaign to copy.
*
*
* string id = 1;
* @return This builder for chaining.
*/
public Builder clearId() {
id_ = getDefaultInstance().getId();
onChanged();
return this;
}
/**
*
* uuid of the campaign to copy.
*
*
* 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 name_ = "";
/**
*
* Optional name for the new campaign.
*
*
* string name = 2;
* @return The name.
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Optional name for the new campaign.
*
*
* string name = 2;
* @return The bytes for name.
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Optional name for the new campaign.
*
*
* string name = 2;
* @param value The name to set.
* @return This builder for chaining.
*/
public Builder setName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
name_ = value;
onChanged();
return this;
}
/**
*
* Optional name for the new campaign.
*
*
* string name = 2;
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
onChanged();
return this;
}
/**
*
* Optional name for the new campaign.
*
*
* string name = 2;
* @param value The bytes for name to set.
* @return This builder for chaining.
*/
public Builder setNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
name_ = value;
onChanged();
return this;
}
private java.util.List status_ =
java.util.Collections.emptyList();
private void ensureStatusIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
status_ = new java.util.ArrayList(status_);
bitField0_ |= 0x00000001;
}
}
/**
*
* Status to set the copied campaign to.
*
*
* repeated .io.ProjectStatus status = 3;
* @return A list containing the status.
*/
public java.util.List getStatusList() {
return new com.google.protobuf.Internal.ListAdapter<
java.lang.Integer, com.passkit.grpc.ProjectOuterClass.ProjectStatus>(status_, status_converter_);
}
/**
*
* Status to set the copied campaign to.
*
*
* repeated .io.ProjectStatus status = 3;
* @return The count of status.
*/
public int getStatusCount() {
return status_.size();
}
/**
*
* Status to set the copied campaign to.
*
*
* repeated .io.ProjectStatus status = 3;
* @param index The index of the element to return.
* @return The status at the given index.
*/
public com.passkit.grpc.ProjectOuterClass.ProjectStatus getStatus(int index) {
return status_converter_.convert(status_.get(index));
}
/**
*
* Status to set the copied campaign to.
*
*
* repeated .io.ProjectStatus status = 3;
* @param index The index to set the value at.
* @param value The status to set.
* @return This builder for chaining.
*/
public Builder setStatus(
int index, com.passkit.grpc.ProjectOuterClass.ProjectStatus value) {
if (value == null) {
throw new NullPointerException();
}
ensureStatusIsMutable();
status_.set(index, value.getNumber());
onChanged();
return this;
}
/**
*
* Status to set the copied campaign to.
*
*
* repeated .io.ProjectStatus status = 3;
* @param value The status to add.
* @return This builder for chaining.
*/
public Builder addStatus(com.passkit.grpc.ProjectOuterClass.ProjectStatus value) {
if (value == null) {
throw new NullPointerException();
}
ensureStatusIsMutable();
status_.add(value.getNumber());
onChanged();
return this;
}
/**
*
* Status to set the copied campaign to.
*
*
* repeated .io.ProjectStatus status = 3;
* @param values The status to add.
* @return This builder for chaining.
*/
public Builder addAllStatus(
java.lang.Iterable extends com.passkit.grpc.ProjectOuterClass.ProjectStatus> values) {
ensureStatusIsMutable();
for (com.passkit.grpc.ProjectOuterClass.ProjectStatus value : values) {
status_.add(value.getNumber());
}
onChanged();
return this;
}
/**
*
* Status to set the copied campaign to.
*
*
* repeated .io.ProjectStatus status = 3;
* @return This builder for chaining.
*/
public Builder clearStatus() {
status_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
* Status to set the copied campaign to.
*
*
* repeated .io.ProjectStatus status = 3;
* @return A list containing the enum numeric values on the wire for status.
*/
public java.util.List
getStatusValueList() {
return java.util.Collections.unmodifiableList(status_);
}
/**
*
* Status to set the copied campaign to.
*
*
* repeated .io.ProjectStatus status = 3;
* @param index The index of the value to return.
* @return The enum numeric value on the wire of status at the given index.
*/
public int getStatusValue(int index) {
return status_.get(index);
}
/**
*
* Status to set the copied campaign to.
*
*
* repeated .io.ProjectStatus status = 3;
* @param index The index of the value to return.
* @return The enum numeric value on the wire of status at the given index.
* @return This builder for chaining.
*/
public Builder setStatusValue(
int index, int value) {
ensureStatusIsMutable();
status_.set(index, value);
onChanged();
return this;
}
/**
*
* Status to set the copied campaign to.
*
*
* repeated .io.ProjectStatus status = 3;
* @param value The enum numeric value on the wire for status to add.
* @return This builder for chaining.
*/
public Builder addStatusValue(int value) {
ensureStatusIsMutable();
status_.add(value);
onChanged();
return this;
}
/**
*
* Status to set the copied campaign to.
*
*
* repeated .io.ProjectStatus status = 3;
* @param values The enum numeric values on the wire for status to add.
* @return This builder for chaining.
*/
public Builder addAllStatusValue(
java.lang.Iterable values) {
ensureStatusIsMutable();
for (int value : values) {
status_.add(value);
}
onChanged();
return this;
}
private java.lang.Object passTypeIdentifier_ = "";
/**
*
* Can optionally be provided if setting status to published (requires a prod cert).
*
*
* string passTypeIdentifier = 4;
* @return The passTypeIdentifier.
*/
public java.lang.String getPassTypeIdentifier() {
java.lang.Object ref = passTypeIdentifier_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
passTypeIdentifier_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Can optionally be provided if setting status to published (requires a prod cert).
*
*
* string passTypeIdentifier = 4;
* @return The bytes for passTypeIdentifier.
*/
public com.google.protobuf.ByteString
getPassTypeIdentifierBytes() {
java.lang.Object ref = passTypeIdentifier_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
passTypeIdentifier_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Can optionally be provided if setting status to published (requires a prod cert).
*
*
* string passTypeIdentifier = 4;
* @param value The passTypeIdentifier to set.
* @return This builder for chaining.
*/
public Builder setPassTypeIdentifier(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
passTypeIdentifier_ = value;
onChanged();
return this;
}
/**
*
* Can optionally be provided if setting status to published (requires a prod cert).
*
*
* string passTypeIdentifier = 4;
* @return This builder for chaining.
*/
public Builder clearPassTypeIdentifier() {
passTypeIdentifier_ = getDefaultInstance().getPassTypeIdentifier();
onChanged();
return this;
}
/**
*
* Can optionally be provided if setting status to published (requires a prod cert).
*
*
* string passTypeIdentifier = 4;
* @param value The bytes for passTypeIdentifier to set.
* @return This builder for chaining.
*/
public Builder setPassTypeIdentifierBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
passTypeIdentifier_ = 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.CampaignCopyRequest)
}
// @@protoc_insertion_point(class_scope:single_use_coupons.CampaignCopyRequest)
private static final com.passkit.grpc.SingleUseCoupons.Campaign.CampaignCopyRequest DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.passkit.grpc.SingleUseCoupons.Campaign.CampaignCopyRequest();
}
public static com.passkit.grpc.SingleUseCoupons.Campaign.CampaignCopyRequest getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public CampaignCopyRequest parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new CampaignCopyRequest(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.Campaign.CampaignCopyRequest getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_single_use_coupons_CouponCampaign_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_single_use_coupons_CouponCampaign_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_single_use_coupons_CouponCampaignAnalyticsResponse_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_single_use_coupons_CouponCampaignAnalyticsResponse_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_single_use_coupons_CouponCampaignAnalyticsResponse_SourcesEntry_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_single_use_coupons_CouponCampaignAnalyticsResponse_SourcesEntry_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_single_use_coupons_CampaignCopyRequest_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_single_use_coupons_CampaignCopyRequest_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/campaign.proto\022\022" +
"single_use_coupons\032\037google/protobuf/time" +
"stamp.proto\032\034io/common/localization.prot" +
"o\032\027io/common/project.proto\032\031io/common/re" +
"porting.proto\032.protoc-gen-openapiv2/opti" +
"ons/annotations.proto\"\254\003\n\016CouponCampaign" +
"\022\n\n\002id\030\001 \001(\t\022\014\n\004name\030\002 \001(\t\022*\n\rlocalizedN" +
"ame\030\003 \001(\0132\023.io.LocalizedString\022!\n\006status" +
"\030\005 \003(\0162\021.io.ProjectStatus\022\032\n\022passTypeIde" +
"ntifier\030\006 \001(\t\022\024\n\014ianaTimezone\030\007 \001(\t\022+\n\007c" +
"reated\030\n \001(\0132\032.google.protobuf.Timestamp" +
"\022+\n\007updated\030\013 \001(\0132\032.google.protobuf.Time" +
"stamp:\222\001\222A\216\001\n\213\001*\017Coupon Campaign2HHolds " +
"the business logic & distribution settin" +
"gs of the Coupon Campaign.\322\001\004name\322\001\007offe" +
"rId\322\001\006status\322\001\tstartDate\322\001\007endDateJ\004\010\004\020\005" +
"J\004\010\010\020\tJ\004\010\t\020\n\"\233\002\n\037CouponCampaignAnalytics" +
"Response\022\032\n\006period\030\001 \001(\0162\n.io.Period\022\020\n\010" +
"redeemed\030\002 \001(\r\022$\n\007devices\030\003 \001(\0132\023.io.Dev" +
"iceBreakdown\022Q\n\007sources\030\004 \003(\[email protected]_u" +
"se_coupons.CouponCampaignAnalyticsRespon" +
"se.SourcesEntry\022!\n\004data\030\005 \003(\0132\023.io.Chart" +
"DataPoints\032.\n\014SourcesEntry\022\013\n\003key\030\001 \001(\t\022" +
"\r\n\005value\030\002 \001(\r:\0028\001\"n\n\023CampaignCopyReques" +
"t\022\n\n\002id\030\001 \001(\t\022\014\n\004name\030\002 \001(\t\022!\n\006status\030\003 " +
"\003(\0162\021.io.ProjectStatus\022\032\n\022passTypeIdenti" +
"fier\030\004 \001(\tB|\n!com.passkit.grpc.SingleUse" +
"CouponsZ7stash.passkit.com/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.Localization.getDescriptor(),
com.passkit.grpc.ProjectOuterClass.getDescriptor(),
com.passkit.grpc.Reporting.getDescriptor(),
grpc.gateway.protoc_gen_openapiv2.options.Annotations.getDescriptor(),
});
internal_static_single_use_coupons_CouponCampaign_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_single_use_coupons_CouponCampaign_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_single_use_coupons_CouponCampaign_descriptor,
new java.lang.String[] { "Id", "Name", "LocalizedName", "Status", "PassTypeIdentifier", "IanaTimezone", "Created", "Updated", });
internal_static_single_use_coupons_CouponCampaignAnalyticsResponse_descriptor =
getDescriptor().getMessageTypes().get(1);
internal_static_single_use_coupons_CouponCampaignAnalyticsResponse_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_single_use_coupons_CouponCampaignAnalyticsResponse_descriptor,
new java.lang.String[] { "Period", "Redeemed", "Devices", "Sources", "Data", });
internal_static_single_use_coupons_CouponCampaignAnalyticsResponse_SourcesEntry_descriptor =
internal_static_single_use_coupons_CouponCampaignAnalyticsResponse_descriptor.getNestedTypes().get(0);
internal_static_single_use_coupons_CouponCampaignAnalyticsResponse_SourcesEntry_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_single_use_coupons_CouponCampaignAnalyticsResponse_SourcesEntry_descriptor,
new java.lang.String[] { "Key", "Value", });
internal_static_single_use_coupons_CampaignCopyRequest_descriptor =
getDescriptor().getMessageTypes().get(2);
internal_static_single_use_coupons_CampaignCopyRequest_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_single_use_coupons_CampaignCopyRequest_descriptor,
new java.lang.String[] { "Id", "Name", "Status", "PassTypeIdentifier", });
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.Localization.getDescriptor();
com.passkit.grpc.ProjectOuterClass.getDescriptor();
com.passkit.grpc.Reporting.getDescriptor();
grpc.gateway.protoc_gen_openapiv2.options.Annotations.getDescriptor();
}
// @@protoc_insertion_point(outer_class_scope)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy