io.opencannabis.schema.product.struct.testing.Subjective 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: structs/labtesting/TestResults.proto
package io.opencannabis.schema.product.struct.testing;
/**
*
* Specifies the structure of "subjective testing" results, wherein a consumer or user has tried the product and
* evaluated its subjective effects.
*
*
* Protobuf type {@code opencannabis.structs.labtesting.Subjective}
*/
public final class Subjective extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:opencannabis.structs.labtesting.Subjective)
SubjectiveOrBuilder {
private static final long serialVersionUID = 0L;
// Use Subjective.newBuilder() to construct.
private Subjective(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Subjective() {
potency_ = 0;
feeling_ = java.util.Collections.emptyList();
aroma_ = java.util.Collections.emptyList();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Subjective(
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.content.GenericContent.Content.Builder subBuilder = null;
if (description_ != null) {
subBuilder = description_.toBuilder();
}
description_ = input.readMessage(io.opencannabis.schema.content.GenericContent.Content.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(description_);
description_ = subBuilder.buildPartial();
}
break;
}
case 18: {
io.opencannabis.schema.content.GenericContent.Content.Builder subBuilder = null;
if (taste_ != null) {
subBuilder = taste_.toBuilder();
}
taste_ = input.readMessage(io.opencannabis.schema.content.GenericContent.Content.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(taste_);
taste_ = subBuilder.buildPartial();
}
break;
}
case 24: {
int rawValue = input.readEnum();
potency_ = rawValue;
break;
}
case 32: {
int rawValue = input.readEnum();
if (!((mutable_bitField0_ & 0x00000008) != 0)) {
feeling_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000008;
}
feeling_.add(rawValue);
break;
}
case 34: {
int length = input.readRawVarint32();
int oldLimit = input.pushLimit(length);
while(input.getBytesUntilLimit() > 0) {
int rawValue = input.readEnum();
if (!((mutable_bitField0_ & 0x00000008) != 0)) {
feeling_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000008;
}
feeling_.add(rawValue);
}
input.popLimit(oldLimit);
break;
}
case 40: {
int rawValue = input.readEnum();
if (!((mutable_bitField0_ & 0x00000010) != 0)) {
aroma_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000010;
}
aroma_.add(rawValue);
break;
}
case 42: {
int length = input.readRawVarint32();
int oldLimit = input.pushLimit(length);
while(input.getBytesUntilLimit() > 0) {
int rawValue = input.readEnum();
if (!((mutable_bitField0_ & 0x00000010) != 0)) {
aroma_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000010;
}
aroma_.add(rawValue);
}
input.popLimit(oldLimit);
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_ & 0x00000008) != 0)) {
feeling_ = java.util.Collections.unmodifiableList(feeling_);
}
if (((mutable_bitField0_ & 0x00000010) != 0)) {
aroma_ = java.util.Collections.unmodifiableList(aroma_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.opencannabis.schema.product.struct.testing.LabTesting.internal_static_opencannabis_structs_labtesting_Subjective_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.opencannabis.schema.product.struct.testing.LabTesting.internal_static_opencannabis_structs_labtesting_Subjective_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.opencannabis.schema.product.struct.testing.Subjective.class, io.opencannabis.schema.product.struct.testing.Subjective.Builder.class);
}
private int bitField0_;
public static final int DESCRIPTION_FIELD_NUMBER = 1;
private io.opencannabis.schema.content.GenericContent.Content description_;
/**
*
* Subjective description of using this product.
*
*
* .opencannabis.content.Content description = 1;
*/
public boolean hasDescription() {
return description_ != null;
}
/**
*
* Subjective description of using this product.
*
*
* .opencannabis.content.Content description = 1;
*/
public io.opencannabis.schema.content.GenericContent.Content getDescription() {
return description_ == null ? io.opencannabis.schema.content.GenericContent.Content.getDefaultInstance() : description_;
}
/**
*
* Subjective description of using this product.
*
*
* .opencannabis.content.Content description = 1;
*/
public io.opencannabis.schema.content.GenericContent.ContentOrBuilder getDescriptionOrBuilder() {
return getDescription();
}
public static final int TASTE_FIELD_NUMBER = 2;
private io.opencannabis.schema.content.GenericContent.Content taste_;
/**
*
* Subjective description of the taste of this product.
*
*
* .opencannabis.content.Content taste = 2;
*/
public boolean hasTaste() {
return taste_ != null;
}
/**
*
* Subjective description of the taste of this product.
*
*
* .opencannabis.content.Content taste = 2;
*/
public io.opencannabis.schema.content.GenericContent.Content getTaste() {
return taste_ == null ? io.opencannabis.schema.content.GenericContent.Content.getDefaultInstance() : taste_;
}
/**
*
* Subjective description of the taste of this product.
*
*
* .opencannabis.content.Content taste = 2;
*/
public io.opencannabis.schema.content.GenericContent.ContentOrBuilder getTasteOrBuilder() {
return getTaste();
}
public static final int POTENCY_FIELD_NUMBER = 3;
private int potency_;
/**
*
* Subjective potency estimate for this product.
*
*
* .opencannabis.structs.labtesting.PotencyEstimate potency = 3;
*/
public int getPotencyValue() {
return potency_;
}
/**
*
* Subjective potency estimate for this product.
*
*
* .opencannabis.structs.labtesting.PotencyEstimate potency = 3;
*/
public io.opencannabis.schema.product.struct.testing.PotencyEstimate getPotency() {
@SuppressWarnings("deprecation")
io.opencannabis.schema.product.struct.testing.PotencyEstimate result = io.opencannabis.schema.product.struct.testing.PotencyEstimate.valueOf(potency_);
return result == null ? io.opencannabis.schema.product.struct.testing.PotencyEstimate.UNRECOGNIZED : result;
}
public static final int FEELING_FIELD_NUMBER = 4;
private java.util.List feeling_;
private static final com.google.protobuf.Internal.ListAdapter.Converter<
java.lang.Integer, io.opencannabis.schema.product.struct.testing.Feeling> feeling_converter_ =
new com.google.protobuf.Internal.ListAdapter.Converter<
java.lang.Integer, io.opencannabis.schema.product.struct.testing.Feeling>() {
public io.opencannabis.schema.product.struct.testing.Feeling convert(java.lang.Integer from) {
@SuppressWarnings("deprecation")
io.opencannabis.schema.product.struct.testing.Feeling result = io.opencannabis.schema.product.struct.testing.Feeling.valueOf(from);
return result == null ? io.opencannabis.schema.product.struct.testing.Feeling.UNRECOGNIZED : result;
}
};
/**
*
* Subjective feeling tags for this product.
*
*
* repeated .opencannabis.structs.labtesting.Feeling feeling = 4;
*/
public java.util.List getFeelingList() {
return new com.google.protobuf.Internal.ListAdapter<
java.lang.Integer, io.opencannabis.schema.product.struct.testing.Feeling>(feeling_, feeling_converter_);
}
/**
*
* Subjective feeling tags for this product.
*
*
* repeated .opencannabis.structs.labtesting.Feeling feeling = 4;
*/
public int getFeelingCount() {
return feeling_.size();
}
/**
*
* Subjective feeling tags for this product.
*
*
* repeated .opencannabis.structs.labtesting.Feeling feeling = 4;
*/
public io.opencannabis.schema.product.struct.testing.Feeling getFeeling(int index) {
return feeling_converter_.convert(feeling_.get(index));
}
/**
*
* Subjective feeling tags for this product.
*
*
* repeated .opencannabis.structs.labtesting.Feeling feeling = 4;
*/
public java.util.List
getFeelingValueList() {
return feeling_;
}
/**
*
* Subjective feeling tags for this product.
*
*
* repeated .opencannabis.structs.labtesting.Feeling feeling = 4;
*/
public int getFeelingValue(int index) {
return feeling_.get(index);
}
private int feelingMemoizedSerializedSize;
public static final int AROMA_FIELD_NUMBER = 5;
private java.util.List aroma_;
private static final com.google.protobuf.Internal.ListAdapter.Converter<
java.lang.Integer, io.opencannabis.schema.product.struct.testing.TasteNote> aroma_converter_ =
new com.google.protobuf.Internal.ListAdapter.Converter<
java.lang.Integer, io.opencannabis.schema.product.struct.testing.TasteNote>() {
public io.opencannabis.schema.product.struct.testing.TasteNote convert(java.lang.Integer from) {
@SuppressWarnings("deprecation")
io.opencannabis.schema.product.struct.testing.TasteNote result = io.opencannabis.schema.product.struct.testing.TasteNote.valueOf(from);
return result == null ? io.opencannabis.schema.product.struct.testing.TasteNote.UNRECOGNIZED : result;
}
};
/**
*
* Subjective taste or aroma notes for this product.
*
*
* repeated .opencannabis.structs.labtesting.TasteNote aroma = 5;
*/
public java.util.List getAromaList() {
return new com.google.protobuf.Internal.ListAdapter<
java.lang.Integer, io.opencannabis.schema.product.struct.testing.TasteNote>(aroma_, aroma_converter_);
}
/**
*
* Subjective taste or aroma notes for this product.
*
*
* repeated .opencannabis.structs.labtesting.TasteNote aroma = 5;
*/
public int getAromaCount() {
return aroma_.size();
}
/**
*
* Subjective taste or aroma notes for this product.
*
*
* repeated .opencannabis.structs.labtesting.TasteNote aroma = 5;
*/
public io.opencannabis.schema.product.struct.testing.TasteNote getAroma(int index) {
return aroma_converter_.convert(aroma_.get(index));
}
/**
*
* Subjective taste or aroma notes for this product.
*
*
* repeated .opencannabis.structs.labtesting.TasteNote aroma = 5;
*/
public java.util.List
getAromaValueList() {
return aroma_;
}
/**
*
* Subjective taste or aroma notes for this product.
*
*
* repeated .opencannabis.structs.labtesting.TasteNote aroma = 5;
*/
public int getAromaValue(int index) {
return aroma_.get(index);
}
private int aromaMemoizedSerializedSize;
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (description_ != null) {
output.writeMessage(1, getDescription());
}
if (taste_ != null) {
output.writeMessage(2, getTaste());
}
if (potency_ != io.opencannabis.schema.product.struct.testing.PotencyEstimate.LIGHT.getNumber()) {
output.writeEnum(3, potency_);
}
if (getFeelingList().size() > 0) {
output.writeUInt32NoTag(34);
output.writeUInt32NoTag(feelingMemoizedSerializedSize);
}
for (int i = 0; i < feeling_.size(); i++) {
output.writeEnumNoTag(feeling_.get(i));
}
if (getAromaList().size() > 0) {
output.writeUInt32NoTag(42);
output.writeUInt32NoTag(aromaMemoizedSerializedSize);
}
for (int i = 0; i < aroma_.size(); i++) {
output.writeEnumNoTag(aroma_.get(i));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (description_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getDescription());
}
if (taste_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getTaste());
}
if (potency_ != io.opencannabis.schema.product.struct.testing.PotencyEstimate.LIGHT.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(3, potency_);
}
{
int dataSize = 0;
for (int i = 0; i < feeling_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeEnumSizeNoTag(feeling_.get(i));
}
size += dataSize;
if (!getFeelingList().isEmpty()) { size += 1;
size += com.google.protobuf.CodedOutputStream
.computeUInt32SizeNoTag(dataSize);
}feelingMemoizedSerializedSize = dataSize;
}
{
int dataSize = 0;
for (int i = 0; i < aroma_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeEnumSizeNoTag(aroma_.get(i));
}
size += dataSize;
if (!getAromaList().isEmpty()) { size += 1;
size += com.google.protobuf.CodedOutputStream
.computeUInt32SizeNoTag(dataSize);
}aromaMemoizedSerializedSize = dataSize;
}
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.product.struct.testing.Subjective)) {
return super.equals(obj);
}
io.opencannabis.schema.product.struct.testing.Subjective other = (io.opencannabis.schema.product.struct.testing.Subjective) obj;
if (hasDescription() != other.hasDescription()) return false;
if (hasDescription()) {
if (!getDescription()
.equals(other.getDescription())) return false;
}
if (hasTaste() != other.hasTaste()) return false;
if (hasTaste()) {
if (!getTaste()
.equals(other.getTaste())) return false;
}
if (potency_ != other.potency_) return false;
if (!feeling_.equals(other.feeling_)) return false;
if (!aroma_.equals(other.aroma_)) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasDescription()) {
hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
hash = (53 * hash) + getDescription().hashCode();
}
if (hasTaste()) {
hash = (37 * hash) + TASTE_FIELD_NUMBER;
hash = (53 * hash) + getTaste().hashCode();
}
hash = (37 * hash) + POTENCY_FIELD_NUMBER;
hash = (53 * hash) + potency_;
if (getFeelingCount() > 0) {
hash = (37 * hash) + FEELING_FIELD_NUMBER;
hash = (53 * hash) + feeling_.hashCode();
}
if (getAromaCount() > 0) {
hash = (37 * hash) + AROMA_FIELD_NUMBER;
hash = (53 * hash) + aroma_.hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.opencannabis.schema.product.struct.testing.Subjective parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.opencannabis.schema.product.struct.testing.Subjective 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.product.struct.testing.Subjective parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.opencannabis.schema.product.struct.testing.Subjective 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.product.struct.testing.Subjective parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.opencannabis.schema.product.struct.testing.Subjective parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.opencannabis.schema.product.struct.testing.Subjective parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.opencannabis.schema.product.struct.testing.Subjective 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.product.struct.testing.Subjective parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.opencannabis.schema.product.struct.testing.Subjective 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.product.struct.testing.Subjective parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.opencannabis.schema.product.struct.testing.Subjective 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.product.struct.testing.Subjective 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;
}
/**
*
* Specifies the structure of "subjective testing" results, wherein a consumer or user has tried the product and
* evaluated its subjective effects.
*
*
* Protobuf type {@code opencannabis.structs.labtesting.Subjective}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:opencannabis.structs.labtesting.Subjective)
io.opencannabis.schema.product.struct.testing.SubjectiveOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.opencannabis.schema.product.struct.testing.LabTesting.internal_static_opencannabis_structs_labtesting_Subjective_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.opencannabis.schema.product.struct.testing.LabTesting.internal_static_opencannabis_structs_labtesting_Subjective_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.opencannabis.schema.product.struct.testing.Subjective.class, io.opencannabis.schema.product.struct.testing.Subjective.Builder.class);
}
// Construct using io.opencannabis.schema.product.struct.testing.Subjective.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (descriptionBuilder_ == null) {
description_ = null;
} else {
description_ = null;
descriptionBuilder_ = null;
}
if (tasteBuilder_ == null) {
taste_ = null;
} else {
taste_ = null;
tasteBuilder_ = null;
}
potency_ = 0;
feeling_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000008);
aroma_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000010);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.opencannabis.schema.product.struct.testing.LabTesting.internal_static_opencannabis_structs_labtesting_Subjective_descriptor;
}
@java.lang.Override
public io.opencannabis.schema.product.struct.testing.Subjective getDefaultInstanceForType() {
return io.opencannabis.schema.product.struct.testing.Subjective.getDefaultInstance();
}
@java.lang.Override
public io.opencannabis.schema.product.struct.testing.Subjective build() {
io.opencannabis.schema.product.struct.testing.Subjective result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.opencannabis.schema.product.struct.testing.Subjective buildPartial() {
io.opencannabis.schema.product.struct.testing.Subjective result = new io.opencannabis.schema.product.struct.testing.Subjective(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (descriptionBuilder_ == null) {
result.description_ = description_;
} else {
result.description_ = descriptionBuilder_.build();
}
if (tasteBuilder_ == null) {
result.taste_ = taste_;
} else {
result.taste_ = tasteBuilder_.build();
}
result.potency_ = potency_;
if (((bitField0_ & 0x00000008) != 0)) {
feeling_ = java.util.Collections.unmodifiableList(feeling_);
bitField0_ = (bitField0_ & ~0x00000008);
}
result.feeling_ = feeling_;
if (((bitField0_ & 0x00000010) != 0)) {
aroma_ = java.util.Collections.unmodifiableList(aroma_);
bitField0_ = (bitField0_ & ~0x00000010);
}
result.aroma_ = aroma_;
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof io.opencannabis.schema.product.struct.testing.Subjective) {
return mergeFrom((io.opencannabis.schema.product.struct.testing.Subjective)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.opencannabis.schema.product.struct.testing.Subjective other) {
if (other == io.opencannabis.schema.product.struct.testing.Subjective.getDefaultInstance()) return this;
if (other.hasDescription()) {
mergeDescription(other.getDescription());
}
if (other.hasTaste()) {
mergeTaste(other.getTaste());
}
if (other.potency_ != 0) {
setPotencyValue(other.getPotencyValue());
}
if (!other.feeling_.isEmpty()) {
if (feeling_.isEmpty()) {
feeling_ = other.feeling_;
bitField0_ = (bitField0_ & ~0x00000008);
} else {
ensureFeelingIsMutable();
feeling_.addAll(other.feeling_);
}
onChanged();
}
if (!other.aroma_.isEmpty()) {
if (aroma_.isEmpty()) {
aroma_ = other.aroma_;
bitField0_ = (bitField0_ & ~0x00000010);
} else {
ensureAromaIsMutable();
aroma_.addAll(other.aroma_);
}
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
io.opencannabis.schema.product.struct.testing.Subjective parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.opencannabis.schema.product.struct.testing.Subjective) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private io.opencannabis.schema.content.GenericContent.Content description_;
private com.google.protobuf.SingleFieldBuilderV3<
io.opencannabis.schema.content.GenericContent.Content, io.opencannabis.schema.content.GenericContent.Content.Builder, io.opencannabis.schema.content.GenericContent.ContentOrBuilder> descriptionBuilder_;
/**
*
* Subjective description of using this product.
*
*
* .opencannabis.content.Content description = 1;
*/
public boolean hasDescription() {
return descriptionBuilder_ != null || description_ != null;
}
/**
*
* Subjective description of using this product.
*
*
* .opencannabis.content.Content description = 1;
*/
public io.opencannabis.schema.content.GenericContent.Content getDescription() {
if (descriptionBuilder_ == null) {
return description_ == null ? io.opencannabis.schema.content.GenericContent.Content.getDefaultInstance() : description_;
} else {
return descriptionBuilder_.getMessage();
}
}
/**
*
* Subjective description of using this product.
*
*
* .opencannabis.content.Content description = 1;
*/
public Builder setDescription(io.opencannabis.schema.content.GenericContent.Content value) {
if (descriptionBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
description_ = value;
onChanged();
} else {
descriptionBuilder_.setMessage(value);
}
return this;
}
/**
*
* Subjective description of using this product.
*
*
* .opencannabis.content.Content description = 1;
*/
public Builder setDescription(
io.opencannabis.schema.content.GenericContent.Content.Builder builderForValue) {
if (descriptionBuilder_ == null) {
description_ = builderForValue.build();
onChanged();
} else {
descriptionBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Subjective description of using this product.
*
*
* .opencannabis.content.Content description = 1;
*/
public Builder mergeDescription(io.opencannabis.schema.content.GenericContent.Content value) {
if (descriptionBuilder_ == null) {
if (description_ != null) {
description_ =
io.opencannabis.schema.content.GenericContent.Content.newBuilder(description_).mergeFrom(value).buildPartial();
} else {
description_ = value;
}
onChanged();
} else {
descriptionBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Subjective description of using this product.
*
*
* .opencannabis.content.Content description = 1;
*/
public Builder clearDescription() {
if (descriptionBuilder_ == null) {
description_ = null;
onChanged();
} else {
description_ = null;
descriptionBuilder_ = null;
}
return this;
}
/**
*
* Subjective description of using this product.
*
*
* .opencannabis.content.Content description = 1;
*/
public io.opencannabis.schema.content.GenericContent.Content.Builder getDescriptionBuilder() {
onChanged();
return getDescriptionFieldBuilder().getBuilder();
}
/**
*
* Subjective description of using this product.
*
*
* .opencannabis.content.Content description = 1;
*/
public io.opencannabis.schema.content.GenericContent.ContentOrBuilder getDescriptionOrBuilder() {
if (descriptionBuilder_ != null) {
return descriptionBuilder_.getMessageOrBuilder();
} else {
return description_ == null ?
io.opencannabis.schema.content.GenericContent.Content.getDefaultInstance() : description_;
}
}
/**
*
* Subjective description of using this product.
*
*
* .opencannabis.content.Content description = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.opencannabis.schema.content.GenericContent.Content, io.opencannabis.schema.content.GenericContent.Content.Builder, io.opencannabis.schema.content.GenericContent.ContentOrBuilder>
getDescriptionFieldBuilder() {
if (descriptionBuilder_ == null) {
descriptionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.opencannabis.schema.content.GenericContent.Content, io.opencannabis.schema.content.GenericContent.Content.Builder, io.opencannabis.schema.content.GenericContent.ContentOrBuilder>(
getDescription(),
getParentForChildren(),
isClean());
description_ = null;
}
return descriptionBuilder_;
}
private io.opencannabis.schema.content.GenericContent.Content taste_;
private com.google.protobuf.SingleFieldBuilderV3<
io.opencannabis.schema.content.GenericContent.Content, io.opencannabis.schema.content.GenericContent.Content.Builder, io.opencannabis.schema.content.GenericContent.ContentOrBuilder> tasteBuilder_;
/**
*
* Subjective description of the taste of this product.
*
*
* .opencannabis.content.Content taste = 2;
*/
public boolean hasTaste() {
return tasteBuilder_ != null || taste_ != null;
}
/**
*
* Subjective description of the taste of this product.
*
*
* .opencannabis.content.Content taste = 2;
*/
public io.opencannabis.schema.content.GenericContent.Content getTaste() {
if (tasteBuilder_ == null) {
return taste_ == null ? io.opencannabis.schema.content.GenericContent.Content.getDefaultInstance() : taste_;
} else {
return tasteBuilder_.getMessage();
}
}
/**
*
* Subjective description of the taste of this product.
*
*
* .opencannabis.content.Content taste = 2;
*/
public Builder setTaste(io.opencannabis.schema.content.GenericContent.Content value) {
if (tasteBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
taste_ = value;
onChanged();
} else {
tasteBuilder_.setMessage(value);
}
return this;
}
/**
*
* Subjective description of the taste of this product.
*
*
* .opencannabis.content.Content taste = 2;
*/
public Builder setTaste(
io.opencannabis.schema.content.GenericContent.Content.Builder builderForValue) {
if (tasteBuilder_ == null) {
taste_ = builderForValue.build();
onChanged();
} else {
tasteBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Subjective description of the taste of this product.
*
*
* .opencannabis.content.Content taste = 2;
*/
public Builder mergeTaste(io.opencannabis.schema.content.GenericContent.Content value) {
if (tasteBuilder_ == null) {
if (taste_ != null) {
taste_ =
io.opencannabis.schema.content.GenericContent.Content.newBuilder(taste_).mergeFrom(value).buildPartial();
} else {
taste_ = value;
}
onChanged();
} else {
tasteBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Subjective description of the taste of this product.
*
*
* .opencannabis.content.Content taste = 2;
*/
public Builder clearTaste() {
if (tasteBuilder_ == null) {
taste_ = null;
onChanged();
} else {
taste_ = null;
tasteBuilder_ = null;
}
return this;
}
/**
*
* Subjective description of the taste of this product.
*
*
* .opencannabis.content.Content taste = 2;
*/
public io.opencannabis.schema.content.GenericContent.Content.Builder getTasteBuilder() {
onChanged();
return getTasteFieldBuilder().getBuilder();
}
/**
*
* Subjective description of the taste of this product.
*
*
* .opencannabis.content.Content taste = 2;
*/
public io.opencannabis.schema.content.GenericContent.ContentOrBuilder getTasteOrBuilder() {
if (tasteBuilder_ != null) {
return tasteBuilder_.getMessageOrBuilder();
} else {
return taste_ == null ?
io.opencannabis.schema.content.GenericContent.Content.getDefaultInstance() : taste_;
}
}
/**
*
* Subjective description of the taste of this product.
*
*
* .opencannabis.content.Content taste = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.opencannabis.schema.content.GenericContent.Content, io.opencannabis.schema.content.GenericContent.Content.Builder, io.opencannabis.schema.content.GenericContent.ContentOrBuilder>
getTasteFieldBuilder() {
if (tasteBuilder_ == null) {
tasteBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.opencannabis.schema.content.GenericContent.Content, io.opencannabis.schema.content.GenericContent.Content.Builder, io.opencannabis.schema.content.GenericContent.ContentOrBuilder>(
getTaste(),
getParentForChildren(),
isClean());
taste_ = null;
}
return tasteBuilder_;
}
private int potency_ = 0;
/**
*
* Subjective potency estimate for this product.
*
*
* .opencannabis.structs.labtesting.PotencyEstimate potency = 3;
*/
public int getPotencyValue() {
return potency_;
}
/**
*
* Subjective potency estimate for this product.
*
*
* .opencannabis.structs.labtesting.PotencyEstimate potency = 3;
*/
public Builder setPotencyValue(int value) {
potency_ = value;
onChanged();
return this;
}
/**
*
* Subjective potency estimate for this product.
*
*
* .opencannabis.structs.labtesting.PotencyEstimate potency = 3;
*/
public io.opencannabis.schema.product.struct.testing.PotencyEstimate getPotency() {
@SuppressWarnings("deprecation")
io.opencannabis.schema.product.struct.testing.PotencyEstimate result = io.opencannabis.schema.product.struct.testing.PotencyEstimate.valueOf(potency_);
return result == null ? io.opencannabis.schema.product.struct.testing.PotencyEstimate.UNRECOGNIZED : result;
}
/**
*
* Subjective potency estimate for this product.
*
*
* .opencannabis.structs.labtesting.PotencyEstimate potency = 3;
*/
public Builder setPotency(io.opencannabis.schema.product.struct.testing.PotencyEstimate value) {
if (value == null) {
throw new NullPointerException();
}
potency_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Subjective potency estimate for this product.
*
*
* .opencannabis.structs.labtesting.PotencyEstimate potency = 3;
*/
public Builder clearPotency() {
potency_ = 0;
onChanged();
return this;
}
private java.util.List feeling_ =
java.util.Collections.emptyList();
private void ensureFeelingIsMutable() {
if (!((bitField0_ & 0x00000008) != 0)) {
feeling_ = new java.util.ArrayList(feeling_);
bitField0_ |= 0x00000008;
}
}
/**
*
* Subjective feeling tags for this product.
*
*
* repeated .opencannabis.structs.labtesting.Feeling feeling = 4;
*/
public java.util.List getFeelingList() {
return new com.google.protobuf.Internal.ListAdapter<
java.lang.Integer, io.opencannabis.schema.product.struct.testing.Feeling>(feeling_, feeling_converter_);
}
/**
*
* Subjective feeling tags for this product.
*
*
* repeated .opencannabis.structs.labtesting.Feeling feeling = 4;
*/
public int getFeelingCount() {
return feeling_.size();
}
/**
*
* Subjective feeling tags for this product.
*
*
* repeated .opencannabis.structs.labtesting.Feeling feeling = 4;
*/
public io.opencannabis.schema.product.struct.testing.Feeling getFeeling(int index) {
return feeling_converter_.convert(feeling_.get(index));
}
/**
*
* Subjective feeling tags for this product.
*
*
* repeated .opencannabis.structs.labtesting.Feeling feeling = 4;
*/
public Builder setFeeling(
int index, io.opencannabis.schema.product.struct.testing.Feeling value) {
if (value == null) {
throw new NullPointerException();
}
ensureFeelingIsMutable();
feeling_.set(index, value.getNumber());
onChanged();
return this;
}
/**
*
* Subjective feeling tags for this product.
*
*
* repeated .opencannabis.structs.labtesting.Feeling feeling = 4;
*/
public Builder addFeeling(io.opencannabis.schema.product.struct.testing.Feeling value) {
if (value == null) {
throw new NullPointerException();
}
ensureFeelingIsMutable();
feeling_.add(value.getNumber());
onChanged();
return this;
}
/**
*
* Subjective feeling tags for this product.
*
*
* repeated .opencannabis.structs.labtesting.Feeling feeling = 4;
*/
public Builder addAllFeeling(
java.lang.Iterable extends io.opencannabis.schema.product.struct.testing.Feeling> values) {
ensureFeelingIsMutable();
for (io.opencannabis.schema.product.struct.testing.Feeling value : values) {
feeling_.add(value.getNumber());
}
onChanged();
return this;
}
/**
*
* Subjective feeling tags for this product.
*
*
* repeated .opencannabis.structs.labtesting.Feeling feeling = 4;
*/
public Builder clearFeeling() {
feeling_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
return this;
}
/**
*
* Subjective feeling tags for this product.
*
*
* repeated .opencannabis.structs.labtesting.Feeling feeling = 4;
*/
public java.util.List
getFeelingValueList() {
return java.util.Collections.unmodifiableList(feeling_);
}
/**
*
* Subjective feeling tags for this product.
*
*
* repeated .opencannabis.structs.labtesting.Feeling feeling = 4;
*/
public int getFeelingValue(int index) {
return feeling_.get(index);
}
/**
*
* Subjective feeling tags for this product.
*
*
* repeated .opencannabis.structs.labtesting.Feeling feeling = 4;
*/
public Builder setFeelingValue(
int index, int value) {
ensureFeelingIsMutable();
feeling_.set(index, value);
onChanged();
return this;
}
/**
*
* Subjective feeling tags for this product.
*
*
* repeated .opencannabis.structs.labtesting.Feeling feeling = 4;
*/
public Builder addFeelingValue(int value) {
ensureFeelingIsMutable();
feeling_.add(value);
onChanged();
return this;
}
/**
*
* Subjective feeling tags for this product.
*
*
* repeated .opencannabis.structs.labtesting.Feeling feeling = 4;
*/
public Builder addAllFeelingValue(
java.lang.Iterable values) {
ensureFeelingIsMutable();
for (int value : values) {
feeling_.add(value);
}
onChanged();
return this;
}
private java.util.List aroma_ =
java.util.Collections.emptyList();
private void ensureAromaIsMutable() {
if (!((bitField0_ & 0x00000010) != 0)) {
aroma_ = new java.util.ArrayList(aroma_);
bitField0_ |= 0x00000010;
}
}
/**
*
* Subjective taste or aroma notes for this product.
*
*
* repeated .opencannabis.structs.labtesting.TasteNote aroma = 5;
*/
public java.util.List getAromaList() {
return new com.google.protobuf.Internal.ListAdapter<
java.lang.Integer, io.opencannabis.schema.product.struct.testing.TasteNote>(aroma_, aroma_converter_);
}
/**
*
* Subjective taste or aroma notes for this product.
*
*
* repeated .opencannabis.structs.labtesting.TasteNote aroma = 5;
*/
public int getAromaCount() {
return aroma_.size();
}
/**
*
* Subjective taste or aroma notes for this product.
*
*
* repeated .opencannabis.structs.labtesting.TasteNote aroma = 5;
*/
public io.opencannabis.schema.product.struct.testing.TasteNote getAroma(int index) {
return aroma_converter_.convert(aroma_.get(index));
}
/**
*
* Subjective taste or aroma notes for this product.
*
*
* repeated .opencannabis.structs.labtesting.TasteNote aroma = 5;
*/
public Builder setAroma(
int index, io.opencannabis.schema.product.struct.testing.TasteNote value) {
if (value == null) {
throw new NullPointerException();
}
ensureAromaIsMutable();
aroma_.set(index, value.getNumber());
onChanged();
return this;
}
/**
*
* Subjective taste or aroma notes for this product.
*
*
* repeated .opencannabis.structs.labtesting.TasteNote aroma = 5;
*/
public Builder addAroma(io.opencannabis.schema.product.struct.testing.TasteNote value) {
if (value == null) {
throw new NullPointerException();
}
ensureAromaIsMutable();
aroma_.add(value.getNumber());
onChanged();
return this;
}
/**
*
* Subjective taste or aroma notes for this product.
*
*
* repeated .opencannabis.structs.labtesting.TasteNote aroma = 5;
*/
public Builder addAllAroma(
java.lang.Iterable extends io.opencannabis.schema.product.struct.testing.TasteNote> values) {
ensureAromaIsMutable();
for (io.opencannabis.schema.product.struct.testing.TasteNote value : values) {
aroma_.add(value.getNumber());
}
onChanged();
return this;
}
/**
*
* Subjective taste or aroma notes for this product.
*
*
* repeated .opencannabis.structs.labtesting.TasteNote aroma = 5;
*/
public Builder clearAroma() {
aroma_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000010);
onChanged();
return this;
}
/**
*
* Subjective taste or aroma notes for this product.
*
*
* repeated .opencannabis.structs.labtesting.TasteNote aroma = 5;
*/
public java.util.List
getAromaValueList() {
return java.util.Collections.unmodifiableList(aroma_);
}
/**
*
* Subjective taste or aroma notes for this product.
*
*
* repeated .opencannabis.structs.labtesting.TasteNote aroma = 5;
*/
public int getAromaValue(int index) {
return aroma_.get(index);
}
/**
*
* Subjective taste or aroma notes for this product.
*
*
* repeated .opencannabis.structs.labtesting.TasteNote aroma = 5;
*/
public Builder setAromaValue(
int index, int value) {
ensureAromaIsMutable();
aroma_.set(index, value);
onChanged();
return this;
}
/**
*
* Subjective taste or aroma notes for this product.
*
*
* repeated .opencannabis.structs.labtesting.TasteNote aroma = 5;
*/
public Builder addAromaValue(int value) {
ensureAromaIsMutable();
aroma_.add(value);
onChanged();
return this;
}
/**
*
* Subjective taste or aroma notes for this product.
*
*
* repeated .opencannabis.structs.labtesting.TasteNote aroma = 5;
*/
public Builder addAllAromaValue(
java.lang.Iterable values) {
ensureAromaIsMutable();
for (int value : values) {
aroma_.add(value);
}
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:opencannabis.structs.labtesting.Subjective)
}
// @@protoc_insertion_point(class_scope:opencannabis.structs.labtesting.Subjective)
private static final io.opencannabis.schema.product.struct.testing.Subjective DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.opencannabis.schema.product.struct.testing.Subjective();
}
public static io.opencannabis.schema.product.struct.testing.Subjective getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Subjective parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Subjective(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.product.struct.testing.Subjective getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy