io.opencannabis.schema.product.struct.testing.Terpenes 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 terpene testing. Includes space for a full set of terpene test result values, and
* corresponding values (computed) for estimated feelings and tasting notes.
*
*
* Protobuf type {@code opencannabis.structs.labtesting.Terpenes}
*/
public final class Terpenes extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:opencannabis.structs.labtesting.Terpenes)
TerpenesOrBuilder {
private static final long serialVersionUID = 0L;
// Use Terpenes.newBuilder() to construct.
private Terpenes(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Terpenes() {
terpene_ = java.util.Collections.emptyList();
feeling_ = java.util.Collections.emptyList();
aroma_ = java.util.Collections.emptyList();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Terpenes(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
available_ = input.readBool();
break;
}
case 16: {
int rawValue = input.readEnum();
if (!((mutable_bitField0_ & 0x00000004) != 0)) {
feeling_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000004;
}
feeling_.add(rawValue);
break;
}
case 18: {
int length = input.readRawVarint32();
int oldLimit = input.pushLimit(length);
while(input.getBytesUntilLimit() > 0) {
int rawValue = input.readEnum();
if (!((mutable_bitField0_ & 0x00000004) != 0)) {
feeling_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000004;
}
feeling_.add(rawValue);
}
input.popLimit(oldLimit);
break;
}
case 24: {
int rawValue = input.readEnum();
if (!((mutable_bitField0_ & 0x00000008) != 0)) {
aroma_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000008;
}
aroma_.add(rawValue);
break;
}
case 26: {
int length = input.readRawVarint32();
int oldLimit = input.pushLimit(length);
while(input.getBytesUntilLimit() > 0) {
int rawValue = input.readEnum();
if (!((mutable_bitField0_ & 0x00000008) != 0)) {
aroma_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000008;
}
aroma_.add(rawValue);
}
input.popLimit(oldLimit);
break;
}
case 82: {
if (!((mutable_bitField0_ & 0x00000002) != 0)) {
terpene_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000002;
}
terpene_.add(
input.readMessage(io.opencannabis.schema.product.struct.testing.Terpenes.Result.parser(), extensionRegistry));
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000004) != 0)) {
feeling_ = java.util.Collections.unmodifiableList(feeling_);
}
if (((mutable_bitField0_ & 0x00000008) != 0)) {
aroma_ = java.util.Collections.unmodifiableList(aroma_);
}
if (((mutable_bitField0_ & 0x00000002) != 0)) {
terpene_ = java.util.Collections.unmodifiableList(terpene_);
}
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_Terpenes_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.opencannabis.schema.product.struct.testing.LabTesting.internal_static_opencannabis_structs_labtesting_Terpenes_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.opencannabis.schema.product.struct.testing.Terpenes.class, io.opencannabis.schema.product.struct.testing.Terpenes.Builder.class);
}
public interface ResultOrBuilder extends
// @@protoc_insertion_point(interface_extends:opencannabis.structs.labtesting.Terpenes.Result)
com.google.protobuf.MessageOrBuilder {
/**
*
* Terpene this test result is for.
*
*
* .opencannabis.structs.labtesting.Terpene terpene = 1;
*/
int getTerpeneValue();
/**
*
* Terpene this test result is for.
*
*
* .opencannabis.structs.labtesting.Terpene terpene = 1;
*/
io.opencannabis.schema.product.struct.testing.Terpene getTerpene();
/**
*
* Measured value of the terpene in question for the subject product.
*
*
* .opencannabis.structs.labtesting.TestValue measurement = 2;
*/
boolean hasMeasurement();
/**
*
* Measured value of the terpene in question for the subject product.
*
*
* .opencannabis.structs.labtesting.TestValue measurement = 2;
*/
io.opencannabis.schema.product.struct.testing.TestValue getMeasurement();
/**
*
* Measured value of the terpene in question for the subject product.
*
*
* .opencannabis.structs.labtesting.TestValue measurement = 2;
*/
io.opencannabis.schema.product.struct.testing.TestValueOrBuilder getMeasurementOrBuilder();
}
/**
*
* Specifies the structure of an individual terpene testing result.
*
*
* Protobuf type {@code opencannabis.structs.labtesting.Terpenes.Result}
*/
public static final class Result extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:opencannabis.structs.labtesting.Terpenes.Result)
ResultOrBuilder {
private static final long serialVersionUID = 0L;
// Use Result.newBuilder() to construct.
private Result(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Result() {
terpene_ = 0;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Result(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
int rawValue = input.readEnum();
terpene_ = rawValue;
break;
}
case 18: {
io.opencannabis.schema.product.struct.testing.TestValue.Builder subBuilder = null;
if (measurement_ != null) {
subBuilder = measurement_.toBuilder();
}
measurement_ = input.readMessage(io.opencannabis.schema.product.struct.testing.TestValue.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(measurement_);
measurement_ = subBuilder.buildPartial();
}
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
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_Terpenes_Result_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.opencannabis.schema.product.struct.testing.LabTesting.internal_static_opencannabis_structs_labtesting_Terpenes_Result_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.opencannabis.schema.product.struct.testing.Terpenes.Result.class, io.opencannabis.schema.product.struct.testing.Terpenes.Result.Builder.class);
}
public static final int TERPENE_FIELD_NUMBER = 1;
private int terpene_;
/**
*
* Terpene this test result is for.
*
*
* .opencannabis.structs.labtesting.Terpene terpene = 1;
*/
public int getTerpeneValue() {
return terpene_;
}
/**
*
* Terpene this test result is for.
*
*
* .opencannabis.structs.labtesting.Terpene terpene = 1;
*/
public io.opencannabis.schema.product.struct.testing.Terpene getTerpene() {
@SuppressWarnings("deprecation")
io.opencannabis.schema.product.struct.testing.Terpene result = io.opencannabis.schema.product.struct.testing.Terpene.valueOf(terpene_);
return result == null ? io.opencannabis.schema.product.struct.testing.Terpene.UNRECOGNIZED : result;
}
public static final int MEASUREMENT_FIELD_NUMBER = 2;
private io.opencannabis.schema.product.struct.testing.TestValue measurement_;
/**
*
* Measured value of the terpene in question for the subject product.
*
*
* .opencannabis.structs.labtesting.TestValue measurement = 2;
*/
public boolean hasMeasurement() {
return measurement_ != null;
}
/**
*
* Measured value of the terpene in question for the subject product.
*
*
* .opencannabis.structs.labtesting.TestValue measurement = 2;
*/
public io.opencannabis.schema.product.struct.testing.TestValue getMeasurement() {
return measurement_ == null ? io.opencannabis.schema.product.struct.testing.TestValue.getDefaultInstance() : measurement_;
}
/**
*
* Measured value of the terpene in question for the subject product.
*
*
* .opencannabis.structs.labtesting.TestValue measurement = 2;
*/
public io.opencannabis.schema.product.struct.testing.TestValueOrBuilder getMeasurementOrBuilder() {
return getMeasurement();
}
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 (terpene_ != io.opencannabis.schema.product.struct.testing.Terpene.CAMPHENE.getNumber()) {
output.writeEnum(1, terpene_);
}
if (measurement_ != null) {
output.writeMessage(2, getMeasurement());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (terpene_ != io.opencannabis.schema.product.struct.testing.Terpene.CAMPHENE.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(1, terpene_);
}
if (measurement_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getMeasurement());
}
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.Terpenes.Result)) {
return super.equals(obj);
}
io.opencannabis.schema.product.struct.testing.Terpenes.Result other = (io.opencannabis.schema.product.struct.testing.Terpenes.Result) obj;
if (terpene_ != other.terpene_) return false;
if (hasMeasurement() != other.hasMeasurement()) return false;
if (hasMeasurement()) {
if (!getMeasurement()
.equals(other.getMeasurement())) return false;
}
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + TERPENE_FIELD_NUMBER;
hash = (53 * hash) + terpene_;
if (hasMeasurement()) {
hash = (37 * hash) + MEASUREMENT_FIELD_NUMBER;
hash = (53 * hash) + getMeasurement().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.opencannabis.schema.product.struct.testing.Terpenes.Result parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.opencannabis.schema.product.struct.testing.Terpenes.Result 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.Terpenes.Result parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.opencannabis.schema.product.struct.testing.Terpenes.Result 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.Terpenes.Result parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.opencannabis.schema.product.struct.testing.Terpenes.Result 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.Terpenes.Result 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.Terpenes.Result 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.Terpenes.Result 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.Terpenes.Result 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.Terpenes.Result 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.Terpenes.Result 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.Terpenes.Result 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 an individual terpene testing result.
*
*
* Protobuf type {@code opencannabis.structs.labtesting.Terpenes.Result}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:opencannabis.structs.labtesting.Terpenes.Result)
io.opencannabis.schema.product.struct.testing.Terpenes.ResultOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.opencannabis.schema.product.struct.testing.LabTesting.internal_static_opencannabis_structs_labtesting_Terpenes_Result_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.opencannabis.schema.product.struct.testing.LabTesting.internal_static_opencannabis_structs_labtesting_Terpenes_Result_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.opencannabis.schema.product.struct.testing.Terpenes.Result.class, io.opencannabis.schema.product.struct.testing.Terpenes.Result.Builder.class);
}
// Construct using io.opencannabis.schema.product.struct.testing.Terpenes.Result.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();
terpene_ = 0;
if (measurementBuilder_ == null) {
measurement_ = null;
} else {
measurement_ = null;
measurementBuilder_ = null;
}
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_Terpenes_Result_descriptor;
}
@java.lang.Override
public io.opencannabis.schema.product.struct.testing.Terpenes.Result getDefaultInstanceForType() {
return io.opencannabis.schema.product.struct.testing.Terpenes.Result.getDefaultInstance();
}
@java.lang.Override
public io.opencannabis.schema.product.struct.testing.Terpenes.Result build() {
io.opencannabis.schema.product.struct.testing.Terpenes.Result result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.opencannabis.schema.product.struct.testing.Terpenes.Result buildPartial() {
io.opencannabis.schema.product.struct.testing.Terpenes.Result result = new io.opencannabis.schema.product.struct.testing.Terpenes.Result(this);
result.terpene_ = terpene_;
if (measurementBuilder_ == null) {
result.measurement_ = measurement_;
} else {
result.measurement_ = measurementBuilder_.build();
}
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof io.opencannabis.schema.product.struct.testing.Terpenes.Result) {
return mergeFrom((io.opencannabis.schema.product.struct.testing.Terpenes.Result)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.opencannabis.schema.product.struct.testing.Terpenes.Result other) {
if (other == io.opencannabis.schema.product.struct.testing.Terpenes.Result.getDefaultInstance()) return this;
if (other.terpene_ != 0) {
setTerpeneValue(other.getTerpeneValue());
}
if (other.hasMeasurement()) {
mergeMeasurement(other.getMeasurement());
}
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.Terpenes.Result parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.opencannabis.schema.product.struct.testing.Terpenes.Result) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int terpene_ = 0;
/**
*
* Terpene this test result is for.
*
*
* .opencannabis.structs.labtesting.Terpene terpene = 1;
*/
public int getTerpeneValue() {
return terpene_;
}
/**
*
* Terpene this test result is for.
*
*
* .opencannabis.structs.labtesting.Terpene terpene = 1;
*/
public Builder setTerpeneValue(int value) {
terpene_ = value;
onChanged();
return this;
}
/**
*
* Terpene this test result is for.
*
*
* .opencannabis.structs.labtesting.Terpene terpene = 1;
*/
public io.opencannabis.schema.product.struct.testing.Terpene getTerpene() {
@SuppressWarnings("deprecation")
io.opencannabis.schema.product.struct.testing.Terpene result = io.opencannabis.schema.product.struct.testing.Terpene.valueOf(terpene_);
return result == null ? io.opencannabis.schema.product.struct.testing.Terpene.UNRECOGNIZED : result;
}
/**
*
* Terpene this test result is for.
*
*
* .opencannabis.structs.labtesting.Terpene terpene = 1;
*/
public Builder setTerpene(io.opencannabis.schema.product.struct.testing.Terpene value) {
if (value == null) {
throw new NullPointerException();
}
terpene_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Terpene this test result is for.
*
*
* .opencannabis.structs.labtesting.Terpene terpene = 1;
*/
public Builder clearTerpene() {
terpene_ = 0;
onChanged();
return this;
}
private io.opencannabis.schema.product.struct.testing.TestValue measurement_;
private com.google.protobuf.SingleFieldBuilderV3<
io.opencannabis.schema.product.struct.testing.TestValue, io.opencannabis.schema.product.struct.testing.TestValue.Builder, io.opencannabis.schema.product.struct.testing.TestValueOrBuilder> measurementBuilder_;
/**
*
* Measured value of the terpene in question for the subject product.
*
*
* .opencannabis.structs.labtesting.TestValue measurement = 2;
*/
public boolean hasMeasurement() {
return measurementBuilder_ != null || measurement_ != null;
}
/**
*
* Measured value of the terpene in question for the subject product.
*
*
* .opencannabis.structs.labtesting.TestValue measurement = 2;
*/
public io.opencannabis.schema.product.struct.testing.TestValue getMeasurement() {
if (measurementBuilder_ == null) {
return measurement_ == null ? io.opencannabis.schema.product.struct.testing.TestValue.getDefaultInstance() : measurement_;
} else {
return measurementBuilder_.getMessage();
}
}
/**
*
* Measured value of the terpene in question for the subject product.
*
*
* .opencannabis.structs.labtesting.TestValue measurement = 2;
*/
public Builder setMeasurement(io.opencannabis.schema.product.struct.testing.TestValue value) {
if (measurementBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
measurement_ = value;
onChanged();
} else {
measurementBuilder_.setMessage(value);
}
return this;
}
/**
*
* Measured value of the terpene in question for the subject product.
*
*
* .opencannabis.structs.labtesting.TestValue measurement = 2;
*/
public Builder setMeasurement(
io.opencannabis.schema.product.struct.testing.TestValue.Builder builderForValue) {
if (measurementBuilder_ == null) {
measurement_ = builderForValue.build();
onChanged();
} else {
measurementBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Measured value of the terpene in question for the subject product.
*
*
* .opencannabis.structs.labtesting.TestValue measurement = 2;
*/
public Builder mergeMeasurement(io.opencannabis.schema.product.struct.testing.TestValue value) {
if (measurementBuilder_ == null) {
if (measurement_ != null) {
measurement_ =
io.opencannabis.schema.product.struct.testing.TestValue.newBuilder(measurement_).mergeFrom(value).buildPartial();
} else {
measurement_ = value;
}
onChanged();
} else {
measurementBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Measured value of the terpene in question for the subject product.
*
*
* .opencannabis.structs.labtesting.TestValue measurement = 2;
*/
public Builder clearMeasurement() {
if (measurementBuilder_ == null) {
measurement_ = null;
onChanged();
} else {
measurement_ = null;
measurementBuilder_ = null;
}
return this;
}
/**
*
* Measured value of the terpene in question for the subject product.
*
*
* .opencannabis.structs.labtesting.TestValue measurement = 2;
*/
public io.opencannabis.schema.product.struct.testing.TestValue.Builder getMeasurementBuilder() {
onChanged();
return getMeasurementFieldBuilder().getBuilder();
}
/**
*
* Measured value of the terpene in question for the subject product.
*
*
* .opencannabis.structs.labtesting.TestValue measurement = 2;
*/
public io.opencannabis.schema.product.struct.testing.TestValueOrBuilder getMeasurementOrBuilder() {
if (measurementBuilder_ != null) {
return measurementBuilder_.getMessageOrBuilder();
} else {
return measurement_ == null ?
io.opencannabis.schema.product.struct.testing.TestValue.getDefaultInstance() : measurement_;
}
}
/**
*
* Measured value of the terpene in question for the subject product.
*
*
* .opencannabis.structs.labtesting.TestValue measurement = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.opencannabis.schema.product.struct.testing.TestValue, io.opencannabis.schema.product.struct.testing.TestValue.Builder, io.opencannabis.schema.product.struct.testing.TestValueOrBuilder>
getMeasurementFieldBuilder() {
if (measurementBuilder_ == null) {
measurementBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.opencannabis.schema.product.struct.testing.TestValue, io.opencannabis.schema.product.struct.testing.TestValue.Builder, io.opencannabis.schema.product.struct.testing.TestValueOrBuilder>(
getMeasurement(),
getParentForChildren(),
isClean());
measurement_ = null;
}
return measurementBuilder_;
}
@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.Terpenes.Result)
}
// @@protoc_insertion_point(class_scope:opencannabis.structs.labtesting.Terpenes.Result)
private static final io.opencannabis.schema.product.struct.testing.Terpenes.Result DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.opencannabis.schema.product.struct.testing.Terpenes.Result();
}
public static io.opencannabis.schema.product.struct.testing.Terpenes.Result getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Result parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Result(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.Terpenes.Result getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int bitField0_;
public static final int AVAILABLE_FIELD_NUMBER = 1;
private boolean available_;
/**
*
* Flag indicating whether terpene testing is available yet or not.
*
*
* bool available = 1;
*/
public boolean getAvailable() {
return available_;
}
public static final int TERPENE_FIELD_NUMBER = 10;
private java.util.List terpene_;
/**
*
* Individual terpene testing results.
*
*
* repeated .opencannabis.structs.labtesting.Terpenes.Result terpene = 10;
*/
public java.util.List getTerpeneList() {
return terpene_;
}
/**
*
* Individual terpene testing results.
*
*
* repeated .opencannabis.structs.labtesting.Terpenes.Result terpene = 10;
*/
public java.util.List extends io.opencannabis.schema.product.struct.testing.Terpenes.ResultOrBuilder>
getTerpeneOrBuilderList() {
return terpene_;
}
/**
*
* Individual terpene testing results.
*
*
* repeated .opencannabis.structs.labtesting.Terpenes.Result terpene = 10;
*/
public int getTerpeneCount() {
return terpene_.size();
}
/**
*
* Individual terpene testing results.
*
*
* repeated .opencannabis.structs.labtesting.Terpenes.Result terpene = 10;
*/
public io.opencannabis.schema.product.struct.testing.Terpenes.Result getTerpene(int index) {
return terpene_.get(index);
}
/**
*
* Individual terpene testing results.
*
*
* repeated .opencannabis.structs.labtesting.Terpenes.Result terpene = 10;
*/
public io.opencannabis.schema.product.struct.testing.Terpenes.ResultOrBuilder getTerpeneOrBuilder(
int index) {
return terpene_.get(index);
}
public static final int FEELING_FIELD_NUMBER = 2;
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;
}
};
/**
*
* Enumerates computed feeling notes, based on the specified terpene results.
*
*
* repeated .opencannabis.structs.labtesting.Feeling feeling = 2;
*/
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_);
}
/**
*
* Enumerates computed feeling notes, based on the specified terpene results.
*
*
* repeated .opencannabis.structs.labtesting.Feeling feeling = 2;
*/
public int getFeelingCount() {
return feeling_.size();
}
/**
*
* Enumerates computed feeling notes, based on the specified terpene results.
*
*
* repeated .opencannabis.structs.labtesting.Feeling feeling = 2;
*/
public io.opencannabis.schema.product.struct.testing.Feeling getFeeling(int index) {
return feeling_converter_.convert(feeling_.get(index));
}
/**
*
* Enumerates computed feeling notes, based on the specified terpene results.
*
*
* repeated .opencannabis.structs.labtesting.Feeling feeling = 2;
*/
public java.util.List
getFeelingValueList() {
return feeling_;
}
/**
*
* Enumerates computed feeling notes, based on the specified terpene results.
*
*
* repeated .opencannabis.structs.labtesting.Feeling feeling = 2;
*/
public int getFeelingValue(int index) {
return feeling_.get(index);
}
private int feelingMemoizedSerializedSize;
public static final int AROMA_FIELD_NUMBER = 3;
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;
}
};
/**
*
* Enumerates computed aroma/flavor notes.
*
*
* repeated .opencannabis.structs.labtesting.TasteNote aroma = 3;
*/
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_);
}
/**
*
* Enumerates computed aroma/flavor notes.
*
*
* repeated .opencannabis.structs.labtesting.TasteNote aroma = 3;
*/
public int getAromaCount() {
return aroma_.size();
}
/**
*
* Enumerates computed aroma/flavor notes.
*
*
* repeated .opencannabis.structs.labtesting.TasteNote aroma = 3;
*/
public io.opencannabis.schema.product.struct.testing.TasteNote getAroma(int index) {
return aroma_converter_.convert(aroma_.get(index));
}
/**
*
* Enumerates computed aroma/flavor notes.
*
*
* repeated .opencannabis.structs.labtesting.TasteNote aroma = 3;
*/
public java.util.List
getAromaValueList() {
return aroma_;
}
/**
*
* Enumerates computed aroma/flavor notes.
*
*
* repeated .opencannabis.structs.labtesting.TasteNote aroma = 3;
*/
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 (available_ != false) {
output.writeBool(1, available_);
}
if (getFeelingList().size() > 0) {
output.writeUInt32NoTag(18);
output.writeUInt32NoTag(feelingMemoizedSerializedSize);
}
for (int i = 0; i < feeling_.size(); i++) {
output.writeEnumNoTag(feeling_.get(i));
}
if (getAromaList().size() > 0) {
output.writeUInt32NoTag(26);
output.writeUInt32NoTag(aromaMemoizedSerializedSize);
}
for (int i = 0; i < aroma_.size(); i++) {
output.writeEnumNoTag(aroma_.get(i));
}
for (int i = 0; i < terpene_.size(); i++) {
output.writeMessage(10, terpene_.get(i));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (available_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(1, available_);
}
{
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;
}
for (int i = 0; i < terpene_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(10, terpene_.get(i));
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof io.opencannabis.schema.product.struct.testing.Terpenes)) {
return super.equals(obj);
}
io.opencannabis.schema.product.struct.testing.Terpenes other = (io.opencannabis.schema.product.struct.testing.Terpenes) obj;
if (getAvailable()
!= other.getAvailable()) return false;
if (!getTerpeneList()
.equals(other.getTerpeneList())) 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();
hash = (37 * hash) + AVAILABLE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getAvailable());
if (getTerpeneCount() > 0) {
hash = (37 * hash) + TERPENE_FIELD_NUMBER;
hash = (53 * hash) + getTerpeneList().hashCode();
}
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.Terpenes parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.opencannabis.schema.product.struct.testing.Terpenes 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.Terpenes parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.opencannabis.schema.product.struct.testing.Terpenes 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.Terpenes parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.opencannabis.schema.product.struct.testing.Terpenes 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.Terpenes 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.Terpenes 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.Terpenes 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.Terpenes 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.Terpenes 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.Terpenes 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.Terpenes 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 terpene testing. Includes space for a full set of terpene test result values, and
* corresponding values (computed) for estimated feelings and tasting notes.
*
*
* Protobuf type {@code opencannabis.structs.labtesting.Terpenes}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:opencannabis.structs.labtesting.Terpenes)
io.opencannabis.schema.product.struct.testing.TerpenesOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.opencannabis.schema.product.struct.testing.LabTesting.internal_static_opencannabis_structs_labtesting_Terpenes_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.opencannabis.schema.product.struct.testing.LabTesting.internal_static_opencannabis_structs_labtesting_Terpenes_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.opencannabis.schema.product.struct.testing.Terpenes.class, io.opencannabis.schema.product.struct.testing.Terpenes.Builder.class);
}
// Construct using io.opencannabis.schema.product.struct.testing.Terpenes.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getTerpeneFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
available_ = false;
if (terpeneBuilder_ == null) {
terpene_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
} else {
terpeneBuilder_.clear();
}
feeling_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);
aroma_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000008);
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_Terpenes_descriptor;
}
@java.lang.Override
public io.opencannabis.schema.product.struct.testing.Terpenes getDefaultInstanceForType() {
return io.opencannabis.schema.product.struct.testing.Terpenes.getDefaultInstance();
}
@java.lang.Override
public io.opencannabis.schema.product.struct.testing.Terpenes build() {
io.opencannabis.schema.product.struct.testing.Terpenes result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.opencannabis.schema.product.struct.testing.Terpenes buildPartial() {
io.opencannabis.schema.product.struct.testing.Terpenes result = new io.opencannabis.schema.product.struct.testing.Terpenes(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
result.available_ = available_;
if (terpeneBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)) {
terpene_ = java.util.Collections.unmodifiableList(terpene_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.terpene_ = terpene_;
} else {
result.terpene_ = terpeneBuilder_.build();
}
if (((bitField0_ & 0x00000004) != 0)) {
feeling_ = java.util.Collections.unmodifiableList(feeling_);
bitField0_ = (bitField0_ & ~0x00000004);
}
result.feeling_ = feeling_;
if (((bitField0_ & 0x00000008) != 0)) {
aroma_ = java.util.Collections.unmodifiableList(aroma_);
bitField0_ = (bitField0_ & ~0x00000008);
}
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.Terpenes) {
return mergeFrom((io.opencannabis.schema.product.struct.testing.Terpenes)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.opencannabis.schema.product.struct.testing.Terpenes other) {
if (other == io.opencannabis.schema.product.struct.testing.Terpenes.getDefaultInstance()) return this;
if (other.getAvailable() != false) {
setAvailable(other.getAvailable());
}
if (terpeneBuilder_ == null) {
if (!other.terpene_.isEmpty()) {
if (terpene_.isEmpty()) {
terpene_ = other.terpene_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureTerpeneIsMutable();
terpene_.addAll(other.terpene_);
}
onChanged();
}
} else {
if (!other.terpene_.isEmpty()) {
if (terpeneBuilder_.isEmpty()) {
terpeneBuilder_.dispose();
terpeneBuilder_ = null;
terpene_ = other.terpene_;
bitField0_ = (bitField0_ & ~0x00000002);
terpeneBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getTerpeneFieldBuilder() : null;
} else {
terpeneBuilder_.addAllMessages(other.terpene_);
}
}
}
if (!other.feeling_.isEmpty()) {
if (feeling_.isEmpty()) {
feeling_ = other.feeling_;
bitField0_ = (bitField0_ & ~0x00000004);
} else {
ensureFeelingIsMutable();
feeling_.addAll(other.feeling_);
}
onChanged();
}
if (!other.aroma_.isEmpty()) {
if (aroma_.isEmpty()) {
aroma_ = other.aroma_;
bitField0_ = (bitField0_ & ~0x00000008);
} 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.Terpenes parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.opencannabis.schema.product.struct.testing.Terpenes) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private boolean available_ ;
/**
*
* Flag indicating whether terpene testing is available yet or not.
*
*
* bool available = 1;
*/
public boolean getAvailable() {
return available_;
}
/**
*
* Flag indicating whether terpene testing is available yet or not.
*
*
* bool available = 1;
*/
public Builder setAvailable(boolean value) {
available_ = value;
onChanged();
return this;
}
/**
*
* Flag indicating whether terpene testing is available yet or not.
*
*
* bool available = 1;
*/
public Builder clearAvailable() {
available_ = false;
onChanged();
return this;
}
private java.util.List terpene_ =
java.util.Collections.emptyList();
private void ensureTerpeneIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
terpene_ = new java.util.ArrayList(terpene_);
bitField0_ |= 0x00000002;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.opencannabis.schema.product.struct.testing.Terpenes.Result, io.opencannabis.schema.product.struct.testing.Terpenes.Result.Builder, io.opencannabis.schema.product.struct.testing.Terpenes.ResultOrBuilder> terpeneBuilder_;
/**
*
* Individual terpene testing results.
*
*
* repeated .opencannabis.structs.labtesting.Terpenes.Result terpene = 10;
*/
public java.util.List getTerpeneList() {
if (terpeneBuilder_ == null) {
return java.util.Collections.unmodifiableList(terpene_);
} else {
return terpeneBuilder_.getMessageList();
}
}
/**
*
* Individual terpene testing results.
*
*
* repeated .opencannabis.structs.labtesting.Terpenes.Result terpene = 10;
*/
public int getTerpeneCount() {
if (terpeneBuilder_ == null) {
return terpene_.size();
} else {
return terpeneBuilder_.getCount();
}
}
/**
*
* Individual terpene testing results.
*
*
* repeated .opencannabis.structs.labtesting.Terpenes.Result terpene = 10;
*/
public io.opencannabis.schema.product.struct.testing.Terpenes.Result getTerpene(int index) {
if (terpeneBuilder_ == null) {
return terpene_.get(index);
} else {
return terpeneBuilder_.getMessage(index);
}
}
/**
*
* Individual terpene testing results.
*
*
* repeated .opencannabis.structs.labtesting.Terpenes.Result terpene = 10;
*/
public Builder setTerpene(
int index, io.opencannabis.schema.product.struct.testing.Terpenes.Result value) {
if (terpeneBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureTerpeneIsMutable();
terpene_.set(index, value);
onChanged();
} else {
terpeneBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Individual terpene testing results.
*
*
* repeated .opencannabis.structs.labtesting.Terpenes.Result terpene = 10;
*/
public Builder setTerpene(
int index, io.opencannabis.schema.product.struct.testing.Terpenes.Result.Builder builderForValue) {
if (terpeneBuilder_ == null) {
ensureTerpeneIsMutable();
terpene_.set(index, builderForValue.build());
onChanged();
} else {
terpeneBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Individual terpene testing results.
*
*
* repeated .opencannabis.structs.labtesting.Terpenes.Result terpene = 10;
*/
public Builder addTerpene(io.opencannabis.schema.product.struct.testing.Terpenes.Result value) {
if (terpeneBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureTerpeneIsMutable();
terpene_.add(value);
onChanged();
} else {
terpeneBuilder_.addMessage(value);
}
return this;
}
/**
*
* Individual terpene testing results.
*
*
* repeated .opencannabis.structs.labtesting.Terpenes.Result terpene = 10;
*/
public Builder addTerpene(
int index, io.opencannabis.schema.product.struct.testing.Terpenes.Result value) {
if (terpeneBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureTerpeneIsMutable();
terpene_.add(index, value);
onChanged();
} else {
terpeneBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Individual terpene testing results.
*
*
* repeated .opencannabis.structs.labtesting.Terpenes.Result terpene = 10;
*/
public Builder addTerpene(
io.opencannabis.schema.product.struct.testing.Terpenes.Result.Builder builderForValue) {
if (terpeneBuilder_ == null) {
ensureTerpeneIsMutable();
terpene_.add(builderForValue.build());
onChanged();
} else {
terpeneBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Individual terpene testing results.
*
*
* repeated .opencannabis.structs.labtesting.Terpenes.Result terpene = 10;
*/
public Builder addTerpene(
int index, io.opencannabis.schema.product.struct.testing.Terpenes.Result.Builder builderForValue) {
if (terpeneBuilder_ == null) {
ensureTerpeneIsMutable();
terpene_.add(index, builderForValue.build());
onChanged();
} else {
terpeneBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Individual terpene testing results.
*
*
* repeated .opencannabis.structs.labtesting.Terpenes.Result terpene = 10;
*/
public Builder addAllTerpene(
java.lang.Iterable extends io.opencannabis.schema.product.struct.testing.Terpenes.Result> values) {
if (terpeneBuilder_ == null) {
ensureTerpeneIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, terpene_);
onChanged();
} else {
terpeneBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Individual terpene testing results.
*
*
* repeated .opencannabis.structs.labtesting.Terpenes.Result terpene = 10;
*/
public Builder clearTerpene() {
if (terpeneBuilder_ == null) {
terpene_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
} else {
terpeneBuilder_.clear();
}
return this;
}
/**
*
* Individual terpene testing results.
*
*
* repeated .opencannabis.structs.labtesting.Terpenes.Result terpene = 10;
*/
public Builder removeTerpene(int index) {
if (terpeneBuilder_ == null) {
ensureTerpeneIsMutable();
terpene_.remove(index);
onChanged();
} else {
terpeneBuilder_.remove(index);
}
return this;
}
/**
*
* Individual terpene testing results.
*
*
* repeated .opencannabis.structs.labtesting.Terpenes.Result terpene = 10;
*/
public io.opencannabis.schema.product.struct.testing.Terpenes.Result.Builder getTerpeneBuilder(
int index) {
return getTerpeneFieldBuilder().getBuilder(index);
}
/**
*
* Individual terpene testing results.
*
*
* repeated .opencannabis.structs.labtesting.Terpenes.Result terpene = 10;
*/
public io.opencannabis.schema.product.struct.testing.Terpenes.ResultOrBuilder getTerpeneOrBuilder(
int index) {
if (terpeneBuilder_ == null) {
return terpene_.get(index); } else {
return terpeneBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Individual terpene testing results.
*
*
* repeated .opencannabis.structs.labtesting.Terpenes.Result terpene = 10;
*/
public java.util.List extends io.opencannabis.schema.product.struct.testing.Terpenes.ResultOrBuilder>
getTerpeneOrBuilderList() {
if (terpeneBuilder_ != null) {
return terpeneBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(terpene_);
}
}
/**
*
* Individual terpene testing results.
*
*
* repeated .opencannabis.structs.labtesting.Terpenes.Result terpene = 10;
*/
public io.opencannabis.schema.product.struct.testing.Terpenes.Result.Builder addTerpeneBuilder() {
return getTerpeneFieldBuilder().addBuilder(
io.opencannabis.schema.product.struct.testing.Terpenes.Result.getDefaultInstance());
}
/**
*
* Individual terpene testing results.
*
*
* repeated .opencannabis.structs.labtesting.Terpenes.Result terpene = 10;
*/
public io.opencannabis.schema.product.struct.testing.Terpenes.Result.Builder addTerpeneBuilder(
int index) {
return getTerpeneFieldBuilder().addBuilder(
index, io.opencannabis.schema.product.struct.testing.Terpenes.Result.getDefaultInstance());
}
/**
*
* Individual terpene testing results.
*
*
* repeated .opencannabis.structs.labtesting.Terpenes.Result terpene = 10;
*/
public java.util.List
getTerpeneBuilderList() {
return getTerpeneFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.opencannabis.schema.product.struct.testing.Terpenes.Result, io.opencannabis.schema.product.struct.testing.Terpenes.Result.Builder, io.opencannabis.schema.product.struct.testing.Terpenes.ResultOrBuilder>
getTerpeneFieldBuilder() {
if (terpeneBuilder_ == null) {
terpeneBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
io.opencannabis.schema.product.struct.testing.Terpenes.Result, io.opencannabis.schema.product.struct.testing.Terpenes.Result.Builder, io.opencannabis.schema.product.struct.testing.Terpenes.ResultOrBuilder>(
terpene_,
((bitField0_ & 0x00000002) != 0),
getParentForChildren(),
isClean());
terpene_ = null;
}
return terpeneBuilder_;
}
private java.util.List feeling_ =
java.util.Collections.emptyList();
private void ensureFeelingIsMutable() {
if (!((bitField0_ & 0x00000004) != 0)) {
feeling_ = new java.util.ArrayList(feeling_);
bitField0_ |= 0x00000004;
}
}
/**
*
* Enumerates computed feeling notes, based on the specified terpene results.
*
*
* repeated .opencannabis.structs.labtesting.Feeling feeling = 2;
*/
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_);
}
/**
*
* Enumerates computed feeling notes, based on the specified terpene results.
*
*
* repeated .opencannabis.structs.labtesting.Feeling feeling = 2;
*/
public int getFeelingCount() {
return feeling_.size();
}
/**
*
* Enumerates computed feeling notes, based on the specified terpene results.
*
*
* repeated .opencannabis.structs.labtesting.Feeling feeling = 2;
*/
public io.opencannabis.schema.product.struct.testing.Feeling getFeeling(int index) {
return feeling_converter_.convert(feeling_.get(index));
}
/**
*
* Enumerates computed feeling notes, based on the specified terpene results.
*
*
* repeated .opencannabis.structs.labtesting.Feeling feeling = 2;
*/
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;
}
/**
*
* Enumerates computed feeling notes, based on the specified terpene results.
*
*
* repeated .opencannabis.structs.labtesting.Feeling feeling = 2;
*/
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;
}
/**
*
* Enumerates computed feeling notes, based on the specified terpene results.
*
*
* repeated .opencannabis.structs.labtesting.Feeling feeling = 2;
*/
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;
}
/**
*
* Enumerates computed feeling notes, based on the specified terpene results.
*
*
* repeated .opencannabis.structs.labtesting.Feeling feeling = 2;
*/
public Builder clearFeeling() {
feeling_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
*
* Enumerates computed feeling notes, based on the specified terpene results.
*
*
* repeated .opencannabis.structs.labtesting.Feeling feeling = 2;
*/
public java.util.List
getFeelingValueList() {
return java.util.Collections.unmodifiableList(feeling_);
}
/**
*
* Enumerates computed feeling notes, based on the specified terpene results.
*
*
* repeated .opencannabis.structs.labtesting.Feeling feeling = 2;
*/
public int getFeelingValue(int index) {
return feeling_.get(index);
}
/**
*
* Enumerates computed feeling notes, based on the specified terpene results.
*
*
* repeated .opencannabis.structs.labtesting.Feeling feeling = 2;
*/
public Builder setFeelingValue(
int index, int value) {
ensureFeelingIsMutable();
feeling_.set(index, value);
onChanged();
return this;
}
/**
*
* Enumerates computed feeling notes, based on the specified terpene results.
*
*
* repeated .opencannabis.structs.labtesting.Feeling feeling = 2;
*/
public Builder addFeelingValue(int value) {
ensureFeelingIsMutable();
feeling_.add(value);
onChanged();
return this;
}
/**
*
* Enumerates computed feeling notes, based on the specified terpene results.
*
*
* repeated .opencannabis.structs.labtesting.Feeling feeling = 2;
*/
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_ & 0x00000008) != 0)) {
aroma_ = new java.util.ArrayList(aroma_);
bitField0_ |= 0x00000008;
}
}
/**
*
* Enumerates computed aroma/flavor notes.
*
*
* repeated .opencannabis.structs.labtesting.TasteNote aroma = 3;
*/
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_);
}
/**
*
* Enumerates computed aroma/flavor notes.
*
*
* repeated .opencannabis.structs.labtesting.TasteNote aroma = 3;
*/
public int getAromaCount() {
return aroma_.size();
}
/**
*
* Enumerates computed aroma/flavor notes.
*
*
* repeated .opencannabis.structs.labtesting.TasteNote aroma = 3;
*/
public io.opencannabis.schema.product.struct.testing.TasteNote getAroma(int index) {
return aroma_converter_.convert(aroma_.get(index));
}
/**
*
* Enumerates computed aroma/flavor notes.
*
*
* repeated .opencannabis.structs.labtesting.TasteNote aroma = 3;
*/
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;
}
/**
*
* Enumerates computed aroma/flavor notes.
*
*
* repeated .opencannabis.structs.labtesting.TasteNote aroma = 3;
*/
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;
}
/**
*
* Enumerates computed aroma/flavor notes.
*
*
* repeated .opencannabis.structs.labtesting.TasteNote aroma = 3;
*/
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;
}
/**
*
* Enumerates computed aroma/flavor notes.
*
*
* repeated .opencannabis.structs.labtesting.TasteNote aroma = 3;
*/
public Builder clearAroma() {
aroma_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
return this;
}
/**
*
* Enumerates computed aroma/flavor notes.
*
*
* repeated .opencannabis.structs.labtesting.TasteNote aroma = 3;
*/
public java.util.List
getAromaValueList() {
return java.util.Collections.unmodifiableList(aroma_);
}
/**
*
* Enumerates computed aroma/flavor notes.
*
*
* repeated .opencannabis.structs.labtesting.TasteNote aroma = 3;
*/
public int getAromaValue(int index) {
return aroma_.get(index);
}
/**
*
* Enumerates computed aroma/flavor notes.
*
*
* repeated .opencannabis.structs.labtesting.TasteNote aroma = 3;
*/
public Builder setAromaValue(
int index, int value) {
ensureAromaIsMutable();
aroma_.set(index, value);
onChanged();
return this;
}
/**
*
* Enumerates computed aroma/flavor notes.
*
*
* repeated .opencannabis.structs.labtesting.TasteNote aroma = 3;
*/
public Builder addAromaValue(int value) {
ensureAromaIsMutable();
aroma_.add(value);
onChanged();
return this;
}
/**
*
* Enumerates computed aroma/flavor notes.
*
*
* repeated .opencannabis.structs.labtesting.TasteNote aroma = 3;
*/
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.Terpenes)
}
// @@protoc_insertion_point(class_scope:opencannabis.structs.labtesting.Terpenes)
private static final io.opencannabis.schema.product.struct.testing.Terpenes DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.opencannabis.schema.product.struct.testing.Terpenes();
}
public static io.opencannabis.schema.product.struct.testing.Terpenes getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Terpenes parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Terpenes(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.Terpenes getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy