All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.ads.googleads.v9.common.UserAttribute Maven / Gradle / Ivy

The newest version!
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/ads/googleads/v9/common/offline_user_data.proto

package com.google.ads.googleads.v9.common;

/**
 * 
 * User attribute, can only be used with CUSTOMER_MATCH_WITH_ATTRIBUTES job
 * type.
 * 
* * Protobuf type {@code google.ads.googleads.v9.common.UserAttribute} */ public final class UserAttribute extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.ads.googleads.v9.common.UserAttribute) UserAttributeOrBuilder { private static final long serialVersionUID = 0L; // Use UserAttribute.newBuilder() to construct. private UserAttribute(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private UserAttribute() { lastPurchaseDateTime_ = ""; acquisitionDateTime_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new UserAttribute(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private UserAttribute( 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: { bitField0_ |= 0x00000001; lifetimeValueMicros_ = input.readInt64(); break; } case 16: { bitField0_ |= 0x00000002; lifetimeValueBucket_ = input.readInt32(); break; } case 26: { java.lang.String s = input.readStringRequireUtf8(); lastPurchaseDateTime_ = s; break; } case 32: { averagePurchaseCount_ = input.readInt32(); break; } case 40: { averagePurchaseValueMicros_ = input.readInt64(); break; } case 50: { java.lang.String s = input.readStringRequireUtf8(); acquisitionDateTime_ = s; break; } case 58: { com.google.ads.googleads.v9.common.ShoppingLoyalty.Builder subBuilder = null; if (((bitField0_ & 0x00000004) != 0)) { subBuilder = shoppingLoyalty_.toBuilder(); } shoppingLoyalty_ = input.readMessage(com.google.ads.googleads.v9.common.ShoppingLoyalty.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(shoppingLoyalty_); shoppingLoyalty_ = subBuilder.buildPartial(); } bitField0_ |= 0x00000004; break; } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.ads.googleads.v9.common.OfflineUserDataProto.internal_static_google_ads_googleads_v9_common_UserAttribute_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.ads.googleads.v9.common.OfflineUserDataProto.internal_static_google_ads_googleads_v9_common_UserAttribute_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.ads.googleads.v9.common.UserAttribute.class, com.google.ads.googleads.v9.common.UserAttribute.Builder.class); } private int bitField0_; public static final int LIFETIME_VALUE_MICROS_FIELD_NUMBER = 1; private long lifetimeValueMicros_; /** *
   * Advertiser defined lifetime value for the user.
   * 
* * optional int64 lifetime_value_micros = 1; * @return Whether the lifetimeValueMicros field is set. */ @java.lang.Override public boolean hasLifetimeValueMicros() { return ((bitField0_ & 0x00000001) != 0); } /** *
   * Advertiser defined lifetime value for the user.
   * 
* * optional int64 lifetime_value_micros = 1; * @return The lifetimeValueMicros. */ @java.lang.Override public long getLifetimeValueMicros() { return lifetimeValueMicros_; } public static final int LIFETIME_VALUE_BUCKET_FIELD_NUMBER = 2; private int lifetimeValueBucket_; /** *
   * Advertiser defined lifetime value bucket for the user. The valid range for
   * a lifetime value bucket is from 1 (low) to 10 (high), except for remove
   * operation where 0 will also be accepted.
   * 
* * optional int32 lifetime_value_bucket = 2; * @return Whether the lifetimeValueBucket field is set. */ @java.lang.Override public boolean hasLifetimeValueBucket() { return ((bitField0_ & 0x00000002) != 0); } /** *
   * Advertiser defined lifetime value bucket for the user. The valid range for
   * a lifetime value bucket is from 1 (low) to 10 (high), except for remove
   * operation where 0 will also be accepted.
   * 
* * optional int32 lifetime_value_bucket = 2; * @return The lifetimeValueBucket. */ @java.lang.Override public int getLifetimeValueBucket() { return lifetimeValueBucket_; } public static final int LAST_PURCHASE_DATE_TIME_FIELD_NUMBER = 3; private volatile java.lang.Object lastPurchaseDateTime_; /** *
   * Timestamp of the last purchase made by the user.
   * The format is YYYY-MM-DD HH:MM:SS[+/-HH:MM], where [+/-HH:MM] is an
   * optional timezone offset from UTC. If the offset is absent, the API will
   * use the account's timezone as default.
   * 
* * string last_purchase_date_time = 3; * @return The lastPurchaseDateTime. */ @java.lang.Override public java.lang.String getLastPurchaseDateTime() { java.lang.Object ref = lastPurchaseDateTime_; 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(); lastPurchaseDateTime_ = s; return s; } } /** *
   * Timestamp of the last purchase made by the user.
   * The format is YYYY-MM-DD HH:MM:SS[+/-HH:MM], where [+/-HH:MM] is an
   * optional timezone offset from UTC. If the offset is absent, the API will
   * use the account's timezone as default.
   * 
* * string last_purchase_date_time = 3; * @return The bytes for lastPurchaseDateTime. */ @java.lang.Override public com.google.protobuf.ByteString getLastPurchaseDateTimeBytes() { java.lang.Object ref = lastPurchaseDateTime_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); lastPurchaseDateTime_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int AVERAGE_PURCHASE_COUNT_FIELD_NUMBER = 4; private int averagePurchaseCount_; /** *
   * Advertiser defined average number of purchases that are made by the user in
   * a 30 day period.
   * 
* * int32 average_purchase_count = 4; * @return The averagePurchaseCount. */ @java.lang.Override public int getAveragePurchaseCount() { return averagePurchaseCount_; } public static final int AVERAGE_PURCHASE_VALUE_MICROS_FIELD_NUMBER = 5; private long averagePurchaseValueMicros_; /** *
   * Advertiser defined average purchase value in micros for the user.
   * 
* * int64 average_purchase_value_micros = 5; * @return The averagePurchaseValueMicros. */ @java.lang.Override public long getAveragePurchaseValueMicros() { return averagePurchaseValueMicros_; } public static final int ACQUISITION_DATE_TIME_FIELD_NUMBER = 6; private volatile java.lang.Object acquisitionDateTime_; /** *
   * Timestamp when the user was acquired.
   * The format is YYYY-MM-DD HH:MM:SS[+/-HH:MM], where [+/-HH:MM] is an
   * optional timezone offset from UTC. If the offset is absent, the API will
   * use the account's timezone as default.
   * 
* * string acquisition_date_time = 6; * @return The acquisitionDateTime. */ @java.lang.Override public java.lang.String getAcquisitionDateTime() { java.lang.Object ref = acquisitionDateTime_; 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(); acquisitionDateTime_ = s; return s; } } /** *
   * Timestamp when the user was acquired.
   * The format is YYYY-MM-DD HH:MM:SS[+/-HH:MM], where [+/-HH:MM] is an
   * optional timezone offset from UTC. If the offset is absent, the API will
   * use the account's timezone as default.
   * 
* * string acquisition_date_time = 6; * @return The bytes for acquisitionDateTime. */ @java.lang.Override public com.google.protobuf.ByteString getAcquisitionDateTimeBytes() { java.lang.Object ref = acquisitionDateTime_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); acquisitionDateTime_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int SHOPPING_LOYALTY_FIELD_NUMBER = 7; private com.google.ads.googleads.v9.common.ShoppingLoyalty shoppingLoyalty_; /** *
   * The shopping loyalty related data. Shopping utilizes this data to provide
   * users with a better experience. Accessible only to merchants on the
   * allow-list with users’ consent.
   * 
* * optional .google.ads.googleads.v9.common.ShoppingLoyalty shopping_loyalty = 7; * @return Whether the shoppingLoyalty field is set. */ @java.lang.Override public boolean hasShoppingLoyalty() { return ((bitField0_ & 0x00000004) != 0); } /** *
   * The shopping loyalty related data. Shopping utilizes this data to provide
   * users with a better experience. Accessible only to merchants on the
   * allow-list with users’ consent.
   * 
* * optional .google.ads.googleads.v9.common.ShoppingLoyalty shopping_loyalty = 7; * @return The shoppingLoyalty. */ @java.lang.Override public com.google.ads.googleads.v9.common.ShoppingLoyalty getShoppingLoyalty() { return shoppingLoyalty_ == null ? com.google.ads.googleads.v9.common.ShoppingLoyalty.getDefaultInstance() : shoppingLoyalty_; } /** *
   * The shopping loyalty related data. Shopping utilizes this data to provide
   * users with a better experience. Accessible only to merchants on the
   * allow-list with users’ consent.
   * 
* * optional .google.ads.googleads.v9.common.ShoppingLoyalty shopping_loyalty = 7; */ @java.lang.Override public com.google.ads.googleads.v9.common.ShoppingLoyaltyOrBuilder getShoppingLoyaltyOrBuilder() { return shoppingLoyalty_ == null ? com.google.ads.googleads.v9.common.ShoppingLoyalty.getDefaultInstance() : shoppingLoyalty_; } 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 (((bitField0_ & 0x00000001) != 0)) { output.writeInt64(1, lifetimeValueMicros_); } if (((bitField0_ & 0x00000002) != 0)) { output.writeInt32(2, lifetimeValueBucket_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(lastPurchaseDateTime_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, lastPurchaseDateTime_); } if (averagePurchaseCount_ != 0) { output.writeInt32(4, averagePurchaseCount_); } if (averagePurchaseValueMicros_ != 0L) { output.writeInt64(5, averagePurchaseValueMicros_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(acquisitionDateTime_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 6, acquisitionDateTime_); } if (((bitField0_ & 0x00000004) != 0)) { output.writeMessage(7, getShoppingLoyalty()); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(1, lifetimeValueMicros_); } if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream .computeInt32Size(2, lifetimeValueBucket_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(lastPurchaseDateTime_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, lastPurchaseDateTime_); } if (averagePurchaseCount_ != 0) { size += com.google.protobuf.CodedOutputStream .computeInt32Size(4, averagePurchaseCount_); } if (averagePurchaseValueMicros_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(5, averagePurchaseValueMicros_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(acquisitionDateTime_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, acquisitionDateTime_); } if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(7, getShoppingLoyalty()); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.ads.googleads.v9.common.UserAttribute)) { return super.equals(obj); } com.google.ads.googleads.v9.common.UserAttribute other = (com.google.ads.googleads.v9.common.UserAttribute) obj; if (hasLifetimeValueMicros() != other.hasLifetimeValueMicros()) return false; if (hasLifetimeValueMicros()) { if (getLifetimeValueMicros() != other.getLifetimeValueMicros()) return false; } if (hasLifetimeValueBucket() != other.hasLifetimeValueBucket()) return false; if (hasLifetimeValueBucket()) { if (getLifetimeValueBucket() != other.getLifetimeValueBucket()) return false; } if (!getLastPurchaseDateTime() .equals(other.getLastPurchaseDateTime())) return false; if (getAveragePurchaseCount() != other.getAveragePurchaseCount()) return false; if (getAveragePurchaseValueMicros() != other.getAveragePurchaseValueMicros()) return false; if (!getAcquisitionDateTime() .equals(other.getAcquisitionDateTime())) return false; if (hasShoppingLoyalty() != other.hasShoppingLoyalty()) return false; if (hasShoppingLoyalty()) { if (!getShoppingLoyalty() .equals(other.getShoppingLoyalty())) return false; } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (hasLifetimeValueMicros()) { hash = (37 * hash) + LIFETIME_VALUE_MICROS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getLifetimeValueMicros()); } if (hasLifetimeValueBucket()) { hash = (37 * hash) + LIFETIME_VALUE_BUCKET_FIELD_NUMBER; hash = (53 * hash) + getLifetimeValueBucket(); } hash = (37 * hash) + LAST_PURCHASE_DATE_TIME_FIELD_NUMBER; hash = (53 * hash) + getLastPurchaseDateTime().hashCode(); hash = (37 * hash) + AVERAGE_PURCHASE_COUNT_FIELD_NUMBER; hash = (53 * hash) + getAveragePurchaseCount(); hash = (37 * hash) + AVERAGE_PURCHASE_VALUE_MICROS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getAveragePurchaseValueMicros()); hash = (37 * hash) + ACQUISITION_DATE_TIME_FIELD_NUMBER; hash = (53 * hash) + getAcquisitionDateTime().hashCode(); if (hasShoppingLoyalty()) { hash = (37 * hash) + SHOPPING_LOYALTY_FIELD_NUMBER; hash = (53 * hash) + getShoppingLoyalty().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static com.google.ads.googleads.v9.common.UserAttribute parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.ads.googleads.v9.common.UserAttribute parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.ads.googleads.v9.common.UserAttribute parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.ads.googleads.v9.common.UserAttribute parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.ads.googleads.v9.common.UserAttribute parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.ads.googleads.v9.common.UserAttribute parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.ads.googleads.v9.common.UserAttribute parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.ads.googleads.v9.common.UserAttribute parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.google.ads.googleads.v9.common.UserAttribute parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.google.ads.googleads.v9.common.UserAttribute parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.google.ads.googleads.v9.common.UserAttribute parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.ads.googleads.v9.common.UserAttribute parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(com.google.ads.googleads.v9.common.UserAttribute 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; } /** *
   * User attribute, can only be used with CUSTOMER_MATCH_WITH_ATTRIBUTES job
   * type.
   * 
* * Protobuf type {@code google.ads.googleads.v9.common.UserAttribute} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.ads.googleads.v9.common.UserAttribute) com.google.ads.googleads.v9.common.UserAttributeOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.ads.googleads.v9.common.OfflineUserDataProto.internal_static_google_ads_googleads_v9_common_UserAttribute_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.ads.googleads.v9.common.OfflineUserDataProto.internal_static_google_ads_googleads_v9_common_UserAttribute_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.ads.googleads.v9.common.UserAttribute.class, com.google.ads.googleads.v9.common.UserAttribute.Builder.class); } // Construct using com.google.ads.googleads.v9.common.UserAttribute.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getShoppingLoyaltyFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); lifetimeValueMicros_ = 0L; bitField0_ = (bitField0_ & ~0x00000001); lifetimeValueBucket_ = 0; bitField0_ = (bitField0_ & ~0x00000002); lastPurchaseDateTime_ = ""; averagePurchaseCount_ = 0; averagePurchaseValueMicros_ = 0L; acquisitionDateTime_ = ""; if (shoppingLoyaltyBuilder_ == null) { shoppingLoyalty_ = null; } else { shoppingLoyaltyBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000004); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.ads.googleads.v9.common.OfflineUserDataProto.internal_static_google_ads_googleads_v9_common_UserAttribute_descriptor; } @java.lang.Override public com.google.ads.googleads.v9.common.UserAttribute getDefaultInstanceForType() { return com.google.ads.googleads.v9.common.UserAttribute.getDefaultInstance(); } @java.lang.Override public com.google.ads.googleads.v9.common.UserAttribute build() { com.google.ads.googleads.v9.common.UserAttribute result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.ads.googleads.v9.common.UserAttribute buildPartial() { com.google.ads.googleads.v9.common.UserAttribute result = new com.google.ads.googleads.v9.common.UserAttribute(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { result.lifetimeValueMicros_ = lifetimeValueMicros_; to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000002) != 0)) { result.lifetimeValueBucket_ = lifetimeValueBucket_; to_bitField0_ |= 0x00000002; } result.lastPurchaseDateTime_ = lastPurchaseDateTime_; result.averagePurchaseCount_ = averagePurchaseCount_; result.averagePurchaseValueMicros_ = averagePurchaseValueMicros_; result.acquisitionDateTime_ = acquisitionDateTime_; if (((from_bitField0_ & 0x00000004) != 0)) { if (shoppingLoyaltyBuilder_ == null) { result.shoppingLoyalty_ = shoppingLoyalty_; } else { result.shoppingLoyalty_ = shoppingLoyaltyBuilder_.build(); } to_bitField0_ |= 0x00000004; } result.bitField0_ = to_bitField0_; onBuilt(); return result; } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.ads.googleads.v9.common.UserAttribute) { return mergeFrom((com.google.ads.googleads.v9.common.UserAttribute)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.ads.googleads.v9.common.UserAttribute other) { if (other == com.google.ads.googleads.v9.common.UserAttribute.getDefaultInstance()) return this; if (other.hasLifetimeValueMicros()) { setLifetimeValueMicros(other.getLifetimeValueMicros()); } if (other.hasLifetimeValueBucket()) { setLifetimeValueBucket(other.getLifetimeValueBucket()); } if (!other.getLastPurchaseDateTime().isEmpty()) { lastPurchaseDateTime_ = other.lastPurchaseDateTime_; onChanged(); } if (other.getAveragePurchaseCount() != 0) { setAveragePurchaseCount(other.getAveragePurchaseCount()); } if (other.getAveragePurchaseValueMicros() != 0L) { setAveragePurchaseValueMicros(other.getAveragePurchaseValueMicros()); } if (!other.getAcquisitionDateTime().isEmpty()) { acquisitionDateTime_ = other.acquisitionDateTime_; onChanged(); } if (other.hasShoppingLoyalty()) { mergeShoppingLoyalty(other.getShoppingLoyalty()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.google.ads.googleads.v9.common.UserAttribute parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.google.ads.googleads.v9.common.UserAttribute) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private long lifetimeValueMicros_ ; /** *
     * Advertiser defined lifetime value for the user.
     * 
* * optional int64 lifetime_value_micros = 1; * @return Whether the lifetimeValueMicros field is set. */ @java.lang.Override public boolean hasLifetimeValueMicros() { return ((bitField0_ & 0x00000001) != 0); } /** *
     * Advertiser defined lifetime value for the user.
     * 
* * optional int64 lifetime_value_micros = 1; * @return The lifetimeValueMicros. */ @java.lang.Override public long getLifetimeValueMicros() { return lifetimeValueMicros_; } /** *
     * Advertiser defined lifetime value for the user.
     * 
* * optional int64 lifetime_value_micros = 1; * @param value The lifetimeValueMicros to set. * @return This builder for chaining. */ public Builder setLifetimeValueMicros(long value) { bitField0_ |= 0x00000001; lifetimeValueMicros_ = value; onChanged(); return this; } /** *
     * Advertiser defined lifetime value for the user.
     * 
* * optional int64 lifetime_value_micros = 1; * @return This builder for chaining. */ public Builder clearLifetimeValueMicros() { bitField0_ = (bitField0_ & ~0x00000001); lifetimeValueMicros_ = 0L; onChanged(); return this; } private int lifetimeValueBucket_ ; /** *
     * Advertiser defined lifetime value bucket for the user. The valid range for
     * a lifetime value bucket is from 1 (low) to 10 (high), except for remove
     * operation where 0 will also be accepted.
     * 
* * optional int32 lifetime_value_bucket = 2; * @return Whether the lifetimeValueBucket field is set. */ @java.lang.Override public boolean hasLifetimeValueBucket() { return ((bitField0_ & 0x00000002) != 0); } /** *
     * Advertiser defined lifetime value bucket for the user. The valid range for
     * a lifetime value bucket is from 1 (low) to 10 (high), except for remove
     * operation where 0 will also be accepted.
     * 
* * optional int32 lifetime_value_bucket = 2; * @return The lifetimeValueBucket. */ @java.lang.Override public int getLifetimeValueBucket() { return lifetimeValueBucket_; } /** *
     * Advertiser defined lifetime value bucket for the user. The valid range for
     * a lifetime value bucket is from 1 (low) to 10 (high), except for remove
     * operation where 0 will also be accepted.
     * 
* * optional int32 lifetime_value_bucket = 2; * @param value The lifetimeValueBucket to set. * @return This builder for chaining. */ public Builder setLifetimeValueBucket(int value) { bitField0_ |= 0x00000002; lifetimeValueBucket_ = value; onChanged(); return this; } /** *
     * Advertiser defined lifetime value bucket for the user. The valid range for
     * a lifetime value bucket is from 1 (low) to 10 (high), except for remove
     * operation where 0 will also be accepted.
     * 
* * optional int32 lifetime_value_bucket = 2; * @return This builder for chaining. */ public Builder clearLifetimeValueBucket() { bitField0_ = (bitField0_ & ~0x00000002); lifetimeValueBucket_ = 0; onChanged(); return this; } private java.lang.Object lastPurchaseDateTime_ = ""; /** *
     * Timestamp of the last purchase made by the user.
     * The format is YYYY-MM-DD HH:MM:SS[+/-HH:MM], where [+/-HH:MM] is an
     * optional timezone offset from UTC. If the offset is absent, the API will
     * use the account's timezone as default.
     * 
* * string last_purchase_date_time = 3; * @return The lastPurchaseDateTime. */ public java.lang.String getLastPurchaseDateTime() { java.lang.Object ref = lastPurchaseDateTime_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); lastPurchaseDateTime_ = s; return s; } else { return (java.lang.String) ref; } } /** *
     * Timestamp of the last purchase made by the user.
     * The format is YYYY-MM-DD HH:MM:SS[+/-HH:MM], where [+/-HH:MM] is an
     * optional timezone offset from UTC. If the offset is absent, the API will
     * use the account's timezone as default.
     * 
* * string last_purchase_date_time = 3; * @return The bytes for lastPurchaseDateTime. */ public com.google.protobuf.ByteString getLastPurchaseDateTimeBytes() { java.lang.Object ref = lastPurchaseDateTime_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); lastPurchaseDateTime_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * Timestamp of the last purchase made by the user.
     * The format is YYYY-MM-DD HH:MM:SS[+/-HH:MM], where [+/-HH:MM] is an
     * optional timezone offset from UTC. If the offset is absent, the API will
     * use the account's timezone as default.
     * 
* * string last_purchase_date_time = 3; * @param value The lastPurchaseDateTime to set. * @return This builder for chaining. */ public Builder setLastPurchaseDateTime( java.lang.String value) { if (value == null) { throw new NullPointerException(); } lastPurchaseDateTime_ = value; onChanged(); return this; } /** *
     * Timestamp of the last purchase made by the user.
     * The format is YYYY-MM-DD HH:MM:SS[+/-HH:MM], where [+/-HH:MM] is an
     * optional timezone offset from UTC. If the offset is absent, the API will
     * use the account's timezone as default.
     * 
* * string last_purchase_date_time = 3; * @return This builder for chaining. */ public Builder clearLastPurchaseDateTime() { lastPurchaseDateTime_ = getDefaultInstance().getLastPurchaseDateTime(); onChanged(); return this; } /** *
     * Timestamp of the last purchase made by the user.
     * The format is YYYY-MM-DD HH:MM:SS[+/-HH:MM], where [+/-HH:MM] is an
     * optional timezone offset from UTC. If the offset is absent, the API will
     * use the account's timezone as default.
     * 
* * string last_purchase_date_time = 3; * @param value The bytes for lastPurchaseDateTime to set. * @return This builder for chaining. */ public Builder setLastPurchaseDateTimeBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); lastPurchaseDateTime_ = value; onChanged(); return this; } private int averagePurchaseCount_ ; /** *
     * Advertiser defined average number of purchases that are made by the user in
     * a 30 day period.
     * 
* * int32 average_purchase_count = 4; * @return The averagePurchaseCount. */ @java.lang.Override public int getAveragePurchaseCount() { return averagePurchaseCount_; } /** *
     * Advertiser defined average number of purchases that are made by the user in
     * a 30 day period.
     * 
* * int32 average_purchase_count = 4; * @param value The averagePurchaseCount to set. * @return This builder for chaining. */ public Builder setAveragePurchaseCount(int value) { averagePurchaseCount_ = value; onChanged(); return this; } /** *
     * Advertiser defined average number of purchases that are made by the user in
     * a 30 day period.
     * 
* * int32 average_purchase_count = 4; * @return This builder for chaining. */ public Builder clearAveragePurchaseCount() { averagePurchaseCount_ = 0; onChanged(); return this; } private long averagePurchaseValueMicros_ ; /** *
     * Advertiser defined average purchase value in micros for the user.
     * 
* * int64 average_purchase_value_micros = 5; * @return The averagePurchaseValueMicros. */ @java.lang.Override public long getAveragePurchaseValueMicros() { return averagePurchaseValueMicros_; } /** *
     * Advertiser defined average purchase value in micros for the user.
     * 
* * int64 average_purchase_value_micros = 5; * @param value The averagePurchaseValueMicros to set. * @return This builder for chaining. */ public Builder setAveragePurchaseValueMicros(long value) { averagePurchaseValueMicros_ = value; onChanged(); return this; } /** *
     * Advertiser defined average purchase value in micros for the user.
     * 
* * int64 average_purchase_value_micros = 5; * @return This builder for chaining. */ public Builder clearAveragePurchaseValueMicros() { averagePurchaseValueMicros_ = 0L; onChanged(); return this; } private java.lang.Object acquisitionDateTime_ = ""; /** *
     * Timestamp when the user was acquired.
     * The format is YYYY-MM-DD HH:MM:SS[+/-HH:MM], where [+/-HH:MM] is an
     * optional timezone offset from UTC. If the offset is absent, the API will
     * use the account's timezone as default.
     * 
* * string acquisition_date_time = 6; * @return The acquisitionDateTime. */ public java.lang.String getAcquisitionDateTime() { java.lang.Object ref = acquisitionDateTime_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); acquisitionDateTime_ = s; return s; } else { return (java.lang.String) ref; } } /** *
     * Timestamp when the user was acquired.
     * The format is YYYY-MM-DD HH:MM:SS[+/-HH:MM], where [+/-HH:MM] is an
     * optional timezone offset from UTC. If the offset is absent, the API will
     * use the account's timezone as default.
     * 
* * string acquisition_date_time = 6; * @return The bytes for acquisitionDateTime. */ public com.google.protobuf.ByteString getAcquisitionDateTimeBytes() { java.lang.Object ref = acquisitionDateTime_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); acquisitionDateTime_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * Timestamp when the user was acquired.
     * The format is YYYY-MM-DD HH:MM:SS[+/-HH:MM], where [+/-HH:MM] is an
     * optional timezone offset from UTC. If the offset is absent, the API will
     * use the account's timezone as default.
     * 
* * string acquisition_date_time = 6; * @param value The acquisitionDateTime to set. * @return This builder for chaining. */ public Builder setAcquisitionDateTime( java.lang.String value) { if (value == null) { throw new NullPointerException(); } acquisitionDateTime_ = value; onChanged(); return this; } /** *
     * Timestamp when the user was acquired.
     * The format is YYYY-MM-DD HH:MM:SS[+/-HH:MM], where [+/-HH:MM] is an
     * optional timezone offset from UTC. If the offset is absent, the API will
     * use the account's timezone as default.
     * 
* * string acquisition_date_time = 6; * @return This builder for chaining. */ public Builder clearAcquisitionDateTime() { acquisitionDateTime_ = getDefaultInstance().getAcquisitionDateTime(); onChanged(); return this; } /** *
     * Timestamp when the user was acquired.
     * The format is YYYY-MM-DD HH:MM:SS[+/-HH:MM], where [+/-HH:MM] is an
     * optional timezone offset from UTC. If the offset is absent, the API will
     * use the account's timezone as default.
     * 
* * string acquisition_date_time = 6; * @param value The bytes for acquisitionDateTime to set. * @return This builder for chaining. */ public Builder setAcquisitionDateTimeBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); acquisitionDateTime_ = value; onChanged(); return this; } private com.google.ads.googleads.v9.common.ShoppingLoyalty shoppingLoyalty_; private com.google.protobuf.SingleFieldBuilderV3< com.google.ads.googleads.v9.common.ShoppingLoyalty, com.google.ads.googleads.v9.common.ShoppingLoyalty.Builder, com.google.ads.googleads.v9.common.ShoppingLoyaltyOrBuilder> shoppingLoyaltyBuilder_; /** *
     * The shopping loyalty related data. Shopping utilizes this data to provide
     * users with a better experience. Accessible only to merchants on the
     * allow-list with users’ consent.
     * 
* * optional .google.ads.googleads.v9.common.ShoppingLoyalty shopping_loyalty = 7; * @return Whether the shoppingLoyalty field is set. */ public boolean hasShoppingLoyalty() { return ((bitField0_ & 0x00000004) != 0); } /** *
     * The shopping loyalty related data. Shopping utilizes this data to provide
     * users with a better experience. Accessible only to merchants on the
     * allow-list with users’ consent.
     * 
* * optional .google.ads.googleads.v9.common.ShoppingLoyalty shopping_loyalty = 7; * @return The shoppingLoyalty. */ public com.google.ads.googleads.v9.common.ShoppingLoyalty getShoppingLoyalty() { if (shoppingLoyaltyBuilder_ == null) { return shoppingLoyalty_ == null ? com.google.ads.googleads.v9.common.ShoppingLoyalty.getDefaultInstance() : shoppingLoyalty_; } else { return shoppingLoyaltyBuilder_.getMessage(); } } /** *
     * The shopping loyalty related data. Shopping utilizes this data to provide
     * users with a better experience. Accessible only to merchants on the
     * allow-list with users’ consent.
     * 
* * optional .google.ads.googleads.v9.common.ShoppingLoyalty shopping_loyalty = 7; */ public Builder setShoppingLoyalty(com.google.ads.googleads.v9.common.ShoppingLoyalty value) { if (shoppingLoyaltyBuilder_ == null) { if (value == null) { throw new NullPointerException(); } shoppingLoyalty_ = value; onChanged(); } else { shoppingLoyaltyBuilder_.setMessage(value); } bitField0_ |= 0x00000004; return this; } /** *
     * The shopping loyalty related data. Shopping utilizes this data to provide
     * users with a better experience. Accessible only to merchants on the
     * allow-list with users’ consent.
     * 
* * optional .google.ads.googleads.v9.common.ShoppingLoyalty shopping_loyalty = 7; */ public Builder setShoppingLoyalty( com.google.ads.googleads.v9.common.ShoppingLoyalty.Builder builderForValue) { if (shoppingLoyaltyBuilder_ == null) { shoppingLoyalty_ = builderForValue.build(); onChanged(); } else { shoppingLoyaltyBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000004; return this; } /** *
     * The shopping loyalty related data. Shopping utilizes this data to provide
     * users with a better experience. Accessible only to merchants on the
     * allow-list with users’ consent.
     * 
* * optional .google.ads.googleads.v9.common.ShoppingLoyalty shopping_loyalty = 7; */ public Builder mergeShoppingLoyalty(com.google.ads.googleads.v9.common.ShoppingLoyalty value) { if (shoppingLoyaltyBuilder_ == null) { if (((bitField0_ & 0x00000004) != 0) && shoppingLoyalty_ != null && shoppingLoyalty_ != com.google.ads.googleads.v9.common.ShoppingLoyalty.getDefaultInstance()) { shoppingLoyalty_ = com.google.ads.googleads.v9.common.ShoppingLoyalty.newBuilder(shoppingLoyalty_).mergeFrom(value).buildPartial(); } else { shoppingLoyalty_ = value; } onChanged(); } else { shoppingLoyaltyBuilder_.mergeFrom(value); } bitField0_ |= 0x00000004; return this; } /** *
     * The shopping loyalty related data. Shopping utilizes this data to provide
     * users with a better experience. Accessible only to merchants on the
     * allow-list with users’ consent.
     * 
* * optional .google.ads.googleads.v9.common.ShoppingLoyalty shopping_loyalty = 7; */ public Builder clearShoppingLoyalty() { if (shoppingLoyaltyBuilder_ == null) { shoppingLoyalty_ = null; onChanged(); } else { shoppingLoyaltyBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000004); return this; } /** *
     * The shopping loyalty related data. Shopping utilizes this data to provide
     * users with a better experience. Accessible only to merchants on the
     * allow-list with users’ consent.
     * 
* * optional .google.ads.googleads.v9.common.ShoppingLoyalty shopping_loyalty = 7; */ public com.google.ads.googleads.v9.common.ShoppingLoyalty.Builder getShoppingLoyaltyBuilder() { bitField0_ |= 0x00000004; onChanged(); return getShoppingLoyaltyFieldBuilder().getBuilder(); } /** *
     * The shopping loyalty related data. Shopping utilizes this data to provide
     * users with a better experience. Accessible only to merchants on the
     * allow-list with users’ consent.
     * 
* * optional .google.ads.googleads.v9.common.ShoppingLoyalty shopping_loyalty = 7; */ public com.google.ads.googleads.v9.common.ShoppingLoyaltyOrBuilder getShoppingLoyaltyOrBuilder() { if (shoppingLoyaltyBuilder_ != null) { return shoppingLoyaltyBuilder_.getMessageOrBuilder(); } else { return shoppingLoyalty_ == null ? com.google.ads.googleads.v9.common.ShoppingLoyalty.getDefaultInstance() : shoppingLoyalty_; } } /** *
     * The shopping loyalty related data. Shopping utilizes this data to provide
     * users with a better experience. Accessible only to merchants on the
     * allow-list with users’ consent.
     * 
* * optional .google.ads.googleads.v9.common.ShoppingLoyalty shopping_loyalty = 7; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.ads.googleads.v9.common.ShoppingLoyalty, com.google.ads.googleads.v9.common.ShoppingLoyalty.Builder, com.google.ads.googleads.v9.common.ShoppingLoyaltyOrBuilder> getShoppingLoyaltyFieldBuilder() { if (shoppingLoyaltyBuilder_ == null) { shoppingLoyaltyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.ads.googleads.v9.common.ShoppingLoyalty, com.google.ads.googleads.v9.common.ShoppingLoyalty.Builder, com.google.ads.googleads.v9.common.ShoppingLoyaltyOrBuilder>( getShoppingLoyalty(), getParentForChildren(), isClean()); shoppingLoyalty_ = null; } return shoppingLoyaltyBuilder_; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:google.ads.googleads.v9.common.UserAttribute) } // @@protoc_insertion_point(class_scope:google.ads.googleads.v9.common.UserAttribute) private static final com.google.ads.googleads.v9.common.UserAttribute DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.ads.googleads.v9.common.UserAttribute(); } public static com.google.ads.googleads.v9.common.UserAttribute getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public UserAttribute parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new UserAttribute(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public com.google.ads.googleads.v9.common.UserAttribute getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy