com.google.cloud.recommendationengine.v1beta1.ProductDetail Maven / Gradle / Ivy
/*
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/recommendationengine/v1beta1/user_event.proto
// Protobuf Java Version: 3.25.5
package com.google.cloud.recommendationengine.v1beta1;
/**
*
*
*
* Detailed product information associated with a user event.
*
*
* Protobuf type {@code google.cloud.recommendationengine.v1beta1.ProductDetail}
*/
public final class ProductDetail extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.recommendationengine.v1beta1.ProductDetail)
ProductDetailOrBuilder {
private static final long serialVersionUID = 0L;
// Use ProductDetail.newBuilder() to construct.
private ProductDetail(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ProductDetail() {
id_ = "";
currencyCode_ = "";
stockState_ = 0;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new ProductDetail();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.recommendationengine.v1beta1.UserEventOuterClass
.internal_static_google_cloud_recommendationengine_v1beta1_ProductDetail_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.recommendationengine.v1beta1.UserEventOuterClass
.internal_static_google_cloud_recommendationengine_v1beta1_ProductDetail_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.recommendationengine.v1beta1.ProductDetail.class,
com.google.cloud.recommendationengine.v1beta1.ProductDetail.Builder.class);
}
private int bitField0_;
public static final int ID_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object id_ = "";
/**
*
*
*
* Required. Catalog item ID. UTF-8 encoded string with a length limit of 128
* characters.
*
*
* string id = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @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;
}
}
/**
*
*
*
* Required. Catalog item ID. UTF-8 encoded string with a length limit of 128
* characters.
*
*
* string id = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @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 CURRENCY_CODE_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object currencyCode_ = "";
/**
*
*
*
* Optional. Currency code for price/costs. Use three-character ISO-4217
* code. Required only if originalPrice or displayPrice is set.
*
*
* string currency_code = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The currencyCode.
*/
@java.lang.Override
public java.lang.String getCurrencyCode() {
java.lang.Object ref = currencyCode_;
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();
currencyCode_ = s;
return s;
}
}
/**
*
*
*
* Optional. Currency code for price/costs. Use three-character ISO-4217
* code. Required only if originalPrice or displayPrice is set.
*
*
* string currency_code = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for currencyCode.
*/
@java.lang.Override
public com.google.protobuf.ByteString getCurrencyCodeBytes() {
java.lang.Object ref = currencyCode_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
currencyCode_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ORIGINAL_PRICE_FIELD_NUMBER = 3;
private float originalPrice_ = 0F;
/**
*
*
*
* Optional. Original price of the product. If provided, this will override
* the original price in Catalog for this product.
*
*
* float original_price = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The originalPrice.
*/
@java.lang.Override
public float getOriginalPrice() {
return originalPrice_;
}
public static final int DISPLAY_PRICE_FIELD_NUMBER = 4;
private float displayPrice_ = 0F;
/**
*
*
*
* Optional. Display price of the product (e.g. discounted price). If
* provided, this will override the display price in Catalog for this product.
*
*
* float display_price = 4 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The displayPrice.
*/
@java.lang.Override
public float getDisplayPrice() {
return displayPrice_;
}
public static final int STOCK_STATE_FIELD_NUMBER = 5;
private int stockState_ = 0;
/**
*
*
*
* Optional. Item stock state. If provided, this overrides the stock state
* in Catalog for items in this event.
*
*
*
* .google.cloud.recommendationengine.v1beta1.ProductCatalogItem.StockState stock_state = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The enum numeric value on the wire for stockState.
*/
@java.lang.Override
public int getStockStateValue() {
return stockState_;
}
/**
*
*
*
* Optional. Item stock state. If provided, this overrides the stock state
* in Catalog for items in this event.
*
*
*
* .google.cloud.recommendationengine.v1beta1.ProductCatalogItem.StockState stock_state = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The stockState.
*/
@java.lang.Override
public com.google.cloud.recommendationengine.v1beta1.ProductCatalogItem.StockState
getStockState() {
com.google.cloud.recommendationengine.v1beta1.ProductCatalogItem.StockState result =
com.google.cloud.recommendationengine.v1beta1.ProductCatalogItem.StockState.forNumber(
stockState_);
return result == null
? com.google.cloud.recommendationengine.v1beta1.ProductCatalogItem.StockState.UNRECOGNIZED
: result;
}
public static final int QUANTITY_FIELD_NUMBER = 6;
private int quantity_ = 0;
/**
*
*
*
* Optional. Quantity of the product associated with the user event. For
* example, this field will be 2 if two products are added to the shopping
* cart for `add-to-cart` event. Required for `add-to-cart`, `add-to-list`,
* `remove-from-cart`, `checkout-start`, `purchase-complete`, `refund` event
* types.
*
*
* int32 quantity = 6 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The quantity.
*/
@java.lang.Override
public int getQuantity() {
return quantity_;
}
public static final int AVAILABLE_QUANTITY_FIELD_NUMBER = 7;
private int availableQuantity_ = 0;
/**
*
*
*
* Optional. Quantity of the products in stock when a user event happens.
* Optional. If provided, this overrides the available quantity in Catalog for
* this event. and can only be set if `stock_status` is set to `IN_STOCK`.
*
* Note that if an item is out of stock, you must set the `stock_state` field
* to be `OUT_OF_STOCK`. Leaving this field unspecified / as zero is not
* sufficient to mark the item out of stock.
*
*
* int32 available_quantity = 7 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The availableQuantity.
*/
@java.lang.Override
public int getAvailableQuantity() {
return availableQuantity_;
}
public static final int ITEM_ATTRIBUTES_FIELD_NUMBER = 8;
private com.google.cloud.recommendationengine.v1beta1.FeatureMap itemAttributes_;
/**
*
*
*
* Optional. Extra features associated with a product in the user event.
*
*
*
* .google.cloud.recommendationengine.v1beta1.FeatureMap item_attributes = 8 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return Whether the itemAttributes field is set.
*/
@java.lang.Override
public boolean hasItemAttributes() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* Optional. Extra features associated with a product in the user event.
*
*
*
* .google.cloud.recommendationengine.v1beta1.FeatureMap item_attributes = 8 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The itemAttributes.
*/
@java.lang.Override
public com.google.cloud.recommendationengine.v1beta1.FeatureMap getItemAttributes() {
return itemAttributes_ == null
? com.google.cloud.recommendationengine.v1beta1.FeatureMap.getDefaultInstance()
: itemAttributes_;
}
/**
*
*
*
* Optional. Extra features associated with a product in the user event.
*
*
*
* .google.cloud.recommendationengine.v1beta1.FeatureMap item_attributes = 8 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public com.google.cloud.recommendationengine.v1beta1.FeatureMapOrBuilder
getItemAttributesOrBuilder() {
return itemAttributes_ == null
? com.google.cloud.recommendationengine.v1beta1.FeatureMap.getDefaultInstance()
: itemAttributes_;
}
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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(currencyCode_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, currencyCode_);
}
if (java.lang.Float.floatToRawIntBits(originalPrice_) != 0) {
output.writeFloat(3, originalPrice_);
}
if (java.lang.Float.floatToRawIntBits(displayPrice_) != 0) {
output.writeFloat(4, displayPrice_);
}
if (stockState_
!= com.google.cloud.recommendationengine.v1beta1.ProductCatalogItem.StockState
.STOCK_STATE_UNSPECIFIED
.getNumber()) {
output.writeEnum(5, stockState_);
}
if (quantity_ != 0) {
output.writeInt32(6, quantity_);
}
if (availableQuantity_ != 0) {
output.writeInt32(7, availableQuantity_);
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(8, getItemAttributes());
}
getUnknownFields().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(currencyCode_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, currencyCode_);
}
if (java.lang.Float.floatToRawIntBits(originalPrice_) != 0) {
size += com.google.protobuf.CodedOutputStream.computeFloatSize(3, originalPrice_);
}
if (java.lang.Float.floatToRawIntBits(displayPrice_) != 0) {
size += com.google.protobuf.CodedOutputStream.computeFloatSize(4, displayPrice_);
}
if (stockState_
!= com.google.cloud.recommendationengine.v1beta1.ProductCatalogItem.StockState
.STOCK_STATE_UNSPECIFIED
.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, stockState_);
}
if (quantity_ != 0) {
size += com.google.protobuf.CodedOutputStream.computeInt32Size(6, quantity_);
}
if (availableQuantity_ != 0) {
size += com.google.protobuf.CodedOutputStream.computeInt32Size(7, availableQuantity_);
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getItemAttributes());
}
size += getUnknownFields().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.cloud.recommendationengine.v1beta1.ProductDetail)) {
return super.equals(obj);
}
com.google.cloud.recommendationengine.v1beta1.ProductDetail other =
(com.google.cloud.recommendationengine.v1beta1.ProductDetail) obj;
if (!getId().equals(other.getId())) return false;
if (!getCurrencyCode().equals(other.getCurrencyCode())) return false;
if (java.lang.Float.floatToIntBits(getOriginalPrice())
!= java.lang.Float.floatToIntBits(other.getOriginalPrice())) return false;
if (java.lang.Float.floatToIntBits(getDisplayPrice())
!= java.lang.Float.floatToIntBits(other.getDisplayPrice())) return false;
if (stockState_ != other.stockState_) return false;
if (getQuantity() != other.getQuantity()) return false;
if (getAvailableQuantity() != other.getAvailableQuantity()) return false;
if (hasItemAttributes() != other.hasItemAttributes()) return false;
if (hasItemAttributes()) {
if (!getItemAttributes().equals(other.getItemAttributes())) return false;
}
if (!getUnknownFields().equals(other.getUnknownFields())) 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) + CURRENCY_CODE_FIELD_NUMBER;
hash = (53 * hash) + getCurrencyCode().hashCode();
hash = (37 * hash) + ORIGINAL_PRICE_FIELD_NUMBER;
hash = (53 * hash) + java.lang.Float.floatToIntBits(getOriginalPrice());
hash = (37 * hash) + DISPLAY_PRICE_FIELD_NUMBER;
hash = (53 * hash) + java.lang.Float.floatToIntBits(getDisplayPrice());
hash = (37 * hash) + STOCK_STATE_FIELD_NUMBER;
hash = (53 * hash) + stockState_;
hash = (37 * hash) + QUANTITY_FIELD_NUMBER;
hash = (53 * hash) + getQuantity();
hash = (37 * hash) + AVAILABLE_QUANTITY_FIELD_NUMBER;
hash = (53 * hash) + getAvailableQuantity();
if (hasItemAttributes()) {
hash = (37 * hash) + ITEM_ATTRIBUTES_FIELD_NUMBER;
hash = (53 * hash) + getItemAttributes().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.recommendationengine.v1beta1.ProductDetail parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.recommendationengine.v1beta1.ProductDetail parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.recommendationengine.v1beta1.ProductDetail parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.recommendationengine.v1beta1.ProductDetail 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.cloud.recommendationengine.v1beta1.ProductDetail parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.recommendationengine.v1beta1.ProductDetail parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.recommendationengine.v1beta1.ProductDetail parseFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.recommendationengine.v1beta1.ProductDetail 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.cloud.recommendationengine.v1beta1.ProductDetail parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.recommendationengine.v1beta1.ProductDetail 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.cloud.recommendationengine.v1beta1.ProductDetail parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.recommendationengine.v1beta1.ProductDetail 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.cloud.recommendationengine.v1beta1.ProductDetail 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;
}
/**
*
*
*
* Detailed product information associated with a user event.
*
*
* Protobuf type {@code google.cloud.recommendationengine.v1beta1.ProductDetail}
*/
public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.recommendationengine.v1beta1.ProductDetail)
com.google.cloud.recommendationengine.v1beta1.ProductDetailOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.recommendationengine.v1beta1.UserEventOuterClass
.internal_static_google_cloud_recommendationengine_v1beta1_ProductDetail_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.recommendationengine.v1beta1.UserEventOuterClass
.internal_static_google_cloud_recommendationengine_v1beta1_ProductDetail_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.recommendationengine.v1beta1.ProductDetail.class,
com.google.cloud.recommendationengine.v1beta1.ProductDetail.Builder.class);
}
// Construct using com.google.cloud.recommendationengine.v1beta1.ProductDetail.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getItemAttributesFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
id_ = "";
currencyCode_ = "";
originalPrice_ = 0F;
displayPrice_ = 0F;
stockState_ = 0;
quantity_ = 0;
availableQuantity_ = 0;
itemAttributes_ = null;
if (itemAttributesBuilder_ != null) {
itemAttributesBuilder_.dispose();
itemAttributesBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.recommendationengine.v1beta1.UserEventOuterClass
.internal_static_google_cloud_recommendationengine_v1beta1_ProductDetail_descriptor;
}
@java.lang.Override
public com.google.cloud.recommendationengine.v1beta1.ProductDetail getDefaultInstanceForType() {
return com.google.cloud.recommendationengine.v1beta1.ProductDetail.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.recommendationengine.v1beta1.ProductDetail build() {
com.google.cloud.recommendationengine.v1beta1.ProductDetail result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.recommendationengine.v1beta1.ProductDetail buildPartial() {
com.google.cloud.recommendationengine.v1beta1.ProductDetail result =
new com.google.cloud.recommendationengine.v1beta1.ProductDetail(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(com.google.cloud.recommendationengine.v1beta1.ProductDetail result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.id_ = id_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.currencyCode_ = currencyCode_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.originalPrice_ = originalPrice_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.displayPrice_ = displayPrice_;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.stockState_ = stockState_;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.quantity_ = quantity_;
}
if (((from_bitField0_ & 0x00000040) != 0)) {
result.availableQuantity_ = availableQuantity_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000080) != 0)) {
result.itemAttributes_ =
itemAttributesBuilder_ == null ? itemAttributes_ : itemAttributesBuilder_.build();
to_bitField0_ |= 0x00000001;
}
result.bitField0_ |= to_bitField0_;
}
@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.cloud.recommendationengine.v1beta1.ProductDetail) {
return mergeFrom((com.google.cloud.recommendationengine.v1beta1.ProductDetail) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.recommendationengine.v1beta1.ProductDetail other) {
if (other == com.google.cloud.recommendationengine.v1beta1.ProductDetail.getDefaultInstance())
return this;
if (!other.getId().isEmpty()) {
id_ = other.id_;
bitField0_ |= 0x00000001;
onChanged();
}
if (!other.getCurrencyCode().isEmpty()) {
currencyCode_ = other.currencyCode_;
bitField0_ |= 0x00000002;
onChanged();
}
if (other.getOriginalPrice() != 0F) {
setOriginalPrice(other.getOriginalPrice());
}
if (other.getDisplayPrice() != 0F) {
setDisplayPrice(other.getDisplayPrice());
}
if (other.stockState_ != 0) {
setStockStateValue(other.getStockStateValue());
}
if (other.getQuantity() != 0) {
setQuantity(other.getQuantity());
}
if (other.getAvailableQuantity() != 0) {
setAvailableQuantity(other.getAvailableQuantity());
}
if (other.hasItemAttributes()) {
mergeItemAttributes(other.getItemAttributes());
}
this.mergeUnknownFields(other.getUnknownFields());
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 {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
id_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18:
{
currencyCode_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
case 29:
{
originalPrice_ = input.readFloat();
bitField0_ |= 0x00000004;
break;
} // case 29
case 37:
{
displayPrice_ = input.readFloat();
bitField0_ |= 0x00000008;
break;
} // case 37
case 40:
{
stockState_ = input.readEnum();
bitField0_ |= 0x00000010;
break;
} // case 40
case 48:
{
quantity_ = input.readInt32();
bitField0_ |= 0x00000020;
break;
} // case 48
case 56:
{
availableQuantity_ = input.readInt32();
bitField0_ |= 0x00000040;
break;
} // case 56
case 66:
{
input.readMessage(getItemAttributesFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000080;
break;
} // case 66
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object id_ = "";
/**
*
*
*
* Required. Catalog item ID. UTF-8 encoded string with a length limit of 128
* characters.
*
*
* string id = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @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;
}
}
/**
*
*
*
* Required. Catalog item ID. UTF-8 encoded string with a length limit of 128
* characters.
*
*
* string id = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @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;
}
}
/**
*
*
*
* Required. Catalog item ID. UTF-8 encoded string with a length limit of 128
* characters.
*
*
* string id = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @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;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Required. Catalog item ID. UTF-8 encoded string with a length limit of 128
* characters.
*
*
* string id = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @return This builder for chaining.
*/
public Builder clearId() {
id_ = getDefaultInstance().getId();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*
* Required. Catalog item ID. UTF-8 encoded string with a length limit of 128
* characters.
*
*
* string id = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @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;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.lang.Object currencyCode_ = "";
/**
*
*
*
* Optional. Currency code for price/costs. Use three-character ISO-4217
* code. Required only if originalPrice or displayPrice is set.
*
*
* string currency_code = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The currencyCode.
*/
public java.lang.String getCurrencyCode() {
java.lang.Object ref = currencyCode_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
currencyCode_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Optional. Currency code for price/costs. Use three-character ISO-4217
* code. Required only if originalPrice or displayPrice is set.
*
*
* string currency_code = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for currencyCode.
*/
public com.google.protobuf.ByteString getCurrencyCodeBytes() {
java.lang.Object ref = currencyCode_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
currencyCode_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Optional. Currency code for price/costs. Use three-character ISO-4217
* code. Required only if originalPrice or displayPrice is set.
*
*
* string currency_code = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The currencyCode to set.
* @return This builder for chaining.
*/
public Builder setCurrencyCode(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
currencyCode_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Optional. Currency code for price/costs. Use three-character ISO-4217
* code. Required only if originalPrice or displayPrice is set.
*
*
* string currency_code = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @return This builder for chaining.
*/
public Builder clearCurrencyCode() {
currencyCode_ = getDefaultInstance().getCurrencyCode();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
*
*
* Optional. Currency code for price/costs. Use three-character ISO-4217
* code. Required only if originalPrice or displayPrice is set.
*
*
* string currency_code = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The bytes for currencyCode to set.
* @return This builder for chaining.
*/
public Builder setCurrencyCodeBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
currencyCode_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private float originalPrice_;
/**
*
*
*
* Optional. Original price of the product. If provided, this will override
* the original price in Catalog for this product.
*
*
* float original_price = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The originalPrice.
*/
@java.lang.Override
public float getOriginalPrice() {
return originalPrice_;
}
/**
*
*
*
* Optional. Original price of the product. If provided, this will override
* the original price in Catalog for this product.
*
*
* float original_price = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The originalPrice to set.
* @return This builder for chaining.
*/
public Builder setOriginalPrice(float value) {
originalPrice_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* Optional. Original price of the product. If provided, this will override
* the original price in Catalog for this product.
*
*
* float original_price = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return This builder for chaining.
*/
public Builder clearOriginalPrice() {
bitField0_ = (bitField0_ & ~0x00000004);
originalPrice_ = 0F;
onChanged();
return this;
}
private float displayPrice_;
/**
*
*
*
* Optional. Display price of the product (e.g. discounted price). If
* provided, this will override the display price in Catalog for this product.
*
*
* float display_price = 4 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The displayPrice.
*/
@java.lang.Override
public float getDisplayPrice() {
return displayPrice_;
}
/**
*
*
*
* Optional. Display price of the product (e.g. discounted price). If
* provided, this will override the display price in Catalog for this product.
*
*
* float display_price = 4 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The displayPrice to set.
* @return This builder for chaining.
*/
public Builder setDisplayPrice(float value) {
displayPrice_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* Optional. Display price of the product (e.g. discounted price). If
* provided, this will override the display price in Catalog for this product.
*
*
* float display_price = 4 [(.google.api.field_behavior) = OPTIONAL];
*
* @return This builder for chaining.
*/
public Builder clearDisplayPrice() {
bitField0_ = (bitField0_ & ~0x00000008);
displayPrice_ = 0F;
onChanged();
return this;
}
private int stockState_ = 0;
/**
*
*
*
* Optional. Item stock state. If provided, this overrides the stock state
* in Catalog for items in this event.
*
*
*
* .google.cloud.recommendationengine.v1beta1.ProductCatalogItem.StockState stock_state = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The enum numeric value on the wire for stockState.
*/
@java.lang.Override
public int getStockStateValue() {
return stockState_;
}
/**
*
*
*
* Optional. Item stock state. If provided, this overrides the stock state
* in Catalog for items in this event.
*
*
*
* .google.cloud.recommendationengine.v1beta1.ProductCatalogItem.StockState stock_state = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param value The enum numeric value on the wire for stockState to set.
* @return This builder for chaining.
*/
public Builder setStockStateValue(int value) {
stockState_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*
*
* Optional. Item stock state. If provided, this overrides the stock state
* in Catalog for items in this event.
*
*
*
* .google.cloud.recommendationengine.v1beta1.ProductCatalogItem.StockState stock_state = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The stockState.
*/
@java.lang.Override
public com.google.cloud.recommendationengine.v1beta1.ProductCatalogItem.StockState
getStockState() {
com.google.cloud.recommendationengine.v1beta1.ProductCatalogItem.StockState result =
com.google.cloud.recommendationengine.v1beta1.ProductCatalogItem.StockState.forNumber(
stockState_);
return result == null
? com.google.cloud.recommendationengine.v1beta1.ProductCatalogItem.StockState.UNRECOGNIZED
: result;
}
/**
*
*
*
* Optional. Item stock state. If provided, this overrides the stock state
* in Catalog for items in this event.
*
*
*
* .google.cloud.recommendationengine.v1beta1.ProductCatalogItem.StockState stock_state = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param value The stockState to set.
* @return This builder for chaining.
*/
public Builder setStockState(
com.google.cloud.recommendationengine.v1beta1.ProductCatalogItem.StockState value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000010;
stockState_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
*
* Optional. Item stock state. If provided, this overrides the stock state
* in Catalog for items in this event.
*
*
*
* .google.cloud.recommendationengine.v1beta1.ProductCatalogItem.StockState stock_state = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return This builder for chaining.
*/
public Builder clearStockState() {
bitField0_ = (bitField0_ & ~0x00000010);
stockState_ = 0;
onChanged();
return this;
}
private int quantity_;
/**
*
*
*
* Optional. Quantity of the product associated with the user event. For
* example, this field will be 2 if two products are added to the shopping
* cart for `add-to-cart` event. Required for `add-to-cart`, `add-to-list`,
* `remove-from-cart`, `checkout-start`, `purchase-complete`, `refund` event
* types.
*
*
* int32 quantity = 6 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The quantity.
*/
@java.lang.Override
public int getQuantity() {
return quantity_;
}
/**
*
*
*
* Optional. Quantity of the product associated with the user event. For
* example, this field will be 2 if two products are added to the shopping
* cart for `add-to-cart` event. Required for `add-to-cart`, `add-to-list`,
* `remove-from-cart`, `checkout-start`, `purchase-complete`, `refund` event
* types.
*
*
* int32 quantity = 6 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The quantity to set.
* @return This builder for chaining.
*/
public Builder setQuantity(int value) {
quantity_ = value;
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
*
*
* Optional. Quantity of the product associated with the user event. For
* example, this field will be 2 if two products are added to the shopping
* cart for `add-to-cart` event. Required for `add-to-cart`, `add-to-list`,
* `remove-from-cart`, `checkout-start`, `purchase-complete`, `refund` event
* types.
*
*
* int32 quantity = 6 [(.google.api.field_behavior) = OPTIONAL];
*
* @return This builder for chaining.
*/
public Builder clearQuantity() {
bitField0_ = (bitField0_ & ~0x00000020);
quantity_ = 0;
onChanged();
return this;
}
private int availableQuantity_;
/**
*
*
*
* Optional. Quantity of the products in stock when a user event happens.
* Optional. If provided, this overrides the available quantity in Catalog for
* this event. and can only be set if `stock_status` is set to `IN_STOCK`.
*
* Note that if an item is out of stock, you must set the `stock_state` field
* to be `OUT_OF_STOCK`. Leaving this field unspecified / as zero is not
* sufficient to mark the item out of stock.
*
*
* int32 available_quantity = 7 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The availableQuantity.
*/
@java.lang.Override
public int getAvailableQuantity() {
return availableQuantity_;
}
/**
*
*
*
* Optional. Quantity of the products in stock when a user event happens.
* Optional. If provided, this overrides the available quantity in Catalog for
* this event. and can only be set if `stock_status` is set to `IN_STOCK`.
*
* Note that if an item is out of stock, you must set the `stock_state` field
* to be `OUT_OF_STOCK`. Leaving this field unspecified / as zero is not
* sufficient to mark the item out of stock.
*
*
* int32 available_quantity = 7 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The availableQuantity to set.
* @return This builder for chaining.
*/
public Builder setAvailableQuantity(int value) {
availableQuantity_ = value;
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
*
*
* Optional. Quantity of the products in stock when a user event happens.
* Optional. If provided, this overrides the available quantity in Catalog for
* this event. and can only be set if `stock_status` is set to `IN_STOCK`.
*
* Note that if an item is out of stock, you must set the `stock_state` field
* to be `OUT_OF_STOCK`. Leaving this field unspecified / as zero is not
* sufficient to mark the item out of stock.
*
*
* int32 available_quantity = 7 [(.google.api.field_behavior) = OPTIONAL];
*
* @return This builder for chaining.
*/
public Builder clearAvailableQuantity() {
bitField0_ = (bitField0_ & ~0x00000040);
availableQuantity_ = 0;
onChanged();
return this;
}
private com.google.cloud.recommendationengine.v1beta1.FeatureMap itemAttributes_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.recommendationengine.v1beta1.FeatureMap,
com.google.cloud.recommendationengine.v1beta1.FeatureMap.Builder,
com.google.cloud.recommendationengine.v1beta1.FeatureMapOrBuilder>
itemAttributesBuilder_;
/**
*
*
*
* Optional. Extra features associated with a product in the user event.
*
*
*
* .google.cloud.recommendationengine.v1beta1.FeatureMap item_attributes = 8 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return Whether the itemAttributes field is set.
*/
public boolean hasItemAttributes() {
return ((bitField0_ & 0x00000080) != 0);
}
/**
*
*
*
* Optional. Extra features associated with a product in the user event.
*
*
*
* .google.cloud.recommendationengine.v1beta1.FeatureMap item_attributes = 8 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The itemAttributes.
*/
public com.google.cloud.recommendationengine.v1beta1.FeatureMap getItemAttributes() {
if (itemAttributesBuilder_ == null) {
return itemAttributes_ == null
? com.google.cloud.recommendationengine.v1beta1.FeatureMap.getDefaultInstance()
: itemAttributes_;
} else {
return itemAttributesBuilder_.getMessage();
}
}
/**
*
*
*
* Optional. Extra features associated with a product in the user event.
*
*
*
* .google.cloud.recommendationengine.v1beta1.FeatureMap item_attributes = 8 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setItemAttributes(
com.google.cloud.recommendationengine.v1beta1.FeatureMap value) {
if (itemAttributesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
itemAttributes_ = value;
} else {
itemAttributesBuilder_.setMessage(value);
}
bitField0_ |= 0x00000080;
onChanged();
return this;
}
/**
*
*
*
* Optional. Extra features associated with a product in the user event.
*
*
*
* .google.cloud.recommendationengine.v1beta1.FeatureMap item_attributes = 8 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setItemAttributes(
com.google.cloud.recommendationengine.v1beta1.FeatureMap.Builder builderForValue) {
if (itemAttributesBuilder_ == null) {
itemAttributes_ = builderForValue.build();
} else {
itemAttributesBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000080;
onChanged();
return this;
}
/**
*
*
*
* Optional. Extra features associated with a product in the user event.
*
*
*
* .google.cloud.recommendationengine.v1beta1.FeatureMap item_attributes = 8 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder mergeItemAttributes(
com.google.cloud.recommendationengine.v1beta1.FeatureMap value) {
if (itemAttributesBuilder_ == null) {
if (((bitField0_ & 0x00000080) != 0)
&& itemAttributes_ != null
&& itemAttributes_
!= com.google.cloud.recommendationengine.v1beta1.FeatureMap.getDefaultInstance()) {
getItemAttributesBuilder().mergeFrom(value);
} else {
itemAttributes_ = value;
}
} else {
itemAttributesBuilder_.mergeFrom(value);
}
if (itemAttributes_ != null) {
bitField0_ |= 0x00000080;
onChanged();
}
return this;
}
/**
*
*
*
* Optional. Extra features associated with a product in the user event.
*
*
*
* .google.cloud.recommendationengine.v1beta1.FeatureMap item_attributes = 8 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder clearItemAttributes() {
bitField0_ = (bitField0_ & ~0x00000080);
itemAttributes_ = null;
if (itemAttributesBuilder_ != null) {
itemAttributesBuilder_.dispose();
itemAttributesBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Optional. Extra features associated with a product in the user event.
*
*
*
* .google.cloud.recommendationengine.v1beta1.FeatureMap item_attributes = 8 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.recommendationengine.v1beta1.FeatureMap.Builder
getItemAttributesBuilder() {
bitField0_ |= 0x00000080;
onChanged();
return getItemAttributesFieldBuilder().getBuilder();
}
/**
*
*
*
* Optional. Extra features associated with a product in the user event.
*
*
*
* .google.cloud.recommendationengine.v1beta1.FeatureMap item_attributes = 8 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.recommendationengine.v1beta1.FeatureMapOrBuilder
getItemAttributesOrBuilder() {
if (itemAttributesBuilder_ != null) {
return itemAttributesBuilder_.getMessageOrBuilder();
} else {
return itemAttributes_ == null
? com.google.cloud.recommendationengine.v1beta1.FeatureMap.getDefaultInstance()
: itemAttributes_;
}
}
/**
*
*
*
* Optional. Extra features associated with a product in the user event.
*
*
*
* .google.cloud.recommendationengine.v1beta1.FeatureMap item_attributes = 8 [(.google.api.field_behavior) = OPTIONAL];
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.recommendationengine.v1beta1.FeatureMap,
com.google.cloud.recommendationengine.v1beta1.FeatureMap.Builder,
com.google.cloud.recommendationengine.v1beta1.FeatureMapOrBuilder>
getItemAttributesFieldBuilder() {
if (itemAttributesBuilder_ == null) {
itemAttributesBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.recommendationengine.v1beta1.FeatureMap,
com.google.cloud.recommendationengine.v1beta1.FeatureMap.Builder,
com.google.cloud.recommendationengine.v1beta1.FeatureMapOrBuilder>(
getItemAttributes(), getParentForChildren(), isClean());
itemAttributes_ = null;
}
return itemAttributesBuilder_;
}
@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.cloud.recommendationengine.v1beta1.ProductDetail)
}
// @@protoc_insertion_point(class_scope:google.cloud.recommendationengine.v1beta1.ProductDetail)
private static final com.google.cloud.recommendationengine.v1beta1.ProductDetail DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.recommendationengine.v1beta1.ProductDetail();
}
public static com.google.cloud.recommendationengine.v1beta1.ProductDetail getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ProductDetail parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
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.cloud.recommendationengine.v1beta1.ProductDetail getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy