
io.opencannabis.schema.menu.MenuProduct Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-client Show documentation
Show all versions of java-client Show documentation
Java RPCAPI client for the Bloombox Cloud.
The newest version!
/*
* Copyright 2019, Momentum Ideas Co.
*
* 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
*
* http://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: products/menu/Menu.proto
package io.opencannabis.schema.menu;
/**
*
* Menu product payload stanza. Specifies a single product as a member of a menu section. This generic record is used to
* wrap concrete menu product structures to make them generically usable. In V2 data stores, menu products are stored
* generically as a top-level entity (as opposed to V1, in which this model is synthesized from raw map data).
*
*
* Protobuf type {@code opencannabis.products.menu.MenuProduct}
*/
public final class MenuProduct extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:opencannabis.products.menu.MenuProduct)
MenuProductOrBuilder {
private static final long serialVersionUID = 0L;
// Use MenuProduct.newBuilder() to construct.
private MenuProduct(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private MenuProduct() {
tag_ = java.util.Collections.emptyList();
ref_ = java.util.Collections.emptyList();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private MenuProduct(
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: {
io.opencannabis.schema.base.BaseProductKey.ProductKey.Builder subBuilder = null;
if (key_ != null) {
subBuilder = key_.toBuilder();
}
key_ = input.readMessage(io.opencannabis.schema.base.BaseProductKey.ProductKey.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(key_);
key_ = subBuilder.buildPartial();
}
break;
}
case 18: {
if (!((mutable_bitField0_ & 0x00000002) != 0)) {
tag_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000002;
}
tag_.add(
input.readMessage(io.opencannabis.schema.menu.ProductTag.parser(), extensionRegistry));
break;
}
case 26: {
if (!((mutable_bitField0_ & 0x00000004) != 0)) {
ref_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000004;
}
ref_.add(
input.readMessage(io.opencannabis.schema.menu.ForeignReference.parser(), extensionRegistry));
break;
}
case 82: {
io.opencannabis.schema.product.ApothecaryProduct.Apothecary.Builder subBuilder = null;
if (productCase_ == 10) {
subBuilder = ((io.opencannabis.schema.product.ApothecaryProduct.Apothecary) product_).toBuilder();
}
product_ =
input.readMessage(io.opencannabis.schema.product.ApothecaryProduct.Apothecary.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((io.opencannabis.schema.product.ApothecaryProduct.Apothecary) product_);
product_ = subBuilder.buildPartial();
}
productCase_ = 10;
break;
}
case 90: {
io.opencannabis.schema.product.CartridgeProduct.Cartridge.Builder subBuilder = null;
if (productCase_ == 11) {
subBuilder = ((io.opencannabis.schema.product.CartridgeProduct.Cartridge) product_).toBuilder();
}
product_ =
input.readMessage(io.opencannabis.schema.product.CartridgeProduct.Cartridge.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((io.opencannabis.schema.product.CartridgeProduct.Cartridge) product_);
product_ = subBuilder.buildPartial();
}
productCase_ = 11;
break;
}
case 98: {
io.opencannabis.schema.product.EdibleProduct.Edible.Builder subBuilder = null;
if (productCase_ == 12) {
subBuilder = ((io.opencannabis.schema.product.EdibleProduct.Edible) product_).toBuilder();
}
product_ =
input.readMessage(io.opencannabis.schema.product.EdibleProduct.Edible.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((io.opencannabis.schema.product.EdibleProduct.Edible) product_);
product_ = subBuilder.buildPartial();
}
productCase_ = 12;
break;
}
case 106: {
io.opencannabis.schema.product.ExtractProduct.Extract.Builder subBuilder = null;
if (productCase_ == 13) {
subBuilder = ((io.opencannabis.schema.product.ExtractProduct.Extract) product_).toBuilder();
}
product_ =
input.readMessage(io.opencannabis.schema.product.ExtractProduct.Extract.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((io.opencannabis.schema.product.ExtractProduct.Extract) product_);
product_ = subBuilder.buildPartial();
}
productCase_ = 13;
break;
}
case 114: {
io.opencannabis.schema.product.FlowerProduct.Flower.Builder subBuilder = null;
if (productCase_ == 14) {
subBuilder = ((io.opencannabis.schema.product.FlowerProduct.Flower) product_).toBuilder();
}
product_ =
input.readMessage(io.opencannabis.schema.product.FlowerProduct.Flower.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((io.opencannabis.schema.product.FlowerProduct.Flower) product_);
product_ = subBuilder.buildPartial();
}
productCase_ = 14;
break;
}
case 122: {
io.opencannabis.schema.product.MerchandiseProduct.Merchandise.Builder subBuilder = null;
if (productCase_ == 15) {
subBuilder = ((io.opencannabis.schema.product.MerchandiseProduct.Merchandise) product_).toBuilder();
}
product_ =
input.readMessage(io.opencannabis.schema.product.MerchandiseProduct.Merchandise.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((io.opencannabis.schema.product.MerchandiseProduct.Merchandise) product_);
product_ = subBuilder.buildPartial();
}
productCase_ = 15;
break;
}
case 130: {
io.opencannabis.schema.product.PlantProduct.Plant.Builder subBuilder = null;
if (productCase_ == 16) {
subBuilder = ((io.opencannabis.schema.product.PlantProduct.Plant) product_).toBuilder();
}
product_ =
input.readMessage(io.opencannabis.schema.product.PlantProduct.Plant.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((io.opencannabis.schema.product.PlantProduct.Plant) product_);
product_ = subBuilder.buildPartial();
}
productCase_ = 16;
break;
}
case 138: {
io.opencannabis.schema.product.PrerollProduct.Preroll.Builder subBuilder = null;
if (productCase_ == 17) {
subBuilder = ((io.opencannabis.schema.product.PrerollProduct.Preroll) product_).toBuilder();
}
product_ =
input.readMessage(io.opencannabis.schema.product.PrerollProduct.Preroll.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((io.opencannabis.schema.product.PrerollProduct.Preroll) product_);
product_ = subBuilder.buildPartial();
}
productCase_ = 17;
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)) {
tag_ = java.util.Collections.unmodifiableList(tag_);
}
if (((mutable_bitField0_ & 0x00000004) != 0)) {
ref_ = java.util.Collections.unmodifiableList(ref_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.opencannabis.schema.menu.MenuOuterClass.internal_static_opencannabis_products_menu_MenuProduct_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.opencannabis.schema.menu.MenuOuterClass.internal_static_opencannabis_products_menu_MenuProduct_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.opencannabis.schema.menu.MenuProduct.class, io.opencannabis.schema.menu.MenuProduct.Builder.class);
}
private int bitField0_;
private int productCase_ = 0;
private java.lang.Object product_;
public enum ProductCase
implements com.google.protobuf.Internal.EnumLite {
APOTHECARY(10),
CARTRIDGE(11),
EDIBLE(12),
EXTRACT(13),
FLOWER(14),
MERCHANDISE(15),
PLANT(16),
PREROLL(17),
PRODUCT_NOT_SET(0);
private final int value;
private ProductCase(int value) {
this.value = value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static ProductCase valueOf(int value) {
return forNumber(value);
}
public static ProductCase forNumber(int value) {
switch (value) {
case 10: return APOTHECARY;
case 11: return CARTRIDGE;
case 12: return EDIBLE;
case 13: return EXTRACT;
case 14: return FLOWER;
case 15: return MERCHANDISE;
case 16: return PLANT;
case 17: return PREROLL;
case 0: return PRODUCT_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public ProductCase
getProductCase() {
return ProductCase.forNumber(
productCase_);
}
public static final int KEY_FIELD_NUMBER = 1;
private io.opencannabis.schema.base.BaseProductKey.ProductKey key_;
/**
*
* Key record uniquely identifying this menu product. Keys for saved items are lifted to this property from the
* attached concrete record below.
*
*
* .opencannabis.base.ProductKey key = 1 [(.core.field) = { ... }
*/
public boolean hasKey() {
return key_ != null;
}
/**
*
* Key record uniquely identifying this menu product. Keys for saved items are lifted to this property from the
* attached concrete record below.
*
*
* .opencannabis.base.ProductKey key = 1 [(.core.field) = { ... }
*/
public io.opencannabis.schema.base.BaseProductKey.ProductKey getKey() {
return key_ == null ? io.opencannabis.schema.base.BaseProductKey.ProductKey.getDefaultInstance() : key_;
}
/**
*
* Key record uniquely identifying this menu product. Keys for saved items are lifted to this property from the
* attached concrete record below.
*
*
* .opencannabis.base.ProductKey key = 1 [(.core.field) = { ... }
*/
public io.opencannabis.schema.base.BaseProductKey.ProductKeyOrBuilder getKeyOrBuilder() {
return getKey();
}
public static final int TAG_FIELD_NUMBER = 2;
private java.util.List tag_;
/**
*
* Product tags attached to this entry. Product tags are arbitrary phrases or strings that may be attached to product
* records to help categorize them or facilitate their management. They are not generally end-user-visible.
*
*
* repeated .opencannabis.products.menu.ProductTag tag = 2;
*/
public java.util.List getTagList() {
return tag_;
}
/**
*
* Product tags attached to this entry. Product tags are arbitrary phrases or strings that may be attached to product
* records to help categorize them or facilitate their management. They are not generally end-user-visible.
*
*
* repeated .opencannabis.products.menu.ProductTag tag = 2;
*/
public java.util.List extends io.opencannabis.schema.menu.ProductTagOrBuilder>
getTagOrBuilderList() {
return tag_;
}
/**
*
* Product tags attached to this entry. Product tags are arbitrary phrases or strings that may be attached to product
* records to help categorize them or facilitate their management. They are not generally end-user-visible.
*
*
* repeated .opencannabis.products.menu.ProductTag tag = 2;
*/
public int getTagCount() {
return tag_.size();
}
/**
*
* Product tags attached to this entry. Product tags are arbitrary phrases or strings that may be attached to product
* records to help categorize them or facilitate their management. They are not generally end-user-visible.
*
*
* repeated .opencannabis.products.menu.ProductTag tag = 2;
*/
public io.opencannabis.schema.menu.ProductTag getTag(int index) {
return tag_.get(index);
}
/**
*
* Product tags attached to this entry. Product tags are arbitrary phrases or strings that may be attached to product
* records to help categorize them or facilitate their management. They are not generally end-user-visible.
*
*
* repeated .opencannabis.products.menu.ProductTag tag = 2;
*/
public io.opencannabis.schema.menu.ProductTagOrBuilder getTagOrBuilder(
int index) {
return tag_.get(index);
}
public static final int REF_FIELD_NUMBER = 3;
private java.util.List ref_;
/**
*
* Set of foreign references for this product, or, instances in which this product exists in an out-of-network system,
* in a uniquely identifiable way.
*
*
* repeated .opencannabis.products.menu.ForeignReference ref = 3;
*/
public java.util.List getRefList() {
return ref_;
}
/**
*
* Set of foreign references for this product, or, instances in which this product exists in an out-of-network system,
* in a uniquely identifiable way.
*
*
* repeated .opencannabis.products.menu.ForeignReference ref = 3;
*/
public java.util.List extends io.opencannabis.schema.menu.ForeignReferenceOrBuilder>
getRefOrBuilderList() {
return ref_;
}
/**
*
* Set of foreign references for this product, or, instances in which this product exists in an out-of-network system,
* in a uniquely identifiable way.
*
*
* repeated .opencannabis.products.menu.ForeignReference ref = 3;
*/
public int getRefCount() {
return ref_.size();
}
/**
*
* Set of foreign references for this product, or, instances in which this product exists in an out-of-network system,
* in a uniquely identifiable way.
*
*
* repeated .opencannabis.products.menu.ForeignReference ref = 3;
*/
public io.opencannabis.schema.menu.ForeignReference getRef(int index) {
return ref_.get(index);
}
/**
*
* Set of foreign references for this product, or, instances in which this product exists in an out-of-network system,
* in a uniquely identifiable way.
*
*
* repeated .opencannabis.products.menu.ForeignReference ref = 3;
*/
public io.opencannabis.schema.menu.ForeignReferenceOrBuilder getRefOrBuilder(
int index) {
return ref_.get(index);
}
public static final int APOTHECARY_FIELD_NUMBER = 10;
/**
*
* Apothecary product.
*
*
* .opencannabis.products.Apothecary apothecary = 10;
*/
public boolean hasApothecary() {
return productCase_ == 10;
}
/**
*
* Apothecary product.
*
*
* .opencannabis.products.Apothecary apothecary = 10;
*/
public io.opencannabis.schema.product.ApothecaryProduct.Apothecary getApothecary() {
if (productCase_ == 10) {
return (io.opencannabis.schema.product.ApothecaryProduct.Apothecary) product_;
}
return io.opencannabis.schema.product.ApothecaryProduct.Apothecary.getDefaultInstance();
}
/**
*
* Apothecary product.
*
*
* .opencannabis.products.Apothecary apothecary = 10;
*/
public io.opencannabis.schema.product.ApothecaryProduct.ApothecaryOrBuilder getApothecaryOrBuilder() {
if (productCase_ == 10) {
return (io.opencannabis.schema.product.ApothecaryProduct.Apothecary) product_;
}
return io.opencannabis.schema.product.ApothecaryProduct.Apothecary.getDefaultInstance();
}
public static final int CARTRIDGE_FIELD_NUMBER = 11;
/**
*
* Cartridge product.
*
*
* .opencannabis.products.Cartridge cartridge = 11;
*/
public boolean hasCartridge() {
return productCase_ == 11;
}
/**
*
* Cartridge product.
*
*
* .opencannabis.products.Cartridge cartridge = 11;
*/
public io.opencannabis.schema.product.CartridgeProduct.Cartridge getCartridge() {
if (productCase_ == 11) {
return (io.opencannabis.schema.product.CartridgeProduct.Cartridge) product_;
}
return io.opencannabis.schema.product.CartridgeProduct.Cartridge.getDefaultInstance();
}
/**
*
* Cartridge product.
*
*
* .opencannabis.products.Cartridge cartridge = 11;
*/
public io.opencannabis.schema.product.CartridgeProduct.CartridgeOrBuilder getCartridgeOrBuilder() {
if (productCase_ == 11) {
return (io.opencannabis.schema.product.CartridgeProduct.Cartridge) product_;
}
return io.opencannabis.schema.product.CartridgeProduct.Cartridge.getDefaultInstance();
}
public static final int EDIBLE_FIELD_NUMBER = 12;
/**
*
* Edible product.
*
*
* .opencannabis.products.Edible edible = 12;
*/
public boolean hasEdible() {
return productCase_ == 12;
}
/**
*
* Edible product.
*
*
* .opencannabis.products.Edible edible = 12;
*/
public io.opencannabis.schema.product.EdibleProduct.Edible getEdible() {
if (productCase_ == 12) {
return (io.opencannabis.schema.product.EdibleProduct.Edible) product_;
}
return io.opencannabis.schema.product.EdibleProduct.Edible.getDefaultInstance();
}
/**
*
* Edible product.
*
*
* .opencannabis.products.Edible edible = 12;
*/
public io.opencannabis.schema.product.EdibleProduct.EdibleOrBuilder getEdibleOrBuilder() {
if (productCase_ == 12) {
return (io.opencannabis.schema.product.EdibleProduct.Edible) product_;
}
return io.opencannabis.schema.product.EdibleProduct.Edible.getDefaultInstance();
}
public static final int EXTRACT_FIELD_NUMBER = 13;
/**
*
* Extract product.
*
*
* .opencannabis.products.Extract extract = 13;
*/
public boolean hasExtract() {
return productCase_ == 13;
}
/**
*
* Extract product.
*
*
* .opencannabis.products.Extract extract = 13;
*/
public io.opencannabis.schema.product.ExtractProduct.Extract getExtract() {
if (productCase_ == 13) {
return (io.opencannabis.schema.product.ExtractProduct.Extract) product_;
}
return io.opencannabis.schema.product.ExtractProduct.Extract.getDefaultInstance();
}
/**
*
* Extract product.
*
*
* .opencannabis.products.Extract extract = 13;
*/
public io.opencannabis.schema.product.ExtractProduct.ExtractOrBuilder getExtractOrBuilder() {
if (productCase_ == 13) {
return (io.opencannabis.schema.product.ExtractProduct.Extract) product_;
}
return io.opencannabis.schema.product.ExtractProduct.Extract.getDefaultInstance();
}
public static final int FLOWER_FIELD_NUMBER = 14;
/**
*
* Flower product.
*
*
* .opencannabis.products.Flower flower = 14;
*/
public boolean hasFlower() {
return productCase_ == 14;
}
/**
*
* Flower product.
*
*
* .opencannabis.products.Flower flower = 14;
*/
public io.opencannabis.schema.product.FlowerProduct.Flower getFlower() {
if (productCase_ == 14) {
return (io.opencannabis.schema.product.FlowerProduct.Flower) product_;
}
return io.opencannabis.schema.product.FlowerProduct.Flower.getDefaultInstance();
}
/**
*
* Flower product.
*
*
* .opencannabis.products.Flower flower = 14;
*/
public io.opencannabis.schema.product.FlowerProduct.FlowerOrBuilder getFlowerOrBuilder() {
if (productCase_ == 14) {
return (io.opencannabis.schema.product.FlowerProduct.Flower) product_;
}
return io.opencannabis.schema.product.FlowerProduct.Flower.getDefaultInstance();
}
public static final int MERCHANDISE_FIELD_NUMBER = 15;
/**
*
* Merchandise product.
*
*
* .opencannabis.products.Merchandise merchandise = 15;
*/
public boolean hasMerchandise() {
return productCase_ == 15;
}
/**
*
* Merchandise product.
*
*
* .opencannabis.products.Merchandise merchandise = 15;
*/
public io.opencannabis.schema.product.MerchandiseProduct.Merchandise getMerchandise() {
if (productCase_ == 15) {
return (io.opencannabis.schema.product.MerchandiseProduct.Merchandise) product_;
}
return io.opencannabis.schema.product.MerchandiseProduct.Merchandise.getDefaultInstance();
}
/**
*
* Merchandise product.
*
*
* .opencannabis.products.Merchandise merchandise = 15;
*/
public io.opencannabis.schema.product.MerchandiseProduct.MerchandiseOrBuilder getMerchandiseOrBuilder() {
if (productCase_ == 15) {
return (io.opencannabis.schema.product.MerchandiseProduct.Merchandise) product_;
}
return io.opencannabis.schema.product.MerchandiseProduct.Merchandise.getDefaultInstance();
}
public static final int PLANT_FIELD_NUMBER = 16;
/**
*
* Plant product.
*
*
* .opencannabis.products.Plant plant = 16;
*/
public boolean hasPlant() {
return productCase_ == 16;
}
/**
*
* Plant product.
*
*
* .opencannabis.products.Plant plant = 16;
*/
public io.opencannabis.schema.product.PlantProduct.Plant getPlant() {
if (productCase_ == 16) {
return (io.opencannabis.schema.product.PlantProduct.Plant) product_;
}
return io.opencannabis.schema.product.PlantProduct.Plant.getDefaultInstance();
}
/**
*
* Plant product.
*
*
* .opencannabis.products.Plant plant = 16;
*/
public io.opencannabis.schema.product.PlantProduct.PlantOrBuilder getPlantOrBuilder() {
if (productCase_ == 16) {
return (io.opencannabis.schema.product.PlantProduct.Plant) product_;
}
return io.opencannabis.schema.product.PlantProduct.Plant.getDefaultInstance();
}
public static final int PREROLL_FIELD_NUMBER = 17;
/**
*
* Preroll product.
*
*
* .opencannabis.products.Preroll preroll = 17;
*/
public boolean hasPreroll() {
return productCase_ == 17;
}
/**
*
* Preroll product.
*
*
* .opencannabis.products.Preroll preroll = 17;
*/
public io.opencannabis.schema.product.PrerollProduct.Preroll getPreroll() {
if (productCase_ == 17) {
return (io.opencannabis.schema.product.PrerollProduct.Preroll) product_;
}
return io.opencannabis.schema.product.PrerollProduct.Preroll.getDefaultInstance();
}
/**
*
* Preroll product.
*
*
* .opencannabis.products.Preroll preroll = 17;
*/
public io.opencannabis.schema.product.PrerollProduct.PrerollOrBuilder getPrerollOrBuilder() {
if (productCase_ == 17) {
return (io.opencannabis.schema.product.PrerollProduct.Preroll) product_;
}
return io.opencannabis.schema.product.PrerollProduct.Preroll.getDefaultInstance();
}
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 (key_ != null) {
output.writeMessage(1, getKey());
}
for (int i = 0; i < tag_.size(); i++) {
output.writeMessage(2, tag_.get(i));
}
for (int i = 0; i < ref_.size(); i++) {
output.writeMessage(3, ref_.get(i));
}
if (productCase_ == 10) {
output.writeMessage(10, (io.opencannabis.schema.product.ApothecaryProduct.Apothecary) product_);
}
if (productCase_ == 11) {
output.writeMessage(11, (io.opencannabis.schema.product.CartridgeProduct.Cartridge) product_);
}
if (productCase_ == 12) {
output.writeMessage(12, (io.opencannabis.schema.product.EdibleProduct.Edible) product_);
}
if (productCase_ == 13) {
output.writeMessage(13, (io.opencannabis.schema.product.ExtractProduct.Extract) product_);
}
if (productCase_ == 14) {
output.writeMessage(14, (io.opencannabis.schema.product.FlowerProduct.Flower) product_);
}
if (productCase_ == 15) {
output.writeMessage(15, (io.opencannabis.schema.product.MerchandiseProduct.Merchandise) product_);
}
if (productCase_ == 16) {
output.writeMessage(16, (io.opencannabis.schema.product.PlantProduct.Plant) product_);
}
if (productCase_ == 17) {
output.writeMessage(17, (io.opencannabis.schema.product.PrerollProduct.Preroll) product_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (key_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getKey());
}
for (int i = 0; i < tag_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, tag_.get(i));
}
for (int i = 0; i < ref_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, ref_.get(i));
}
if (productCase_ == 10) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(10, (io.opencannabis.schema.product.ApothecaryProduct.Apothecary) product_);
}
if (productCase_ == 11) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(11, (io.opencannabis.schema.product.CartridgeProduct.Cartridge) product_);
}
if (productCase_ == 12) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(12, (io.opencannabis.schema.product.EdibleProduct.Edible) product_);
}
if (productCase_ == 13) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(13, (io.opencannabis.schema.product.ExtractProduct.Extract) product_);
}
if (productCase_ == 14) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(14, (io.opencannabis.schema.product.FlowerProduct.Flower) product_);
}
if (productCase_ == 15) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(15, (io.opencannabis.schema.product.MerchandiseProduct.Merchandise) product_);
}
if (productCase_ == 16) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(16, (io.opencannabis.schema.product.PlantProduct.Plant) product_);
}
if (productCase_ == 17) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(17, (io.opencannabis.schema.product.PrerollProduct.Preroll) product_);
}
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 io.opencannabis.schema.menu.MenuProduct)) {
return super.equals(obj);
}
io.opencannabis.schema.menu.MenuProduct other = (io.opencannabis.schema.menu.MenuProduct) obj;
if (hasKey() != other.hasKey()) return false;
if (hasKey()) {
if (!getKey()
.equals(other.getKey())) return false;
}
if (!getTagList()
.equals(other.getTagList())) return false;
if (!getRefList()
.equals(other.getRefList())) return false;
if (!getProductCase().equals(other.getProductCase())) return false;
switch (productCase_) {
case 10:
if (!getApothecary()
.equals(other.getApothecary())) return false;
break;
case 11:
if (!getCartridge()
.equals(other.getCartridge())) return false;
break;
case 12:
if (!getEdible()
.equals(other.getEdible())) return false;
break;
case 13:
if (!getExtract()
.equals(other.getExtract())) return false;
break;
case 14:
if (!getFlower()
.equals(other.getFlower())) return false;
break;
case 15:
if (!getMerchandise()
.equals(other.getMerchandise())) return false;
break;
case 16:
if (!getPlant()
.equals(other.getPlant())) return false;
break;
case 17:
if (!getPreroll()
.equals(other.getPreroll())) return false;
break;
case 0:
default:
}
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasKey()) {
hash = (37 * hash) + KEY_FIELD_NUMBER;
hash = (53 * hash) + getKey().hashCode();
}
if (getTagCount() > 0) {
hash = (37 * hash) + TAG_FIELD_NUMBER;
hash = (53 * hash) + getTagList().hashCode();
}
if (getRefCount() > 0) {
hash = (37 * hash) + REF_FIELD_NUMBER;
hash = (53 * hash) + getRefList().hashCode();
}
switch (productCase_) {
case 10:
hash = (37 * hash) + APOTHECARY_FIELD_NUMBER;
hash = (53 * hash) + getApothecary().hashCode();
break;
case 11:
hash = (37 * hash) + CARTRIDGE_FIELD_NUMBER;
hash = (53 * hash) + getCartridge().hashCode();
break;
case 12:
hash = (37 * hash) + EDIBLE_FIELD_NUMBER;
hash = (53 * hash) + getEdible().hashCode();
break;
case 13:
hash = (37 * hash) + EXTRACT_FIELD_NUMBER;
hash = (53 * hash) + getExtract().hashCode();
break;
case 14:
hash = (37 * hash) + FLOWER_FIELD_NUMBER;
hash = (53 * hash) + getFlower().hashCode();
break;
case 15:
hash = (37 * hash) + MERCHANDISE_FIELD_NUMBER;
hash = (53 * hash) + getMerchandise().hashCode();
break;
case 16:
hash = (37 * hash) + PLANT_FIELD_NUMBER;
hash = (53 * hash) + getPlant().hashCode();
break;
case 17:
hash = (37 * hash) + PREROLL_FIELD_NUMBER;
hash = (53 * hash) + getPreroll().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.opencannabis.schema.menu.MenuProduct parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.opencannabis.schema.menu.MenuProduct parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.opencannabis.schema.menu.MenuProduct parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.opencannabis.schema.menu.MenuProduct parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.opencannabis.schema.menu.MenuProduct parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.opencannabis.schema.menu.MenuProduct parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.opencannabis.schema.menu.MenuProduct parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.opencannabis.schema.menu.MenuProduct 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 io.opencannabis.schema.menu.MenuProduct parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.opencannabis.schema.menu.MenuProduct 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 io.opencannabis.schema.menu.MenuProduct parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.opencannabis.schema.menu.MenuProduct 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(io.opencannabis.schema.menu.MenuProduct 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;
}
/**
*
* Menu product payload stanza. Specifies a single product as a member of a menu section. This generic record is used to
* wrap concrete menu product structures to make them generically usable. In V2 data stores, menu products are stored
* generically as a top-level entity (as opposed to V1, in which this model is synthesized from raw map data).
*
*
* Protobuf type {@code opencannabis.products.menu.MenuProduct}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:opencannabis.products.menu.MenuProduct)
io.opencannabis.schema.menu.MenuProductOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.opencannabis.schema.menu.MenuOuterClass.internal_static_opencannabis_products_menu_MenuProduct_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.opencannabis.schema.menu.MenuOuterClass.internal_static_opencannabis_products_menu_MenuProduct_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.opencannabis.schema.menu.MenuProduct.class, io.opencannabis.schema.menu.MenuProduct.Builder.class);
}
// Construct using io.opencannabis.schema.menu.MenuProduct.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getTagFieldBuilder();
getRefFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (keyBuilder_ == null) {
key_ = null;
} else {
key_ = null;
keyBuilder_ = null;
}
if (tagBuilder_ == null) {
tag_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
} else {
tagBuilder_.clear();
}
if (refBuilder_ == null) {
ref_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);
} else {
refBuilder_.clear();
}
productCase_ = 0;
product_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.opencannabis.schema.menu.MenuOuterClass.internal_static_opencannabis_products_menu_MenuProduct_descriptor;
}
@java.lang.Override
public io.opencannabis.schema.menu.MenuProduct getDefaultInstanceForType() {
return io.opencannabis.schema.menu.MenuProduct.getDefaultInstance();
}
@java.lang.Override
public io.opencannabis.schema.menu.MenuProduct build() {
io.opencannabis.schema.menu.MenuProduct result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.opencannabis.schema.menu.MenuProduct buildPartial() {
io.opencannabis.schema.menu.MenuProduct result = new io.opencannabis.schema.menu.MenuProduct(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (keyBuilder_ == null) {
result.key_ = key_;
} else {
result.key_ = keyBuilder_.build();
}
if (tagBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)) {
tag_ = java.util.Collections.unmodifiableList(tag_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.tag_ = tag_;
} else {
result.tag_ = tagBuilder_.build();
}
if (refBuilder_ == null) {
if (((bitField0_ & 0x00000004) != 0)) {
ref_ = java.util.Collections.unmodifiableList(ref_);
bitField0_ = (bitField0_ & ~0x00000004);
}
result.ref_ = ref_;
} else {
result.ref_ = refBuilder_.build();
}
if (productCase_ == 10) {
if (apothecaryBuilder_ == null) {
result.product_ = product_;
} else {
result.product_ = apothecaryBuilder_.build();
}
}
if (productCase_ == 11) {
if (cartridgeBuilder_ == null) {
result.product_ = product_;
} else {
result.product_ = cartridgeBuilder_.build();
}
}
if (productCase_ == 12) {
if (edibleBuilder_ == null) {
result.product_ = product_;
} else {
result.product_ = edibleBuilder_.build();
}
}
if (productCase_ == 13) {
if (extractBuilder_ == null) {
result.product_ = product_;
} else {
result.product_ = extractBuilder_.build();
}
}
if (productCase_ == 14) {
if (flowerBuilder_ == null) {
result.product_ = product_;
} else {
result.product_ = flowerBuilder_.build();
}
}
if (productCase_ == 15) {
if (merchandiseBuilder_ == null) {
result.product_ = product_;
} else {
result.product_ = merchandiseBuilder_.build();
}
}
if (productCase_ == 16) {
if (plantBuilder_ == null) {
result.product_ = product_;
} else {
result.product_ = plantBuilder_.build();
}
}
if (productCase_ == 17) {
if (prerollBuilder_ == null) {
result.product_ = product_;
} else {
result.product_ = prerollBuilder_.build();
}
}
result.bitField0_ = to_bitField0_;
result.productCase_ = productCase_;
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 io.opencannabis.schema.menu.MenuProduct) {
return mergeFrom((io.opencannabis.schema.menu.MenuProduct)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.opencannabis.schema.menu.MenuProduct other) {
if (other == io.opencannabis.schema.menu.MenuProduct.getDefaultInstance()) return this;
if (other.hasKey()) {
mergeKey(other.getKey());
}
if (tagBuilder_ == null) {
if (!other.tag_.isEmpty()) {
if (tag_.isEmpty()) {
tag_ = other.tag_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureTagIsMutable();
tag_.addAll(other.tag_);
}
onChanged();
}
} else {
if (!other.tag_.isEmpty()) {
if (tagBuilder_.isEmpty()) {
tagBuilder_.dispose();
tagBuilder_ = null;
tag_ = other.tag_;
bitField0_ = (bitField0_ & ~0x00000002);
tagBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getTagFieldBuilder() : null;
} else {
tagBuilder_.addAllMessages(other.tag_);
}
}
}
if (refBuilder_ == null) {
if (!other.ref_.isEmpty()) {
if (ref_.isEmpty()) {
ref_ = other.ref_;
bitField0_ = (bitField0_ & ~0x00000004);
} else {
ensureRefIsMutable();
ref_.addAll(other.ref_);
}
onChanged();
}
} else {
if (!other.ref_.isEmpty()) {
if (refBuilder_.isEmpty()) {
refBuilder_.dispose();
refBuilder_ = null;
ref_ = other.ref_;
bitField0_ = (bitField0_ & ~0x00000004);
refBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getRefFieldBuilder() : null;
} else {
refBuilder_.addAllMessages(other.ref_);
}
}
}
switch (other.getProductCase()) {
case APOTHECARY: {
mergeApothecary(other.getApothecary());
break;
}
case CARTRIDGE: {
mergeCartridge(other.getCartridge());
break;
}
case EDIBLE: {
mergeEdible(other.getEdible());
break;
}
case EXTRACT: {
mergeExtract(other.getExtract());
break;
}
case FLOWER: {
mergeFlower(other.getFlower());
break;
}
case MERCHANDISE: {
mergeMerchandise(other.getMerchandise());
break;
}
case PLANT: {
mergePlant(other.getPlant());
break;
}
case PREROLL: {
mergePreroll(other.getPreroll());
break;
}
case PRODUCT_NOT_SET: {
break;
}
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
io.opencannabis.schema.menu.MenuProduct parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.opencannabis.schema.menu.MenuProduct) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int productCase_ = 0;
private java.lang.Object product_;
public ProductCase
getProductCase() {
return ProductCase.forNumber(
productCase_);
}
public Builder clearProduct() {
productCase_ = 0;
product_ = null;
onChanged();
return this;
}
private int bitField0_;
private io.opencannabis.schema.base.BaseProductKey.ProductKey key_;
private com.google.protobuf.SingleFieldBuilderV3<
io.opencannabis.schema.base.BaseProductKey.ProductKey, io.opencannabis.schema.base.BaseProductKey.ProductKey.Builder, io.opencannabis.schema.base.BaseProductKey.ProductKeyOrBuilder> keyBuilder_;
/**
*
* Key record uniquely identifying this menu product. Keys for saved items are lifted to this property from the
* attached concrete record below.
*
*
* .opencannabis.base.ProductKey key = 1 [(.core.field) = { ... }
*/
public boolean hasKey() {
return keyBuilder_ != null || key_ != null;
}
/**
*
* Key record uniquely identifying this menu product. Keys for saved items are lifted to this property from the
* attached concrete record below.
*
*
* .opencannabis.base.ProductKey key = 1 [(.core.field) = { ... }
*/
public io.opencannabis.schema.base.BaseProductKey.ProductKey getKey() {
if (keyBuilder_ == null) {
return key_ == null ? io.opencannabis.schema.base.BaseProductKey.ProductKey.getDefaultInstance() : key_;
} else {
return keyBuilder_.getMessage();
}
}
/**
*
* Key record uniquely identifying this menu product. Keys for saved items are lifted to this property from the
* attached concrete record below.
*
*
* .opencannabis.base.ProductKey key = 1 [(.core.field) = { ... }
*/
public Builder setKey(io.opencannabis.schema.base.BaseProductKey.ProductKey value) {
if (keyBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
key_ = value;
onChanged();
} else {
keyBuilder_.setMessage(value);
}
return this;
}
/**
*
* Key record uniquely identifying this menu product. Keys for saved items are lifted to this property from the
* attached concrete record below.
*
*
* .opencannabis.base.ProductKey key = 1 [(.core.field) = { ... }
*/
public Builder setKey(
io.opencannabis.schema.base.BaseProductKey.ProductKey.Builder builderForValue) {
if (keyBuilder_ == null) {
key_ = builderForValue.build();
onChanged();
} else {
keyBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Key record uniquely identifying this menu product. Keys for saved items are lifted to this property from the
* attached concrete record below.
*
*
* .opencannabis.base.ProductKey key = 1 [(.core.field) = { ... }
*/
public Builder mergeKey(io.opencannabis.schema.base.BaseProductKey.ProductKey value) {
if (keyBuilder_ == null) {
if (key_ != null) {
key_ =
io.opencannabis.schema.base.BaseProductKey.ProductKey.newBuilder(key_).mergeFrom(value).buildPartial();
} else {
key_ = value;
}
onChanged();
} else {
keyBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Key record uniquely identifying this menu product. Keys for saved items are lifted to this property from the
* attached concrete record below.
*
*
* .opencannabis.base.ProductKey key = 1 [(.core.field) = { ... }
*/
public Builder clearKey() {
if (keyBuilder_ == null) {
key_ = null;
onChanged();
} else {
key_ = null;
keyBuilder_ = null;
}
return this;
}
/**
*
* Key record uniquely identifying this menu product. Keys for saved items are lifted to this property from the
* attached concrete record below.
*
*
* .opencannabis.base.ProductKey key = 1 [(.core.field) = { ... }
*/
public io.opencannabis.schema.base.BaseProductKey.ProductKey.Builder getKeyBuilder() {
onChanged();
return getKeyFieldBuilder().getBuilder();
}
/**
*
* Key record uniquely identifying this menu product. Keys for saved items are lifted to this property from the
* attached concrete record below.
*
*
* .opencannabis.base.ProductKey key = 1 [(.core.field) = { ... }
*/
public io.opencannabis.schema.base.BaseProductKey.ProductKeyOrBuilder getKeyOrBuilder() {
if (keyBuilder_ != null) {
return keyBuilder_.getMessageOrBuilder();
} else {
return key_ == null ?
io.opencannabis.schema.base.BaseProductKey.ProductKey.getDefaultInstance() : key_;
}
}
/**
*
* Key record uniquely identifying this menu product. Keys for saved items are lifted to this property from the
* attached concrete record below.
*
*
* .opencannabis.base.ProductKey key = 1 [(.core.field) = { ... }
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.opencannabis.schema.base.BaseProductKey.ProductKey, io.opencannabis.schema.base.BaseProductKey.ProductKey.Builder, io.opencannabis.schema.base.BaseProductKey.ProductKeyOrBuilder>
getKeyFieldBuilder() {
if (keyBuilder_ == null) {
keyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.opencannabis.schema.base.BaseProductKey.ProductKey, io.opencannabis.schema.base.BaseProductKey.ProductKey.Builder, io.opencannabis.schema.base.BaseProductKey.ProductKeyOrBuilder>(
getKey(),
getParentForChildren(),
isClean());
key_ = null;
}
return keyBuilder_;
}
private java.util.List tag_ =
java.util.Collections.emptyList();
private void ensureTagIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
tag_ = new java.util.ArrayList(tag_);
bitField0_ |= 0x00000002;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.opencannabis.schema.menu.ProductTag, io.opencannabis.schema.menu.ProductTag.Builder, io.opencannabis.schema.menu.ProductTagOrBuilder> tagBuilder_;
/**
*
* Product tags attached to this entry. Product tags are arbitrary phrases or strings that may be attached to product
* records to help categorize them or facilitate their management. They are not generally end-user-visible.
*
*
* repeated .opencannabis.products.menu.ProductTag tag = 2;
*/
public java.util.List getTagList() {
if (tagBuilder_ == null) {
return java.util.Collections.unmodifiableList(tag_);
} else {
return tagBuilder_.getMessageList();
}
}
/**
*
* Product tags attached to this entry. Product tags are arbitrary phrases or strings that may be attached to product
* records to help categorize them or facilitate their management. They are not generally end-user-visible.
*
*
* repeated .opencannabis.products.menu.ProductTag tag = 2;
*/
public int getTagCount() {
if (tagBuilder_ == null) {
return tag_.size();
} else {
return tagBuilder_.getCount();
}
}
/**
*
* Product tags attached to this entry. Product tags are arbitrary phrases or strings that may be attached to product
* records to help categorize them or facilitate their management. They are not generally end-user-visible.
*
*
* repeated .opencannabis.products.menu.ProductTag tag = 2;
*/
public io.opencannabis.schema.menu.ProductTag getTag(int index) {
if (tagBuilder_ == null) {
return tag_.get(index);
} else {
return tagBuilder_.getMessage(index);
}
}
/**
*
* Product tags attached to this entry. Product tags are arbitrary phrases or strings that may be attached to product
* records to help categorize them or facilitate their management. They are not generally end-user-visible.
*
*
* repeated .opencannabis.products.menu.ProductTag tag = 2;
*/
public Builder setTag(
int index, io.opencannabis.schema.menu.ProductTag value) {
if (tagBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureTagIsMutable();
tag_.set(index, value);
onChanged();
} else {
tagBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Product tags attached to this entry. Product tags are arbitrary phrases or strings that may be attached to product
* records to help categorize them or facilitate their management. They are not generally end-user-visible.
*
*
* repeated .opencannabis.products.menu.ProductTag tag = 2;
*/
public Builder setTag(
int index, io.opencannabis.schema.menu.ProductTag.Builder builderForValue) {
if (tagBuilder_ == null) {
ensureTagIsMutable();
tag_.set(index, builderForValue.build());
onChanged();
} else {
tagBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Product tags attached to this entry. Product tags are arbitrary phrases or strings that may be attached to product
* records to help categorize them or facilitate their management. They are not generally end-user-visible.
*
*
* repeated .opencannabis.products.menu.ProductTag tag = 2;
*/
public Builder addTag(io.opencannabis.schema.menu.ProductTag value) {
if (tagBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureTagIsMutable();
tag_.add(value);
onChanged();
} else {
tagBuilder_.addMessage(value);
}
return this;
}
/**
*
* Product tags attached to this entry. Product tags are arbitrary phrases or strings that may be attached to product
* records to help categorize them or facilitate their management. They are not generally end-user-visible.
*
*
* repeated .opencannabis.products.menu.ProductTag tag = 2;
*/
public Builder addTag(
int index, io.opencannabis.schema.menu.ProductTag value) {
if (tagBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureTagIsMutable();
tag_.add(index, value);
onChanged();
} else {
tagBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Product tags attached to this entry. Product tags are arbitrary phrases or strings that may be attached to product
* records to help categorize them or facilitate their management. They are not generally end-user-visible.
*
*
* repeated .opencannabis.products.menu.ProductTag tag = 2;
*/
public Builder addTag(
io.opencannabis.schema.menu.ProductTag.Builder builderForValue) {
if (tagBuilder_ == null) {
ensureTagIsMutable();
tag_.add(builderForValue.build());
onChanged();
} else {
tagBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Product tags attached to this entry. Product tags are arbitrary phrases or strings that may be attached to product
* records to help categorize them or facilitate their management. They are not generally end-user-visible.
*
*
* repeated .opencannabis.products.menu.ProductTag tag = 2;
*/
public Builder addTag(
int index, io.opencannabis.schema.menu.ProductTag.Builder builderForValue) {
if (tagBuilder_ == null) {
ensureTagIsMutable();
tag_.add(index, builderForValue.build());
onChanged();
} else {
tagBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Product tags attached to this entry. Product tags are arbitrary phrases or strings that may be attached to product
* records to help categorize them or facilitate their management. They are not generally end-user-visible.
*
*
* repeated .opencannabis.products.menu.ProductTag tag = 2;
*/
public Builder addAllTag(
java.lang.Iterable extends io.opencannabis.schema.menu.ProductTag> values) {
if (tagBuilder_ == null) {
ensureTagIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, tag_);
onChanged();
} else {
tagBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Product tags attached to this entry. Product tags are arbitrary phrases or strings that may be attached to product
* records to help categorize them or facilitate their management. They are not generally end-user-visible.
*
*
* repeated .opencannabis.products.menu.ProductTag tag = 2;
*/
public Builder clearTag() {
if (tagBuilder_ == null) {
tag_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
} else {
tagBuilder_.clear();
}
return this;
}
/**
*
* Product tags attached to this entry. Product tags are arbitrary phrases or strings that may be attached to product
* records to help categorize them or facilitate their management. They are not generally end-user-visible.
*
*
* repeated .opencannabis.products.menu.ProductTag tag = 2;
*/
public Builder removeTag(int index) {
if (tagBuilder_ == null) {
ensureTagIsMutable();
tag_.remove(index);
onChanged();
} else {
tagBuilder_.remove(index);
}
return this;
}
/**
*
* Product tags attached to this entry. Product tags are arbitrary phrases or strings that may be attached to product
* records to help categorize them or facilitate their management. They are not generally end-user-visible.
*
*
* repeated .opencannabis.products.menu.ProductTag tag = 2;
*/
public io.opencannabis.schema.menu.ProductTag.Builder getTagBuilder(
int index) {
return getTagFieldBuilder().getBuilder(index);
}
/**
*
* Product tags attached to this entry. Product tags are arbitrary phrases or strings that may be attached to product
* records to help categorize them or facilitate their management. They are not generally end-user-visible.
*
*
* repeated .opencannabis.products.menu.ProductTag tag = 2;
*/
public io.opencannabis.schema.menu.ProductTagOrBuilder getTagOrBuilder(
int index) {
if (tagBuilder_ == null) {
return tag_.get(index); } else {
return tagBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Product tags attached to this entry. Product tags are arbitrary phrases or strings that may be attached to product
* records to help categorize them or facilitate their management. They are not generally end-user-visible.
*
*
* repeated .opencannabis.products.menu.ProductTag tag = 2;
*/
public java.util.List extends io.opencannabis.schema.menu.ProductTagOrBuilder>
getTagOrBuilderList() {
if (tagBuilder_ != null) {
return tagBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(tag_);
}
}
/**
*
* Product tags attached to this entry. Product tags are arbitrary phrases or strings that may be attached to product
* records to help categorize them or facilitate their management. They are not generally end-user-visible.
*
*
* repeated .opencannabis.products.menu.ProductTag tag = 2;
*/
public io.opencannabis.schema.menu.ProductTag.Builder addTagBuilder() {
return getTagFieldBuilder().addBuilder(
io.opencannabis.schema.menu.ProductTag.getDefaultInstance());
}
/**
*
* Product tags attached to this entry. Product tags are arbitrary phrases or strings that may be attached to product
* records to help categorize them or facilitate their management. They are not generally end-user-visible.
*
*
* repeated .opencannabis.products.menu.ProductTag tag = 2;
*/
public io.opencannabis.schema.menu.ProductTag.Builder addTagBuilder(
int index) {
return getTagFieldBuilder().addBuilder(
index, io.opencannabis.schema.menu.ProductTag.getDefaultInstance());
}
/**
*
* Product tags attached to this entry. Product tags are arbitrary phrases or strings that may be attached to product
* records to help categorize them or facilitate their management. They are not generally end-user-visible.
*
*
* repeated .opencannabis.products.menu.ProductTag tag = 2;
*/
public java.util.List
getTagBuilderList() {
return getTagFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.opencannabis.schema.menu.ProductTag, io.opencannabis.schema.menu.ProductTag.Builder, io.opencannabis.schema.menu.ProductTagOrBuilder>
getTagFieldBuilder() {
if (tagBuilder_ == null) {
tagBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
io.opencannabis.schema.menu.ProductTag, io.opencannabis.schema.menu.ProductTag.Builder, io.opencannabis.schema.menu.ProductTagOrBuilder>(
tag_,
((bitField0_ & 0x00000002) != 0),
getParentForChildren(),
isClean());
tag_ = null;
}
return tagBuilder_;
}
private java.util.List ref_ =
java.util.Collections.emptyList();
private void ensureRefIsMutable() {
if (!((bitField0_ & 0x00000004) != 0)) {
ref_ = new java.util.ArrayList(ref_);
bitField0_ |= 0x00000004;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.opencannabis.schema.menu.ForeignReference, io.opencannabis.schema.menu.ForeignReference.Builder, io.opencannabis.schema.menu.ForeignReferenceOrBuilder> refBuilder_;
/**
*
* Set of foreign references for this product, or, instances in which this product exists in an out-of-network system,
* in a uniquely identifiable way.
*
*
* repeated .opencannabis.products.menu.ForeignReference ref = 3;
*/
public java.util.List getRefList() {
if (refBuilder_ == null) {
return java.util.Collections.unmodifiableList(ref_);
} else {
return refBuilder_.getMessageList();
}
}
/**
*
* Set of foreign references for this product, or, instances in which this product exists in an out-of-network system,
* in a uniquely identifiable way.
*
*
* repeated .opencannabis.products.menu.ForeignReference ref = 3;
*/
public int getRefCount() {
if (refBuilder_ == null) {
return ref_.size();
} else {
return refBuilder_.getCount();
}
}
/**
*
* Set of foreign references for this product, or, instances in which this product exists in an out-of-network system,
* in a uniquely identifiable way.
*
*
* repeated .opencannabis.products.menu.ForeignReference ref = 3;
*/
public io.opencannabis.schema.menu.ForeignReference getRef(int index) {
if (refBuilder_ == null) {
return ref_.get(index);
} else {
return refBuilder_.getMessage(index);
}
}
/**
*
* Set of foreign references for this product, or, instances in which this product exists in an out-of-network system,
* in a uniquely identifiable way.
*
*
* repeated .opencannabis.products.menu.ForeignReference ref = 3;
*/
public Builder setRef(
int index, io.opencannabis.schema.menu.ForeignReference value) {
if (refBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureRefIsMutable();
ref_.set(index, value);
onChanged();
} else {
refBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Set of foreign references for this product, or, instances in which this product exists in an out-of-network system,
* in a uniquely identifiable way.
*
*
* repeated .opencannabis.products.menu.ForeignReference ref = 3;
*/
public Builder setRef(
int index, io.opencannabis.schema.menu.ForeignReference.Builder builderForValue) {
if (refBuilder_ == null) {
ensureRefIsMutable();
ref_.set(index, builderForValue.build());
onChanged();
} else {
refBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Set of foreign references for this product, or, instances in which this product exists in an out-of-network system,
* in a uniquely identifiable way.
*
*
* repeated .opencannabis.products.menu.ForeignReference ref = 3;
*/
public Builder addRef(io.opencannabis.schema.menu.ForeignReference value) {
if (refBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureRefIsMutable();
ref_.add(value);
onChanged();
} else {
refBuilder_.addMessage(value);
}
return this;
}
/**
*
* Set of foreign references for this product, or, instances in which this product exists in an out-of-network system,
* in a uniquely identifiable way.
*
*
* repeated .opencannabis.products.menu.ForeignReference ref = 3;
*/
public Builder addRef(
int index, io.opencannabis.schema.menu.ForeignReference value) {
if (refBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureRefIsMutable();
ref_.add(index, value);
onChanged();
} else {
refBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Set of foreign references for this product, or, instances in which this product exists in an out-of-network system,
* in a uniquely identifiable way.
*
*
* repeated .opencannabis.products.menu.ForeignReference ref = 3;
*/
public Builder addRef(
io.opencannabis.schema.menu.ForeignReference.Builder builderForValue) {
if (refBuilder_ == null) {
ensureRefIsMutable();
ref_.add(builderForValue.build());
onChanged();
} else {
refBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Set of foreign references for this product, or, instances in which this product exists in an out-of-network system,
* in a uniquely identifiable way.
*
*
* repeated .opencannabis.products.menu.ForeignReference ref = 3;
*/
public Builder addRef(
int index, io.opencannabis.schema.menu.ForeignReference.Builder builderForValue) {
if (refBuilder_ == null) {
ensureRefIsMutable();
ref_.add(index, builderForValue.build());
onChanged();
} else {
refBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Set of foreign references for this product, or, instances in which this product exists in an out-of-network system,
* in a uniquely identifiable way.
*
*
* repeated .opencannabis.products.menu.ForeignReference ref = 3;
*/
public Builder addAllRef(
java.lang.Iterable extends io.opencannabis.schema.menu.ForeignReference> values) {
if (refBuilder_ == null) {
ensureRefIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, ref_);
onChanged();
} else {
refBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Set of foreign references for this product, or, instances in which this product exists in an out-of-network system,
* in a uniquely identifiable way.
*
*
* repeated .opencannabis.products.menu.ForeignReference ref = 3;
*/
public Builder clearRef() {
if (refBuilder_ == null) {
ref_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
} else {
refBuilder_.clear();
}
return this;
}
/**
*
* Set of foreign references for this product, or, instances in which this product exists in an out-of-network system,
* in a uniquely identifiable way.
*
*
* repeated .opencannabis.products.menu.ForeignReference ref = 3;
*/
public Builder removeRef(int index) {
if (refBuilder_ == null) {
ensureRefIsMutable();
ref_.remove(index);
onChanged();
} else {
refBuilder_.remove(index);
}
return this;
}
/**
*
* Set of foreign references for this product, or, instances in which this product exists in an out-of-network system,
* in a uniquely identifiable way.
*
*
* repeated .opencannabis.products.menu.ForeignReference ref = 3;
*/
public io.opencannabis.schema.menu.ForeignReference.Builder getRefBuilder(
int index) {
return getRefFieldBuilder().getBuilder(index);
}
/**
*
* Set of foreign references for this product, or, instances in which this product exists in an out-of-network system,
* in a uniquely identifiable way.
*
*
* repeated .opencannabis.products.menu.ForeignReference ref = 3;
*/
public io.opencannabis.schema.menu.ForeignReferenceOrBuilder getRefOrBuilder(
int index) {
if (refBuilder_ == null) {
return ref_.get(index); } else {
return refBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Set of foreign references for this product, or, instances in which this product exists in an out-of-network system,
* in a uniquely identifiable way.
*
*
* repeated .opencannabis.products.menu.ForeignReference ref = 3;
*/
public java.util.List extends io.opencannabis.schema.menu.ForeignReferenceOrBuilder>
getRefOrBuilderList() {
if (refBuilder_ != null) {
return refBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(ref_);
}
}
/**
*
* Set of foreign references for this product, or, instances in which this product exists in an out-of-network system,
* in a uniquely identifiable way.
*
*
* repeated .opencannabis.products.menu.ForeignReference ref = 3;
*/
public io.opencannabis.schema.menu.ForeignReference.Builder addRefBuilder() {
return getRefFieldBuilder().addBuilder(
io.opencannabis.schema.menu.ForeignReference.getDefaultInstance());
}
/**
*
* Set of foreign references for this product, or, instances in which this product exists in an out-of-network system,
* in a uniquely identifiable way.
*
*
* repeated .opencannabis.products.menu.ForeignReference ref = 3;
*/
public io.opencannabis.schema.menu.ForeignReference.Builder addRefBuilder(
int index) {
return getRefFieldBuilder().addBuilder(
index, io.opencannabis.schema.menu.ForeignReference.getDefaultInstance());
}
/**
*
* Set of foreign references for this product, or, instances in which this product exists in an out-of-network system,
* in a uniquely identifiable way.
*
*
* repeated .opencannabis.products.menu.ForeignReference ref = 3;
*/
public java.util.List
getRefBuilderList() {
return getRefFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.opencannabis.schema.menu.ForeignReference, io.opencannabis.schema.menu.ForeignReference.Builder, io.opencannabis.schema.menu.ForeignReferenceOrBuilder>
getRefFieldBuilder() {
if (refBuilder_ == null) {
refBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
io.opencannabis.schema.menu.ForeignReference, io.opencannabis.schema.menu.ForeignReference.Builder, io.opencannabis.schema.menu.ForeignReferenceOrBuilder>(
ref_,
((bitField0_ & 0x00000004) != 0),
getParentForChildren(),
isClean());
ref_ = null;
}
return refBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
io.opencannabis.schema.product.ApothecaryProduct.Apothecary, io.opencannabis.schema.product.ApothecaryProduct.Apothecary.Builder, io.opencannabis.schema.product.ApothecaryProduct.ApothecaryOrBuilder> apothecaryBuilder_;
/**
*
* Apothecary product.
*
*
* .opencannabis.products.Apothecary apothecary = 10;
*/
public boolean hasApothecary() {
return productCase_ == 10;
}
/**
*
* Apothecary product.
*
*
* .opencannabis.products.Apothecary apothecary = 10;
*/
public io.opencannabis.schema.product.ApothecaryProduct.Apothecary getApothecary() {
if (apothecaryBuilder_ == null) {
if (productCase_ == 10) {
return (io.opencannabis.schema.product.ApothecaryProduct.Apothecary) product_;
}
return io.opencannabis.schema.product.ApothecaryProduct.Apothecary.getDefaultInstance();
} else {
if (productCase_ == 10) {
return apothecaryBuilder_.getMessage();
}
return io.opencannabis.schema.product.ApothecaryProduct.Apothecary.getDefaultInstance();
}
}
/**
*
* Apothecary product.
*
*
* .opencannabis.products.Apothecary apothecary = 10;
*/
public Builder setApothecary(io.opencannabis.schema.product.ApothecaryProduct.Apothecary value) {
if (apothecaryBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
product_ = value;
onChanged();
} else {
apothecaryBuilder_.setMessage(value);
}
productCase_ = 10;
return this;
}
/**
*
* Apothecary product.
*
*
* .opencannabis.products.Apothecary apothecary = 10;
*/
public Builder setApothecary(
io.opencannabis.schema.product.ApothecaryProduct.Apothecary.Builder builderForValue) {
if (apothecaryBuilder_ == null) {
product_ = builderForValue.build();
onChanged();
} else {
apothecaryBuilder_.setMessage(builderForValue.build());
}
productCase_ = 10;
return this;
}
/**
*
* Apothecary product.
*
*
* .opencannabis.products.Apothecary apothecary = 10;
*/
public Builder mergeApothecary(io.opencannabis.schema.product.ApothecaryProduct.Apothecary value) {
if (apothecaryBuilder_ == null) {
if (productCase_ == 10 &&
product_ != io.opencannabis.schema.product.ApothecaryProduct.Apothecary.getDefaultInstance()) {
product_ = io.opencannabis.schema.product.ApothecaryProduct.Apothecary.newBuilder((io.opencannabis.schema.product.ApothecaryProduct.Apothecary) product_)
.mergeFrom(value).buildPartial();
} else {
product_ = value;
}
onChanged();
} else {
if (productCase_ == 10) {
apothecaryBuilder_.mergeFrom(value);
}
apothecaryBuilder_.setMessage(value);
}
productCase_ = 10;
return this;
}
/**
*
* Apothecary product.
*
*
* .opencannabis.products.Apothecary apothecary = 10;
*/
public Builder clearApothecary() {
if (apothecaryBuilder_ == null) {
if (productCase_ == 10) {
productCase_ = 0;
product_ = null;
onChanged();
}
} else {
if (productCase_ == 10) {
productCase_ = 0;
product_ = null;
}
apothecaryBuilder_.clear();
}
return this;
}
/**
*
* Apothecary product.
*
*
* .opencannabis.products.Apothecary apothecary = 10;
*/
public io.opencannabis.schema.product.ApothecaryProduct.Apothecary.Builder getApothecaryBuilder() {
return getApothecaryFieldBuilder().getBuilder();
}
/**
*
* Apothecary product.
*
*
* .opencannabis.products.Apothecary apothecary = 10;
*/
public io.opencannabis.schema.product.ApothecaryProduct.ApothecaryOrBuilder getApothecaryOrBuilder() {
if ((productCase_ == 10) && (apothecaryBuilder_ != null)) {
return apothecaryBuilder_.getMessageOrBuilder();
} else {
if (productCase_ == 10) {
return (io.opencannabis.schema.product.ApothecaryProduct.Apothecary) product_;
}
return io.opencannabis.schema.product.ApothecaryProduct.Apothecary.getDefaultInstance();
}
}
/**
*
* Apothecary product.
*
*
* .opencannabis.products.Apothecary apothecary = 10;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.opencannabis.schema.product.ApothecaryProduct.Apothecary, io.opencannabis.schema.product.ApothecaryProduct.Apothecary.Builder, io.opencannabis.schema.product.ApothecaryProduct.ApothecaryOrBuilder>
getApothecaryFieldBuilder() {
if (apothecaryBuilder_ == null) {
if (!(productCase_ == 10)) {
product_ = io.opencannabis.schema.product.ApothecaryProduct.Apothecary.getDefaultInstance();
}
apothecaryBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.opencannabis.schema.product.ApothecaryProduct.Apothecary, io.opencannabis.schema.product.ApothecaryProduct.Apothecary.Builder, io.opencannabis.schema.product.ApothecaryProduct.ApothecaryOrBuilder>(
(io.opencannabis.schema.product.ApothecaryProduct.Apothecary) product_,
getParentForChildren(),
isClean());
product_ = null;
}
productCase_ = 10;
onChanged();;
return apothecaryBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
io.opencannabis.schema.product.CartridgeProduct.Cartridge, io.opencannabis.schema.product.CartridgeProduct.Cartridge.Builder, io.opencannabis.schema.product.CartridgeProduct.CartridgeOrBuilder> cartridgeBuilder_;
/**
*
* Cartridge product.
*
*
* .opencannabis.products.Cartridge cartridge = 11;
*/
public boolean hasCartridge() {
return productCase_ == 11;
}
/**
*
* Cartridge product.
*
*
* .opencannabis.products.Cartridge cartridge = 11;
*/
public io.opencannabis.schema.product.CartridgeProduct.Cartridge getCartridge() {
if (cartridgeBuilder_ == null) {
if (productCase_ == 11) {
return (io.opencannabis.schema.product.CartridgeProduct.Cartridge) product_;
}
return io.opencannabis.schema.product.CartridgeProduct.Cartridge.getDefaultInstance();
} else {
if (productCase_ == 11) {
return cartridgeBuilder_.getMessage();
}
return io.opencannabis.schema.product.CartridgeProduct.Cartridge.getDefaultInstance();
}
}
/**
*
* Cartridge product.
*
*
* .opencannabis.products.Cartridge cartridge = 11;
*/
public Builder setCartridge(io.opencannabis.schema.product.CartridgeProduct.Cartridge value) {
if (cartridgeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
product_ = value;
onChanged();
} else {
cartridgeBuilder_.setMessage(value);
}
productCase_ = 11;
return this;
}
/**
*
* Cartridge product.
*
*
* .opencannabis.products.Cartridge cartridge = 11;
*/
public Builder setCartridge(
io.opencannabis.schema.product.CartridgeProduct.Cartridge.Builder builderForValue) {
if (cartridgeBuilder_ == null) {
product_ = builderForValue.build();
onChanged();
} else {
cartridgeBuilder_.setMessage(builderForValue.build());
}
productCase_ = 11;
return this;
}
/**
*
* Cartridge product.
*
*
* .opencannabis.products.Cartridge cartridge = 11;
*/
public Builder mergeCartridge(io.opencannabis.schema.product.CartridgeProduct.Cartridge value) {
if (cartridgeBuilder_ == null) {
if (productCase_ == 11 &&
product_ != io.opencannabis.schema.product.CartridgeProduct.Cartridge.getDefaultInstance()) {
product_ = io.opencannabis.schema.product.CartridgeProduct.Cartridge.newBuilder((io.opencannabis.schema.product.CartridgeProduct.Cartridge) product_)
.mergeFrom(value).buildPartial();
} else {
product_ = value;
}
onChanged();
} else {
if (productCase_ == 11) {
cartridgeBuilder_.mergeFrom(value);
}
cartridgeBuilder_.setMessage(value);
}
productCase_ = 11;
return this;
}
/**
*
* Cartridge product.
*
*
* .opencannabis.products.Cartridge cartridge = 11;
*/
public Builder clearCartridge() {
if (cartridgeBuilder_ == null) {
if (productCase_ == 11) {
productCase_ = 0;
product_ = null;
onChanged();
}
} else {
if (productCase_ == 11) {
productCase_ = 0;
product_ = null;
}
cartridgeBuilder_.clear();
}
return this;
}
/**
*
* Cartridge product.
*
*
* .opencannabis.products.Cartridge cartridge = 11;
*/
public io.opencannabis.schema.product.CartridgeProduct.Cartridge.Builder getCartridgeBuilder() {
return getCartridgeFieldBuilder().getBuilder();
}
/**
*
* Cartridge product.
*
*
* .opencannabis.products.Cartridge cartridge = 11;
*/
public io.opencannabis.schema.product.CartridgeProduct.CartridgeOrBuilder getCartridgeOrBuilder() {
if ((productCase_ == 11) && (cartridgeBuilder_ != null)) {
return cartridgeBuilder_.getMessageOrBuilder();
} else {
if (productCase_ == 11) {
return (io.opencannabis.schema.product.CartridgeProduct.Cartridge) product_;
}
return io.opencannabis.schema.product.CartridgeProduct.Cartridge.getDefaultInstance();
}
}
/**
*
* Cartridge product.
*
*
* .opencannabis.products.Cartridge cartridge = 11;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.opencannabis.schema.product.CartridgeProduct.Cartridge, io.opencannabis.schema.product.CartridgeProduct.Cartridge.Builder, io.opencannabis.schema.product.CartridgeProduct.CartridgeOrBuilder>
getCartridgeFieldBuilder() {
if (cartridgeBuilder_ == null) {
if (!(productCase_ == 11)) {
product_ = io.opencannabis.schema.product.CartridgeProduct.Cartridge.getDefaultInstance();
}
cartridgeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.opencannabis.schema.product.CartridgeProduct.Cartridge, io.opencannabis.schema.product.CartridgeProduct.Cartridge.Builder, io.opencannabis.schema.product.CartridgeProduct.CartridgeOrBuilder>(
(io.opencannabis.schema.product.CartridgeProduct.Cartridge) product_,
getParentForChildren(),
isClean());
product_ = null;
}
productCase_ = 11;
onChanged();;
return cartridgeBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
io.opencannabis.schema.product.EdibleProduct.Edible, io.opencannabis.schema.product.EdibleProduct.Edible.Builder, io.opencannabis.schema.product.EdibleProduct.EdibleOrBuilder> edibleBuilder_;
/**
*
* Edible product.
*
*
* .opencannabis.products.Edible edible = 12;
*/
public boolean hasEdible() {
return productCase_ == 12;
}
/**
*
* Edible product.
*
*
* .opencannabis.products.Edible edible = 12;
*/
public io.opencannabis.schema.product.EdibleProduct.Edible getEdible() {
if (edibleBuilder_ == null) {
if (productCase_ == 12) {
return (io.opencannabis.schema.product.EdibleProduct.Edible) product_;
}
return io.opencannabis.schema.product.EdibleProduct.Edible.getDefaultInstance();
} else {
if (productCase_ == 12) {
return edibleBuilder_.getMessage();
}
return io.opencannabis.schema.product.EdibleProduct.Edible.getDefaultInstance();
}
}
/**
*
* Edible product.
*
*
* .opencannabis.products.Edible edible = 12;
*/
public Builder setEdible(io.opencannabis.schema.product.EdibleProduct.Edible value) {
if (edibleBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
product_ = value;
onChanged();
} else {
edibleBuilder_.setMessage(value);
}
productCase_ = 12;
return this;
}
/**
*
* Edible product.
*
*
* .opencannabis.products.Edible edible = 12;
*/
public Builder setEdible(
io.opencannabis.schema.product.EdibleProduct.Edible.Builder builderForValue) {
if (edibleBuilder_ == null) {
product_ = builderForValue.build();
onChanged();
} else {
edibleBuilder_.setMessage(builderForValue.build());
}
productCase_ = 12;
return this;
}
/**
*
* Edible product.
*
*
* .opencannabis.products.Edible edible = 12;
*/
public Builder mergeEdible(io.opencannabis.schema.product.EdibleProduct.Edible value) {
if (edibleBuilder_ == null) {
if (productCase_ == 12 &&
product_ != io.opencannabis.schema.product.EdibleProduct.Edible.getDefaultInstance()) {
product_ = io.opencannabis.schema.product.EdibleProduct.Edible.newBuilder((io.opencannabis.schema.product.EdibleProduct.Edible) product_)
.mergeFrom(value).buildPartial();
} else {
product_ = value;
}
onChanged();
} else {
if (productCase_ == 12) {
edibleBuilder_.mergeFrom(value);
}
edibleBuilder_.setMessage(value);
}
productCase_ = 12;
return this;
}
/**
*
* Edible product.
*
*
* .opencannabis.products.Edible edible = 12;
*/
public Builder clearEdible() {
if (edibleBuilder_ == null) {
if (productCase_ == 12) {
productCase_ = 0;
product_ = null;
onChanged();
}
} else {
if (productCase_ == 12) {
productCase_ = 0;
product_ = null;
}
edibleBuilder_.clear();
}
return this;
}
/**
*
* Edible product.
*
*
* .opencannabis.products.Edible edible = 12;
*/
public io.opencannabis.schema.product.EdibleProduct.Edible.Builder getEdibleBuilder() {
return getEdibleFieldBuilder().getBuilder();
}
/**
*
* Edible product.
*
*
* .opencannabis.products.Edible edible = 12;
*/
public io.opencannabis.schema.product.EdibleProduct.EdibleOrBuilder getEdibleOrBuilder() {
if ((productCase_ == 12) && (edibleBuilder_ != null)) {
return edibleBuilder_.getMessageOrBuilder();
} else {
if (productCase_ == 12) {
return (io.opencannabis.schema.product.EdibleProduct.Edible) product_;
}
return io.opencannabis.schema.product.EdibleProduct.Edible.getDefaultInstance();
}
}
/**
*
* Edible product.
*
*
* .opencannabis.products.Edible edible = 12;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.opencannabis.schema.product.EdibleProduct.Edible, io.opencannabis.schema.product.EdibleProduct.Edible.Builder, io.opencannabis.schema.product.EdibleProduct.EdibleOrBuilder>
getEdibleFieldBuilder() {
if (edibleBuilder_ == null) {
if (!(productCase_ == 12)) {
product_ = io.opencannabis.schema.product.EdibleProduct.Edible.getDefaultInstance();
}
edibleBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.opencannabis.schema.product.EdibleProduct.Edible, io.opencannabis.schema.product.EdibleProduct.Edible.Builder, io.opencannabis.schema.product.EdibleProduct.EdibleOrBuilder>(
(io.opencannabis.schema.product.EdibleProduct.Edible) product_,
getParentForChildren(),
isClean());
product_ = null;
}
productCase_ = 12;
onChanged();;
return edibleBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
io.opencannabis.schema.product.ExtractProduct.Extract, io.opencannabis.schema.product.ExtractProduct.Extract.Builder, io.opencannabis.schema.product.ExtractProduct.ExtractOrBuilder> extractBuilder_;
/**
*
* Extract product.
*
*
* .opencannabis.products.Extract extract = 13;
*/
public boolean hasExtract() {
return productCase_ == 13;
}
/**
*
* Extract product.
*
*
* .opencannabis.products.Extract extract = 13;
*/
public io.opencannabis.schema.product.ExtractProduct.Extract getExtract() {
if (extractBuilder_ == null) {
if (productCase_ == 13) {
return (io.opencannabis.schema.product.ExtractProduct.Extract) product_;
}
return io.opencannabis.schema.product.ExtractProduct.Extract.getDefaultInstance();
} else {
if (productCase_ == 13) {
return extractBuilder_.getMessage();
}
return io.opencannabis.schema.product.ExtractProduct.Extract.getDefaultInstance();
}
}
/**
*
* Extract product.
*
*
* .opencannabis.products.Extract extract = 13;
*/
public Builder setExtract(io.opencannabis.schema.product.ExtractProduct.Extract value) {
if (extractBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
product_ = value;
onChanged();
} else {
extractBuilder_.setMessage(value);
}
productCase_ = 13;
return this;
}
/**
*
* Extract product.
*
*
* .opencannabis.products.Extract extract = 13;
*/
public Builder setExtract(
io.opencannabis.schema.product.ExtractProduct.Extract.Builder builderForValue) {
if (extractBuilder_ == null) {
product_ = builderForValue.build();
onChanged();
} else {
extractBuilder_.setMessage(builderForValue.build());
}
productCase_ = 13;
return this;
}
/**
*
* Extract product.
*
*
* .opencannabis.products.Extract extract = 13;
*/
public Builder mergeExtract(io.opencannabis.schema.product.ExtractProduct.Extract value) {
if (extractBuilder_ == null) {
if (productCase_ == 13 &&
product_ != io.opencannabis.schema.product.ExtractProduct.Extract.getDefaultInstance()) {
product_ = io.opencannabis.schema.product.ExtractProduct.Extract.newBuilder((io.opencannabis.schema.product.ExtractProduct.Extract) product_)
.mergeFrom(value).buildPartial();
} else {
product_ = value;
}
onChanged();
} else {
if (productCase_ == 13) {
extractBuilder_.mergeFrom(value);
}
extractBuilder_.setMessage(value);
}
productCase_ = 13;
return this;
}
/**
*
* Extract product.
*
*
* .opencannabis.products.Extract extract = 13;
*/
public Builder clearExtract() {
if (extractBuilder_ == null) {
if (productCase_ == 13) {
productCase_ = 0;
product_ = null;
onChanged();
}
} else {
if (productCase_ == 13) {
productCase_ = 0;
product_ = null;
}
extractBuilder_.clear();
}
return this;
}
/**
*
* Extract product.
*
*
* .opencannabis.products.Extract extract = 13;
*/
public io.opencannabis.schema.product.ExtractProduct.Extract.Builder getExtractBuilder() {
return getExtractFieldBuilder().getBuilder();
}
/**
*
* Extract product.
*
*
* .opencannabis.products.Extract extract = 13;
*/
public io.opencannabis.schema.product.ExtractProduct.ExtractOrBuilder getExtractOrBuilder() {
if ((productCase_ == 13) && (extractBuilder_ != null)) {
return extractBuilder_.getMessageOrBuilder();
} else {
if (productCase_ == 13) {
return (io.opencannabis.schema.product.ExtractProduct.Extract) product_;
}
return io.opencannabis.schema.product.ExtractProduct.Extract.getDefaultInstance();
}
}
/**
*
* Extract product.
*
*
* .opencannabis.products.Extract extract = 13;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.opencannabis.schema.product.ExtractProduct.Extract, io.opencannabis.schema.product.ExtractProduct.Extract.Builder, io.opencannabis.schema.product.ExtractProduct.ExtractOrBuilder>
getExtractFieldBuilder() {
if (extractBuilder_ == null) {
if (!(productCase_ == 13)) {
product_ = io.opencannabis.schema.product.ExtractProduct.Extract.getDefaultInstance();
}
extractBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.opencannabis.schema.product.ExtractProduct.Extract, io.opencannabis.schema.product.ExtractProduct.Extract.Builder, io.opencannabis.schema.product.ExtractProduct.ExtractOrBuilder>(
(io.opencannabis.schema.product.ExtractProduct.Extract) product_,
getParentForChildren(),
isClean());
product_ = null;
}
productCase_ = 13;
onChanged();;
return extractBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
io.opencannabis.schema.product.FlowerProduct.Flower, io.opencannabis.schema.product.FlowerProduct.Flower.Builder, io.opencannabis.schema.product.FlowerProduct.FlowerOrBuilder> flowerBuilder_;
/**
*
* Flower product.
*
*
* .opencannabis.products.Flower flower = 14;
*/
public boolean hasFlower() {
return productCase_ == 14;
}
/**
*
* Flower product.
*
*
* .opencannabis.products.Flower flower = 14;
*/
public io.opencannabis.schema.product.FlowerProduct.Flower getFlower() {
if (flowerBuilder_ == null) {
if (productCase_ == 14) {
return (io.opencannabis.schema.product.FlowerProduct.Flower) product_;
}
return io.opencannabis.schema.product.FlowerProduct.Flower.getDefaultInstance();
} else {
if (productCase_ == 14) {
return flowerBuilder_.getMessage();
}
return io.opencannabis.schema.product.FlowerProduct.Flower.getDefaultInstance();
}
}
/**
*
* Flower product.
*
*
* .opencannabis.products.Flower flower = 14;
*/
public Builder setFlower(io.opencannabis.schema.product.FlowerProduct.Flower value) {
if (flowerBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
product_ = value;
onChanged();
} else {
flowerBuilder_.setMessage(value);
}
productCase_ = 14;
return this;
}
/**
*
* Flower product.
*
*
* .opencannabis.products.Flower flower = 14;
*/
public Builder setFlower(
io.opencannabis.schema.product.FlowerProduct.Flower.Builder builderForValue) {
if (flowerBuilder_ == null) {
product_ = builderForValue.build();
onChanged();
} else {
flowerBuilder_.setMessage(builderForValue.build());
}
productCase_ = 14;
return this;
}
/**
*
* Flower product.
*
*
* .opencannabis.products.Flower flower = 14;
*/
public Builder mergeFlower(io.opencannabis.schema.product.FlowerProduct.Flower value) {
if (flowerBuilder_ == null) {
if (productCase_ == 14 &&
product_ != io.opencannabis.schema.product.FlowerProduct.Flower.getDefaultInstance()) {
product_ = io.opencannabis.schema.product.FlowerProduct.Flower.newBuilder((io.opencannabis.schema.product.FlowerProduct.Flower) product_)
.mergeFrom(value).buildPartial();
} else {
product_ = value;
}
onChanged();
} else {
if (productCase_ == 14) {
flowerBuilder_.mergeFrom(value);
}
flowerBuilder_.setMessage(value);
}
productCase_ = 14;
return this;
}
/**
*
* Flower product.
*
*
* .opencannabis.products.Flower flower = 14;
*/
public Builder clearFlower() {
if (flowerBuilder_ == null) {
if (productCase_ == 14) {
productCase_ = 0;
product_ = null;
onChanged();
}
} else {
if (productCase_ == 14) {
productCase_ = 0;
product_ = null;
}
flowerBuilder_.clear();
}
return this;
}
/**
*
* Flower product.
*
*
* .opencannabis.products.Flower flower = 14;
*/
public io.opencannabis.schema.product.FlowerProduct.Flower.Builder getFlowerBuilder() {
return getFlowerFieldBuilder().getBuilder();
}
/**
*
* Flower product.
*
*
* .opencannabis.products.Flower flower = 14;
*/
public io.opencannabis.schema.product.FlowerProduct.FlowerOrBuilder getFlowerOrBuilder() {
if ((productCase_ == 14) && (flowerBuilder_ != null)) {
return flowerBuilder_.getMessageOrBuilder();
} else {
if (productCase_ == 14) {
return (io.opencannabis.schema.product.FlowerProduct.Flower) product_;
}
return io.opencannabis.schema.product.FlowerProduct.Flower.getDefaultInstance();
}
}
/**
*
* Flower product.
*
*
* .opencannabis.products.Flower flower = 14;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.opencannabis.schema.product.FlowerProduct.Flower, io.opencannabis.schema.product.FlowerProduct.Flower.Builder, io.opencannabis.schema.product.FlowerProduct.FlowerOrBuilder>
getFlowerFieldBuilder() {
if (flowerBuilder_ == null) {
if (!(productCase_ == 14)) {
product_ = io.opencannabis.schema.product.FlowerProduct.Flower.getDefaultInstance();
}
flowerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.opencannabis.schema.product.FlowerProduct.Flower, io.opencannabis.schema.product.FlowerProduct.Flower.Builder, io.opencannabis.schema.product.FlowerProduct.FlowerOrBuilder>(
(io.opencannabis.schema.product.FlowerProduct.Flower) product_,
getParentForChildren(),
isClean());
product_ = null;
}
productCase_ = 14;
onChanged();;
return flowerBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
io.opencannabis.schema.product.MerchandiseProduct.Merchandise, io.opencannabis.schema.product.MerchandiseProduct.Merchandise.Builder, io.opencannabis.schema.product.MerchandiseProduct.MerchandiseOrBuilder> merchandiseBuilder_;
/**
*
* Merchandise product.
*
*
* .opencannabis.products.Merchandise merchandise = 15;
*/
public boolean hasMerchandise() {
return productCase_ == 15;
}
/**
*
* Merchandise product.
*
*
* .opencannabis.products.Merchandise merchandise = 15;
*/
public io.opencannabis.schema.product.MerchandiseProduct.Merchandise getMerchandise() {
if (merchandiseBuilder_ == null) {
if (productCase_ == 15) {
return (io.opencannabis.schema.product.MerchandiseProduct.Merchandise) product_;
}
return io.opencannabis.schema.product.MerchandiseProduct.Merchandise.getDefaultInstance();
} else {
if (productCase_ == 15) {
return merchandiseBuilder_.getMessage();
}
return io.opencannabis.schema.product.MerchandiseProduct.Merchandise.getDefaultInstance();
}
}
/**
*
* Merchandise product.
*
*
* .opencannabis.products.Merchandise merchandise = 15;
*/
public Builder setMerchandise(io.opencannabis.schema.product.MerchandiseProduct.Merchandise value) {
if (merchandiseBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
product_ = value;
onChanged();
} else {
merchandiseBuilder_.setMessage(value);
}
productCase_ = 15;
return this;
}
/**
*
* Merchandise product.
*
*
* .opencannabis.products.Merchandise merchandise = 15;
*/
public Builder setMerchandise(
io.opencannabis.schema.product.MerchandiseProduct.Merchandise.Builder builderForValue) {
if (merchandiseBuilder_ == null) {
product_ = builderForValue.build();
onChanged();
} else {
merchandiseBuilder_.setMessage(builderForValue.build());
}
productCase_ = 15;
return this;
}
/**
*
* Merchandise product.
*
*
* .opencannabis.products.Merchandise merchandise = 15;
*/
public Builder mergeMerchandise(io.opencannabis.schema.product.MerchandiseProduct.Merchandise value) {
if (merchandiseBuilder_ == null) {
if (productCase_ == 15 &&
product_ != io.opencannabis.schema.product.MerchandiseProduct.Merchandise.getDefaultInstance()) {
product_ = io.opencannabis.schema.product.MerchandiseProduct.Merchandise.newBuilder((io.opencannabis.schema.product.MerchandiseProduct.Merchandise) product_)
.mergeFrom(value).buildPartial();
} else {
product_ = value;
}
onChanged();
} else {
if (productCase_ == 15) {
merchandiseBuilder_.mergeFrom(value);
}
merchandiseBuilder_.setMessage(value);
}
productCase_ = 15;
return this;
}
/**
*
* Merchandise product.
*
*
* .opencannabis.products.Merchandise merchandise = 15;
*/
public Builder clearMerchandise() {
if (merchandiseBuilder_ == null) {
if (productCase_ == 15) {
productCase_ = 0;
product_ = null;
onChanged();
}
} else {
if (productCase_ == 15) {
productCase_ = 0;
product_ = null;
}
merchandiseBuilder_.clear();
}
return this;
}
/**
*
* Merchandise product.
*
*
* .opencannabis.products.Merchandise merchandise = 15;
*/
public io.opencannabis.schema.product.MerchandiseProduct.Merchandise.Builder getMerchandiseBuilder() {
return getMerchandiseFieldBuilder().getBuilder();
}
/**
*
* Merchandise product.
*
*
* .opencannabis.products.Merchandise merchandise = 15;
*/
public io.opencannabis.schema.product.MerchandiseProduct.MerchandiseOrBuilder getMerchandiseOrBuilder() {
if ((productCase_ == 15) && (merchandiseBuilder_ != null)) {
return merchandiseBuilder_.getMessageOrBuilder();
} else {
if (productCase_ == 15) {
return (io.opencannabis.schema.product.MerchandiseProduct.Merchandise) product_;
}
return io.opencannabis.schema.product.MerchandiseProduct.Merchandise.getDefaultInstance();
}
}
/**
*
* Merchandise product.
*
*
* .opencannabis.products.Merchandise merchandise = 15;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.opencannabis.schema.product.MerchandiseProduct.Merchandise, io.opencannabis.schema.product.MerchandiseProduct.Merchandise.Builder, io.opencannabis.schema.product.MerchandiseProduct.MerchandiseOrBuilder>
getMerchandiseFieldBuilder() {
if (merchandiseBuilder_ == null) {
if (!(productCase_ == 15)) {
product_ = io.opencannabis.schema.product.MerchandiseProduct.Merchandise.getDefaultInstance();
}
merchandiseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.opencannabis.schema.product.MerchandiseProduct.Merchandise, io.opencannabis.schema.product.MerchandiseProduct.Merchandise.Builder, io.opencannabis.schema.product.MerchandiseProduct.MerchandiseOrBuilder>(
(io.opencannabis.schema.product.MerchandiseProduct.Merchandise) product_,
getParentForChildren(),
isClean());
product_ = null;
}
productCase_ = 15;
onChanged();;
return merchandiseBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
io.opencannabis.schema.product.PlantProduct.Plant, io.opencannabis.schema.product.PlantProduct.Plant.Builder, io.opencannabis.schema.product.PlantProduct.PlantOrBuilder> plantBuilder_;
/**
*
* Plant product.
*
*
* .opencannabis.products.Plant plant = 16;
*/
public boolean hasPlant() {
return productCase_ == 16;
}
/**
*
* Plant product.
*
*
* .opencannabis.products.Plant plant = 16;
*/
public io.opencannabis.schema.product.PlantProduct.Plant getPlant() {
if (plantBuilder_ == null) {
if (productCase_ == 16) {
return (io.opencannabis.schema.product.PlantProduct.Plant) product_;
}
return io.opencannabis.schema.product.PlantProduct.Plant.getDefaultInstance();
} else {
if (productCase_ == 16) {
return plantBuilder_.getMessage();
}
return io.opencannabis.schema.product.PlantProduct.Plant.getDefaultInstance();
}
}
/**
*
* Plant product.
*
*
* .opencannabis.products.Plant plant = 16;
*/
public Builder setPlant(io.opencannabis.schema.product.PlantProduct.Plant value) {
if (plantBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
product_ = value;
onChanged();
} else {
plantBuilder_.setMessage(value);
}
productCase_ = 16;
return this;
}
/**
*
* Plant product.
*
*
* .opencannabis.products.Plant plant = 16;
*/
public Builder setPlant(
io.opencannabis.schema.product.PlantProduct.Plant.Builder builderForValue) {
if (plantBuilder_ == null) {
product_ = builderForValue.build();
onChanged();
} else {
plantBuilder_.setMessage(builderForValue.build());
}
productCase_ = 16;
return this;
}
/**
*
* Plant product.
*
*
* .opencannabis.products.Plant plant = 16;
*/
public Builder mergePlant(io.opencannabis.schema.product.PlantProduct.Plant value) {
if (plantBuilder_ == null) {
if (productCase_ == 16 &&
product_ != io.opencannabis.schema.product.PlantProduct.Plant.getDefaultInstance()) {
product_ = io.opencannabis.schema.product.PlantProduct.Plant.newBuilder((io.opencannabis.schema.product.PlantProduct.Plant) product_)
.mergeFrom(value).buildPartial();
} else {
product_ = value;
}
onChanged();
} else {
if (productCase_ == 16) {
plantBuilder_.mergeFrom(value);
}
plantBuilder_.setMessage(value);
}
productCase_ = 16;
return this;
}
/**
*
* Plant product.
*
*
* .opencannabis.products.Plant plant = 16;
*/
public Builder clearPlant() {
if (plantBuilder_ == null) {
if (productCase_ == 16) {
productCase_ = 0;
product_ = null;
onChanged();
}
} else {
if (productCase_ == 16) {
productCase_ = 0;
product_ = null;
}
plantBuilder_.clear();
}
return this;
}
/**
*
* Plant product.
*
*
* .opencannabis.products.Plant plant = 16;
*/
public io.opencannabis.schema.product.PlantProduct.Plant.Builder getPlantBuilder() {
return getPlantFieldBuilder().getBuilder();
}
/**
*
* Plant product.
*
*
* .opencannabis.products.Plant plant = 16;
*/
public io.opencannabis.schema.product.PlantProduct.PlantOrBuilder getPlantOrBuilder() {
if ((productCase_ == 16) && (plantBuilder_ != null)) {
return plantBuilder_.getMessageOrBuilder();
} else {
if (productCase_ == 16) {
return (io.opencannabis.schema.product.PlantProduct.Plant) product_;
}
return io.opencannabis.schema.product.PlantProduct.Plant.getDefaultInstance();
}
}
/**
*
* Plant product.
*
*
* .opencannabis.products.Plant plant = 16;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.opencannabis.schema.product.PlantProduct.Plant, io.opencannabis.schema.product.PlantProduct.Plant.Builder, io.opencannabis.schema.product.PlantProduct.PlantOrBuilder>
getPlantFieldBuilder() {
if (plantBuilder_ == null) {
if (!(productCase_ == 16)) {
product_ = io.opencannabis.schema.product.PlantProduct.Plant.getDefaultInstance();
}
plantBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.opencannabis.schema.product.PlantProduct.Plant, io.opencannabis.schema.product.PlantProduct.Plant.Builder, io.opencannabis.schema.product.PlantProduct.PlantOrBuilder>(
(io.opencannabis.schema.product.PlantProduct.Plant) product_,
getParentForChildren(),
isClean());
product_ = null;
}
productCase_ = 16;
onChanged();;
return plantBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
io.opencannabis.schema.product.PrerollProduct.Preroll, io.opencannabis.schema.product.PrerollProduct.Preroll.Builder, io.opencannabis.schema.product.PrerollProduct.PrerollOrBuilder> prerollBuilder_;
/**
*
* Preroll product.
*
*
* .opencannabis.products.Preroll preroll = 17;
*/
public boolean hasPreroll() {
return productCase_ == 17;
}
/**
*
* Preroll product.
*
*
* .opencannabis.products.Preroll preroll = 17;
*/
public io.opencannabis.schema.product.PrerollProduct.Preroll getPreroll() {
if (prerollBuilder_ == null) {
if (productCase_ == 17) {
return (io.opencannabis.schema.product.PrerollProduct.Preroll) product_;
}
return io.opencannabis.schema.product.PrerollProduct.Preroll.getDefaultInstance();
} else {
if (productCase_ == 17) {
return prerollBuilder_.getMessage();
}
return io.opencannabis.schema.product.PrerollProduct.Preroll.getDefaultInstance();
}
}
/**
*
* Preroll product.
*
*
* .opencannabis.products.Preroll preroll = 17;
*/
public Builder setPreroll(io.opencannabis.schema.product.PrerollProduct.Preroll value) {
if (prerollBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
product_ = value;
onChanged();
} else {
prerollBuilder_.setMessage(value);
}
productCase_ = 17;
return this;
}
/**
*
* Preroll product.
*
*
* .opencannabis.products.Preroll preroll = 17;
*/
public Builder setPreroll(
io.opencannabis.schema.product.PrerollProduct.Preroll.Builder builderForValue) {
if (prerollBuilder_ == null) {
product_ = builderForValue.build();
onChanged();
} else {
prerollBuilder_.setMessage(builderForValue.build());
}
productCase_ = 17;
return this;
}
/**
*
* Preroll product.
*
*
* .opencannabis.products.Preroll preroll = 17;
*/
public Builder mergePreroll(io.opencannabis.schema.product.PrerollProduct.Preroll value) {
if (prerollBuilder_ == null) {
if (productCase_ == 17 &&
product_ != io.opencannabis.schema.product.PrerollProduct.Preroll.getDefaultInstance()) {
product_ = io.opencannabis.schema.product.PrerollProduct.Preroll.newBuilder((io.opencannabis.schema.product.PrerollProduct.Preroll) product_)
.mergeFrom(value).buildPartial();
} else {
product_ = value;
}
onChanged();
} else {
if (productCase_ == 17) {
prerollBuilder_.mergeFrom(value);
}
prerollBuilder_.setMessage(value);
}
productCase_ = 17;
return this;
}
/**
*
* Preroll product.
*
*
* .opencannabis.products.Preroll preroll = 17;
*/
public Builder clearPreroll() {
if (prerollBuilder_ == null) {
if (productCase_ == 17) {
productCase_ = 0;
product_ = null;
onChanged();
}
} else {
if (productCase_ == 17) {
productCase_ = 0;
product_ = null;
}
prerollBuilder_.clear();
}
return this;
}
/**
*
* Preroll product.
*
*
* .opencannabis.products.Preroll preroll = 17;
*/
public io.opencannabis.schema.product.PrerollProduct.Preroll.Builder getPrerollBuilder() {
return getPrerollFieldBuilder().getBuilder();
}
/**
*
* Preroll product.
*
*
* .opencannabis.products.Preroll preroll = 17;
*/
public io.opencannabis.schema.product.PrerollProduct.PrerollOrBuilder getPrerollOrBuilder() {
if ((productCase_ == 17) && (prerollBuilder_ != null)) {
return prerollBuilder_.getMessageOrBuilder();
} else {
if (productCase_ == 17) {
return (io.opencannabis.schema.product.PrerollProduct.Preroll) product_;
}
return io.opencannabis.schema.product.PrerollProduct.Preroll.getDefaultInstance();
}
}
/**
*
* Preroll product.
*
*
* .opencannabis.products.Preroll preroll = 17;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.opencannabis.schema.product.PrerollProduct.Preroll, io.opencannabis.schema.product.PrerollProduct.Preroll.Builder, io.opencannabis.schema.product.PrerollProduct.PrerollOrBuilder>
getPrerollFieldBuilder() {
if (prerollBuilder_ == null) {
if (!(productCase_ == 17)) {
product_ = io.opencannabis.schema.product.PrerollProduct.Preroll.getDefaultInstance();
}
prerollBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.opencannabis.schema.product.PrerollProduct.Preroll, io.opencannabis.schema.product.PrerollProduct.Preroll.Builder, io.opencannabis.schema.product.PrerollProduct.PrerollOrBuilder>(
(io.opencannabis.schema.product.PrerollProduct.Preroll) product_,
getParentForChildren(),
isClean());
product_ = null;
}
productCase_ = 17;
onChanged();;
return prerollBuilder_;
}
@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:opencannabis.products.menu.MenuProduct)
}
// @@protoc_insertion_point(class_scope:opencannabis.products.menu.MenuProduct)
private static final io.opencannabis.schema.menu.MenuProduct DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.opencannabis.schema.menu.MenuProduct();
}
public static io.opencannabis.schema.menu.MenuProduct getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public MenuProduct parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new MenuProduct(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 io.opencannabis.schema.menu.MenuProduct getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy