io.opencannabis.schema.product.struct.testing.CannabinoidRatio 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;
/**
*
* Enumerates available cannabinoid ratio states. This value is computed from the THC and CBD test results, if
* available, and expresses the general (low-resolution) ratio between those two values, which are the most important in
* cannabis test result data.
*
*
* Protobuf enum {@code opencannabis.structs.labtesting.CannabinoidRatio}
*/
public enum CannabinoidRatio
implements com.google.protobuf.ProtocolMessageEnum {
/**
*
* No cannabinoid dominance.
*
*
* NO_CANNABINOID_PREFERENCE = 0;
*/
NO_CANNABINOID_PREFERENCE(0),
/**
*
* Majority THC or only THC.
*
*
* THC_ONLY = 1;
*/
THC_ONLY(1),
/**
*
* THC majority, with a minority of CBD.
*
*
* THC_OVER_CBD = 2;
*/
THC_OVER_CBD(2),
/**
*
* Equal THC and CBD content.
*
*
* EQUAL = 3;
*/
EQUAL(3),
/**
*
* CBD majority, with a minority of THC.
*
*
* CBD_OVER_THC = 4;
*/
CBD_OVER_THC(4),
/**
*
* Majority CBD or only CBD.
*
*
* CBD_ONLY = 5;
*/
CBD_ONLY(5),
UNRECOGNIZED(-1),
;
/**
*
* No cannabinoid dominance.
*
*
* NO_CANNABINOID_PREFERENCE = 0;
*/
public static final int NO_CANNABINOID_PREFERENCE_VALUE = 0;
/**
*
* Majority THC or only THC.
*
*
* THC_ONLY = 1;
*/
public static final int THC_ONLY_VALUE = 1;
/**
*
* THC majority, with a minority of CBD.
*
*
* THC_OVER_CBD = 2;
*/
public static final int THC_OVER_CBD_VALUE = 2;
/**
*
* Equal THC and CBD content.
*
*
* EQUAL = 3;
*/
public static final int EQUAL_VALUE = 3;
/**
*
* CBD majority, with a minority of THC.
*
*
* CBD_OVER_THC = 4;
*/
public static final int CBD_OVER_THC_VALUE = 4;
/**
*
* Majority CBD or only CBD.
*
*
* CBD_ONLY = 5;
*/
public static final int CBD_ONLY_VALUE = 5;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static CannabinoidRatio valueOf(int value) {
return forNumber(value);
}
public static CannabinoidRatio forNumber(int value) {
switch (value) {
case 0: return NO_CANNABINOID_PREFERENCE;
case 1: return THC_ONLY;
case 2: return THC_OVER_CBD;
case 3: return EQUAL;
case 4: return CBD_OVER_THC;
case 5: return CBD_ONLY;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
CannabinoidRatio> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public CannabinoidRatio findValueByNumber(int number) {
return CannabinoidRatio.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return io.opencannabis.schema.product.struct.testing.LabTesting.getDescriptor().getEnumTypes().get(2);
}
private static final CannabinoidRatio[] VALUES = values();
public static CannabinoidRatio valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private CannabinoidRatio(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:opencannabis.structs.labtesting.CannabinoidRatio)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy