
io.opencannabis.schema.inventory.InventoryState Maven / Gradle / Ivy
/*
* Copyright 2018, Momentum Ideas, Co. All rights reserved.
*
* Source and object computer code contained herein is the private intellectual
* property of Momentum Ideas Co., a Delaware Corporation. Use of this
* code in source form requires permission in writing before use or the
* assembly, distribution, or publishing of derivative works, for commercial
* purposes or any other purpose, from a duly authorized officer of Momentum
* Ideas Co.
*
* 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: inventory/InventoryProduct.proto
package io.opencannabis.schema.inventory;
/**
*
* Specifies the structure of an inventory state checkin, including the inventory item's status at the time the checkin
* was submitted, timestamp information, and the set of coordinates where the checkin took place.
*
*
* Protobuf type {@code opencannabis.inventory.InventoryState}
*/
public final class InventoryState extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:opencannabis.inventory.InventoryState)
InventoryStateOrBuilder {
private static final long serialVersionUID = 0L;
// Use InventoryState.newBuilder() to construct.
private InventoryState(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private InventoryState() {
status_ = 0;
fitForSale_ = false;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private InventoryState(
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();
status_ = rawValue;
break;
}
case 18: {
io.opencannabis.schema.inventory.InventoryCoordinates.Builder subBuilder = null;
if (coordinates_ != null) {
subBuilder = coordinates_.toBuilder();
}
coordinates_ = input.readMessage(io.opencannabis.schema.inventory.InventoryCoordinates.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(coordinates_);
coordinates_ = subBuilder.buildPartial();
}
break;
}
case 24: {
fitForSale_ = input.readBool();
break;
}
case 34: {
io.opencannabis.schema.inventory.InventoryAmount.Builder subBuilder = null;
if (amount_ != null) {
subBuilder = amount_.toBuilder();
}
amount_ = input.readMessage(io.opencannabis.schema.inventory.InventoryAmount.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(amount_);
amount_ = subBuilder.buildPartial();
}
break;
}
case 786: {
io.opencannabis.schema.temporal.TemporalInstant.Instant.Builder subBuilder = null;
if (created_ != null) {
subBuilder = created_.toBuilder();
}
created_ = input.readMessage(io.opencannabis.schema.temporal.TemporalInstant.Instant.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(created_);
created_ = subBuilder.buildPartial();
}
break;
}
case 794: {
io.opencannabis.schema.temporal.TemporalInstant.Instant.Builder subBuilder = null;
if (modified_ != null) {
subBuilder = modified_.toBuilder();
}
modified_ = input.readMessage(io.opencannabis.schema.temporal.TemporalInstant.Instant.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(modified_);
modified_ = subBuilder.buildPartial();
}
break;
}
default: {
if (!parseUnknownFieldProto3(
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.inventory.InventoryProductOuterClass.internal_static_opencannabis_inventory_InventoryState_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.opencannabis.schema.inventory.InventoryProductOuterClass.internal_static_opencannabis_inventory_InventoryState_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.opencannabis.schema.inventory.InventoryState.class, io.opencannabis.schema.inventory.InventoryState.Builder.class);
}
/**
*
* Available statuses that an inventory item may take, in a given inventory step.
*
*
* Protobuf enum {@code opencannabis.inventory.InventoryState.Status}
*/
public enum Status
implements com.google.protobuf.ProtocolMessageEnum {
/**
*
* Specifies a status where a given batch of inventory has not yet been reconciled with ledger/database services,
* and is therefore considered ephemeral, or held-in-suspense, until further action is taken.
*
*
* UNRECONCILED = 0;
*/
UNRECONCILED(0),
/**
*
* Indicates a status where a given batch of inventory is currently in the process of being "received," consisting
* of initial unpackaging, re-packaging, and inventory checkin/update.
*
*
* RECEIVING = 1;
*/
RECEIVING(1),
/**
*
* Indicates a status where a given batch of inventory is held in quarantine, awaiting the results of lab testing,
* or regarded as unfit for sale for some other reason.
*
*
* QUARANTINE = 2;
*/
QUARANTINE(2),
/**
*
* Indicates a status where a given batch of inventory is held on-hand in storage, awaiting further action.
*
*
* ON_HAND = 3;
*/
ON_HAND(3),
/**
*
* Status indicating that a product/inventory batch is currently listed for sale, or otherwise available for
* purchase, distribution, or resale.
*
*
* FOR_SALE = 4;
*/
FOR_SALE(4),
/**
*
* Indicates that a particular inventory batch is fully claimed, and may soon be committed, assuming payment
* settling and other steps take place.
*
*
* CLAIMED = 5;
*/
CLAIMED(5),
/**
*
* Indicates that a particular inventory batch or inventory item has been fully committed-to, meaning, it will soon
* or has already left the posession of the (now, or soon-to-be former) owning partner.
*
*
* COMMITTED = 6;
*/
COMMITTED(6),
UNRECOGNIZED(-1),
;
/**
*
* Specifies a status where a given batch of inventory has not yet been reconciled with ledger/database services,
* and is therefore considered ephemeral, or held-in-suspense, until further action is taken.
*
*
* UNRECONCILED = 0;
*/
public static final int UNRECONCILED_VALUE = 0;
/**
*
* Indicates a status where a given batch of inventory is currently in the process of being "received," consisting
* of initial unpackaging, re-packaging, and inventory checkin/update.
*
*
* RECEIVING = 1;
*/
public static final int RECEIVING_VALUE = 1;
/**
*
* Indicates a status where a given batch of inventory is held in quarantine, awaiting the results of lab testing,
* or regarded as unfit for sale for some other reason.
*
*
* QUARANTINE = 2;
*/
public static final int QUARANTINE_VALUE = 2;
/**
*
* Indicates a status where a given batch of inventory is held on-hand in storage, awaiting further action.
*
*
* ON_HAND = 3;
*/
public static final int ON_HAND_VALUE = 3;
/**
*
* Status indicating that a product/inventory batch is currently listed for sale, or otherwise available for
* purchase, distribution, or resale.
*
*
* FOR_SALE = 4;
*/
public static final int FOR_SALE_VALUE = 4;
/**
*
* Indicates that a particular inventory batch is fully claimed, and may soon be committed, assuming payment
* settling and other steps take place.
*
*
* CLAIMED = 5;
*/
public static final int CLAIMED_VALUE = 5;
/**
*
* Indicates that a particular inventory batch or inventory item has been fully committed-to, meaning, it will soon
* or has already left the posession of the (now, or soon-to-be former) owning partner.
*
*
* COMMITTED = 6;
*/
public static final int COMMITTED_VALUE = 6;
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 Status valueOf(int value) {
return forNumber(value);
}
public static Status forNumber(int value) {
switch (value) {
case 0: return UNRECONCILED;
case 1: return RECEIVING;
case 2: return QUARANTINE;
case 3: return ON_HAND;
case 4: return FOR_SALE;
case 5: return CLAIMED;
case 6: return COMMITTED;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
Status> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public Status findValueByNumber(int number) {
return Status.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.inventory.InventoryState.getDescriptor().getEnumTypes().get(0);
}
private static final Status[] VALUES = values();
public static Status 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 Status(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:opencannabis.inventory.InventoryState.Status)
}
public static final int STATUS_FIELD_NUMBER = 1;
private int status_;
/**
*
* Status of the inventory item. Specifies the active state for the inventory item, from a set of enumerated standard
* inventory states.
*
*
* .opencannabis.inventory.InventoryState.Status status = 1;
*/
public int getStatusValue() {
return status_;
}
/**
*
* Status of the inventory item. Specifies the active state for the inventory item, from a set of enumerated standard
* inventory states.
*
*
* .opencannabis.inventory.InventoryState.Status status = 1;
*/
public io.opencannabis.schema.inventory.InventoryState.Status getStatus() {
@SuppressWarnings("deprecation")
io.opencannabis.schema.inventory.InventoryState.Status result = io.opencannabis.schema.inventory.InventoryState.Status.valueOf(status_);
return result == null ? io.opencannabis.schema.inventory.InventoryState.Status.UNRECOGNIZED : result;
}
public static final int COORDINATES_FIELD_NUMBER = 2;
private io.opencannabis.schema.inventory.InventoryCoordinates coordinates_;
/**
*
* Specifies the new (target) coordinates for a given inventory item, a change that occurred with a given inventory
* item checkin.
*
*
* .opencannabis.inventory.InventoryCoordinates coordinates = 2;
*/
public boolean hasCoordinates() {
return coordinates_ != null;
}
/**
*
* Specifies the new (target) coordinates for a given inventory item, a change that occurred with a given inventory
* item checkin.
*
*
* .opencannabis.inventory.InventoryCoordinates coordinates = 2;
*/
public io.opencannabis.schema.inventory.InventoryCoordinates getCoordinates() {
return coordinates_ == null ? io.opencannabis.schema.inventory.InventoryCoordinates.getDefaultInstance() : coordinates_;
}
/**
*
* Specifies the new (target) coordinates for a given inventory item, a change that occurred with a given inventory
* item checkin.
*
*
* .opencannabis.inventory.InventoryCoordinates coordinates = 2;
*/
public io.opencannabis.schema.inventory.InventoryCoordinatesOrBuilder getCoordinatesOrBuilder() {
return getCoordinates();
}
public static final int FIT_FOR_SALE_FIELD_NUMBER = 3;
private boolean fitForSale_;
/**
*
* Indicates whether the inventory item is fit for sale, or not. This flag must be set to `true` for an item to be
* eligible for listing.
*
*
* bool fit_for_sale = 3;
*/
public boolean getFitForSale() {
return fitForSale_;
}
public static final int AMOUNT_FIELD_NUMBER = 4;
private io.opencannabis.schema.inventory.InventoryAmount amount_;
/**
*
* Amount of inventory, in this batch, that is on-hand.
*
*
* .opencannabis.inventory.InventoryAmount amount = 4;
*/
public boolean hasAmount() {
return amount_ != null;
}
/**
*
* Amount of inventory, in this batch, that is on-hand.
*
*
* .opencannabis.inventory.InventoryAmount amount = 4;
*/
public io.opencannabis.schema.inventory.InventoryAmount getAmount() {
return amount_ == null ? io.opencannabis.schema.inventory.InventoryAmount.getDefaultInstance() : amount_;
}
/**
*
* Amount of inventory, in this batch, that is on-hand.
*
*
* .opencannabis.inventory.InventoryAmount amount = 4;
*/
public io.opencannabis.schema.inventory.InventoryAmountOrBuilder getAmountOrBuilder() {
return getAmount();
}
public static final int CREATED_FIELD_NUMBER = 98;
private io.opencannabis.schema.temporal.TemporalInstant.Instant created_;
/**
*
* Timestamp for when this inventory state entry was created. Set after initially saving an inventory state checkin.
*
*
* .opencannabis.temporal.Instant created = 98;
*/
public boolean hasCreated() {
return created_ != null;
}
/**
*
* Timestamp for when this inventory state entry was created. Set after initially saving an inventory state checkin.
*
*
* .opencannabis.temporal.Instant created = 98;
*/
public io.opencannabis.schema.temporal.TemporalInstant.Instant getCreated() {
return created_ == null ? io.opencannabis.schema.temporal.TemporalInstant.Instant.getDefaultInstance() : created_;
}
/**
*
* Timestamp for when this inventory state entry was created. Set after initially saving an inventory state checkin.
*
*
* .opencannabis.temporal.Instant created = 98;
*/
public io.opencannabis.schema.temporal.TemporalInstant.InstantOrBuilder getCreatedOrBuilder() {
return getCreated();
}
public static final int MODIFIED_FIELD_NUMBER = 99;
private io.opencannabis.schema.temporal.TemporalInstant.Instant modified_;
/**
*
* Timestamp for when this inventory state entry was updated, if applicable. Set after saving an existing inventory
* state checkin.
*
*
* .opencannabis.temporal.Instant modified = 99;
*/
public boolean hasModified() {
return modified_ != null;
}
/**
*
* Timestamp for when this inventory state entry was updated, if applicable. Set after saving an existing inventory
* state checkin.
*
*
* .opencannabis.temporal.Instant modified = 99;
*/
public io.opencannabis.schema.temporal.TemporalInstant.Instant getModified() {
return modified_ == null ? io.opencannabis.schema.temporal.TemporalInstant.Instant.getDefaultInstance() : modified_;
}
/**
*
* Timestamp for when this inventory state entry was updated, if applicable. Set after saving an existing inventory
* state checkin.
*
*
* .opencannabis.temporal.Instant modified = 99;
*/
public io.opencannabis.schema.temporal.TemporalInstant.InstantOrBuilder getModifiedOrBuilder() {
return getModified();
}
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 (status_ != io.opencannabis.schema.inventory.InventoryState.Status.UNRECONCILED.getNumber()) {
output.writeEnum(1, status_);
}
if (coordinates_ != null) {
output.writeMessage(2, getCoordinates());
}
if (fitForSale_ != false) {
output.writeBool(3, fitForSale_);
}
if (amount_ != null) {
output.writeMessage(4, getAmount());
}
if (created_ != null) {
output.writeMessage(98, getCreated());
}
if (modified_ != null) {
output.writeMessage(99, getModified());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (status_ != io.opencannabis.schema.inventory.InventoryState.Status.UNRECONCILED.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(1, status_);
}
if (coordinates_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getCoordinates());
}
if (fitForSale_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(3, fitForSale_);
}
if (amount_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getAmount());
}
if (created_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(98, getCreated());
}
if (modified_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(99, getModified());
}
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.inventory.InventoryState)) {
return super.equals(obj);
}
io.opencannabis.schema.inventory.InventoryState other = (io.opencannabis.schema.inventory.InventoryState) obj;
boolean result = true;
result = result && status_ == other.status_;
result = result && (hasCoordinates() == other.hasCoordinates());
if (hasCoordinates()) {
result = result && getCoordinates()
.equals(other.getCoordinates());
}
result = result && (getFitForSale()
== other.getFitForSale());
result = result && (hasAmount() == other.hasAmount());
if (hasAmount()) {
result = result && getAmount()
.equals(other.getAmount());
}
result = result && (hasCreated() == other.hasCreated());
if (hasCreated()) {
result = result && getCreated()
.equals(other.getCreated());
}
result = result && (hasModified() == other.hasModified());
if (hasModified()) {
result = result && getModified()
.equals(other.getModified());
}
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + STATUS_FIELD_NUMBER;
hash = (53 * hash) + status_;
if (hasCoordinates()) {
hash = (37 * hash) + COORDINATES_FIELD_NUMBER;
hash = (53 * hash) + getCoordinates().hashCode();
}
hash = (37 * hash) + FIT_FOR_SALE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getFitForSale());
if (hasAmount()) {
hash = (37 * hash) + AMOUNT_FIELD_NUMBER;
hash = (53 * hash) + getAmount().hashCode();
}
if (hasCreated()) {
hash = (37 * hash) + CREATED_FIELD_NUMBER;
hash = (53 * hash) + getCreated().hashCode();
}
if (hasModified()) {
hash = (37 * hash) + MODIFIED_FIELD_NUMBER;
hash = (53 * hash) + getModified().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.opencannabis.schema.inventory.InventoryState parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.opencannabis.schema.inventory.InventoryState 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.inventory.InventoryState parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.opencannabis.schema.inventory.InventoryState 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.inventory.InventoryState parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.opencannabis.schema.inventory.InventoryState parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.opencannabis.schema.inventory.InventoryState parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.opencannabis.schema.inventory.InventoryState 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.inventory.InventoryState parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.opencannabis.schema.inventory.InventoryState 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.inventory.InventoryState parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.opencannabis.schema.inventory.InventoryState 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.inventory.InventoryState 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 inventory state checkin, including the inventory item's status at the time the checkin
* was submitted, timestamp information, and the set of coordinates where the checkin took place.
*
*
* Protobuf type {@code opencannabis.inventory.InventoryState}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:opencannabis.inventory.InventoryState)
io.opencannabis.schema.inventory.InventoryStateOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.opencannabis.schema.inventory.InventoryProductOuterClass.internal_static_opencannabis_inventory_InventoryState_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.opencannabis.schema.inventory.InventoryProductOuterClass.internal_static_opencannabis_inventory_InventoryState_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.opencannabis.schema.inventory.InventoryState.class, io.opencannabis.schema.inventory.InventoryState.Builder.class);
}
// Construct using io.opencannabis.schema.inventory.InventoryState.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();
status_ = 0;
if (coordinatesBuilder_ == null) {
coordinates_ = null;
} else {
coordinates_ = null;
coordinatesBuilder_ = null;
}
fitForSale_ = false;
if (amountBuilder_ == null) {
amount_ = null;
} else {
amount_ = null;
amountBuilder_ = null;
}
if (createdBuilder_ == null) {
created_ = null;
} else {
created_ = null;
createdBuilder_ = null;
}
if (modifiedBuilder_ == null) {
modified_ = null;
} else {
modified_ = null;
modifiedBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.opencannabis.schema.inventory.InventoryProductOuterClass.internal_static_opencannabis_inventory_InventoryState_descriptor;
}
@java.lang.Override
public io.opencannabis.schema.inventory.InventoryState getDefaultInstanceForType() {
return io.opencannabis.schema.inventory.InventoryState.getDefaultInstance();
}
@java.lang.Override
public io.opencannabis.schema.inventory.InventoryState build() {
io.opencannabis.schema.inventory.InventoryState result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.opencannabis.schema.inventory.InventoryState buildPartial() {
io.opencannabis.schema.inventory.InventoryState result = new io.opencannabis.schema.inventory.InventoryState(this);
result.status_ = status_;
if (coordinatesBuilder_ == null) {
result.coordinates_ = coordinates_;
} else {
result.coordinates_ = coordinatesBuilder_.build();
}
result.fitForSale_ = fitForSale_;
if (amountBuilder_ == null) {
result.amount_ = amount_;
} else {
result.amount_ = amountBuilder_.build();
}
if (createdBuilder_ == null) {
result.created_ = created_;
} else {
result.created_ = createdBuilder_.build();
}
if (modifiedBuilder_ == null) {
result.modified_ = modified_;
} else {
result.modified_ = modifiedBuilder_.build();
}
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return (Builder) super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof io.opencannabis.schema.inventory.InventoryState) {
return mergeFrom((io.opencannabis.schema.inventory.InventoryState)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.opencannabis.schema.inventory.InventoryState other) {
if (other == io.opencannabis.schema.inventory.InventoryState.getDefaultInstance()) return this;
if (other.status_ != 0) {
setStatusValue(other.getStatusValue());
}
if (other.hasCoordinates()) {
mergeCoordinates(other.getCoordinates());
}
if (other.getFitForSale() != false) {
setFitForSale(other.getFitForSale());
}
if (other.hasAmount()) {
mergeAmount(other.getAmount());
}
if (other.hasCreated()) {
mergeCreated(other.getCreated());
}
if (other.hasModified()) {
mergeModified(other.getModified());
}
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.inventory.InventoryState parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.opencannabis.schema.inventory.InventoryState) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int status_ = 0;
/**
*
* Status of the inventory item. Specifies the active state for the inventory item, from a set of enumerated standard
* inventory states.
*
*
* .opencannabis.inventory.InventoryState.Status status = 1;
*/
public int getStatusValue() {
return status_;
}
/**
*
* Status of the inventory item. Specifies the active state for the inventory item, from a set of enumerated standard
* inventory states.
*
*
* .opencannabis.inventory.InventoryState.Status status = 1;
*/
public Builder setStatusValue(int value) {
status_ = value;
onChanged();
return this;
}
/**
*
* Status of the inventory item. Specifies the active state for the inventory item, from a set of enumerated standard
* inventory states.
*
*
* .opencannabis.inventory.InventoryState.Status status = 1;
*/
public io.opencannabis.schema.inventory.InventoryState.Status getStatus() {
@SuppressWarnings("deprecation")
io.opencannabis.schema.inventory.InventoryState.Status result = io.opencannabis.schema.inventory.InventoryState.Status.valueOf(status_);
return result == null ? io.opencannabis.schema.inventory.InventoryState.Status.UNRECOGNIZED : result;
}
/**
*
* Status of the inventory item. Specifies the active state for the inventory item, from a set of enumerated standard
* inventory states.
*
*
* .opencannabis.inventory.InventoryState.Status status = 1;
*/
public Builder setStatus(io.opencannabis.schema.inventory.InventoryState.Status value) {
if (value == null) {
throw new NullPointerException();
}
status_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Status of the inventory item. Specifies the active state for the inventory item, from a set of enumerated standard
* inventory states.
*
*
* .opencannabis.inventory.InventoryState.Status status = 1;
*/
public Builder clearStatus() {
status_ = 0;
onChanged();
return this;
}
private io.opencannabis.schema.inventory.InventoryCoordinates coordinates_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
io.opencannabis.schema.inventory.InventoryCoordinates, io.opencannabis.schema.inventory.InventoryCoordinates.Builder, io.opencannabis.schema.inventory.InventoryCoordinatesOrBuilder> coordinatesBuilder_;
/**
*
* Specifies the new (target) coordinates for a given inventory item, a change that occurred with a given inventory
* item checkin.
*
*
* .opencannabis.inventory.InventoryCoordinates coordinates = 2;
*/
public boolean hasCoordinates() {
return coordinatesBuilder_ != null || coordinates_ != null;
}
/**
*
* Specifies the new (target) coordinates for a given inventory item, a change that occurred with a given inventory
* item checkin.
*
*
* .opencannabis.inventory.InventoryCoordinates coordinates = 2;
*/
public io.opencannabis.schema.inventory.InventoryCoordinates getCoordinates() {
if (coordinatesBuilder_ == null) {
return coordinates_ == null ? io.opencannabis.schema.inventory.InventoryCoordinates.getDefaultInstance() : coordinates_;
} else {
return coordinatesBuilder_.getMessage();
}
}
/**
*
* Specifies the new (target) coordinates for a given inventory item, a change that occurred with a given inventory
* item checkin.
*
*
* .opencannabis.inventory.InventoryCoordinates coordinates = 2;
*/
public Builder setCoordinates(io.opencannabis.schema.inventory.InventoryCoordinates value) {
if (coordinatesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
coordinates_ = value;
onChanged();
} else {
coordinatesBuilder_.setMessage(value);
}
return this;
}
/**
*
* Specifies the new (target) coordinates for a given inventory item, a change that occurred with a given inventory
* item checkin.
*
*
* .opencannabis.inventory.InventoryCoordinates coordinates = 2;
*/
public Builder setCoordinates(
io.opencannabis.schema.inventory.InventoryCoordinates.Builder builderForValue) {
if (coordinatesBuilder_ == null) {
coordinates_ = builderForValue.build();
onChanged();
} else {
coordinatesBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Specifies the new (target) coordinates for a given inventory item, a change that occurred with a given inventory
* item checkin.
*
*
* .opencannabis.inventory.InventoryCoordinates coordinates = 2;
*/
public Builder mergeCoordinates(io.opencannabis.schema.inventory.InventoryCoordinates value) {
if (coordinatesBuilder_ == null) {
if (coordinates_ != null) {
coordinates_ =
io.opencannabis.schema.inventory.InventoryCoordinates.newBuilder(coordinates_).mergeFrom(value).buildPartial();
} else {
coordinates_ = value;
}
onChanged();
} else {
coordinatesBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Specifies the new (target) coordinates for a given inventory item, a change that occurred with a given inventory
* item checkin.
*
*
* .opencannabis.inventory.InventoryCoordinates coordinates = 2;
*/
public Builder clearCoordinates() {
if (coordinatesBuilder_ == null) {
coordinates_ = null;
onChanged();
} else {
coordinates_ = null;
coordinatesBuilder_ = null;
}
return this;
}
/**
*
* Specifies the new (target) coordinates for a given inventory item, a change that occurred with a given inventory
* item checkin.
*
*
* .opencannabis.inventory.InventoryCoordinates coordinates = 2;
*/
public io.opencannabis.schema.inventory.InventoryCoordinates.Builder getCoordinatesBuilder() {
onChanged();
return getCoordinatesFieldBuilder().getBuilder();
}
/**
*
* Specifies the new (target) coordinates for a given inventory item, a change that occurred with a given inventory
* item checkin.
*
*
* .opencannabis.inventory.InventoryCoordinates coordinates = 2;
*/
public io.opencannabis.schema.inventory.InventoryCoordinatesOrBuilder getCoordinatesOrBuilder() {
if (coordinatesBuilder_ != null) {
return coordinatesBuilder_.getMessageOrBuilder();
} else {
return coordinates_ == null ?
io.opencannabis.schema.inventory.InventoryCoordinates.getDefaultInstance() : coordinates_;
}
}
/**
*
* Specifies the new (target) coordinates for a given inventory item, a change that occurred with a given inventory
* item checkin.
*
*
* .opencannabis.inventory.InventoryCoordinates coordinates = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.opencannabis.schema.inventory.InventoryCoordinates, io.opencannabis.schema.inventory.InventoryCoordinates.Builder, io.opencannabis.schema.inventory.InventoryCoordinatesOrBuilder>
getCoordinatesFieldBuilder() {
if (coordinatesBuilder_ == null) {
coordinatesBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.opencannabis.schema.inventory.InventoryCoordinates, io.opencannabis.schema.inventory.InventoryCoordinates.Builder, io.opencannabis.schema.inventory.InventoryCoordinatesOrBuilder>(
getCoordinates(),
getParentForChildren(),
isClean());
coordinates_ = null;
}
return coordinatesBuilder_;
}
private boolean fitForSale_ ;
/**
*
* Indicates whether the inventory item is fit for sale, or not. This flag must be set to `true` for an item to be
* eligible for listing.
*
*
* bool fit_for_sale = 3;
*/
public boolean getFitForSale() {
return fitForSale_;
}
/**
*
* Indicates whether the inventory item is fit for sale, or not. This flag must be set to `true` for an item to be
* eligible for listing.
*
*
* bool fit_for_sale = 3;
*/
public Builder setFitForSale(boolean value) {
fitForSale_ = value;
onChanged();
return this;
}
/**
*
* Indicates whether the inventory item is fit for sale, or not. This flag must be set to `true` for an item to be
* eligible for listing.
*
*
* bool fit_for_sale = 3;
*/
public Builder clearFitForSale() {
fitForSale_ = false;
onChanged();
return this;
}
private io.opencannabis.schema.inventory.InventoryAmount amount_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
io.opencannabis.schema.inventory.InventoryAmount, io.opencannabis.schema.inventory.InventoryAmount.Builder, io.opencannabis.schema.inventory.InventoryAmountOrBuilder> amountBuilder_;
/**
*
* Amount of inventory, in this batch, that is on-hand.
*
*
* .opencannabis.inventory.InventoryAmount amount = 4;
*/
public boolean hasAmount() {
return amountBuilder_ != null || amount_ != null;
}
/**
*
* Amount of inventory, in this batch, that is on-hand.
*
*
* .opencannabis.inventory.InventoryAmount amount = 4;
*/
public io.opencannabis.schema.inventory.InventoryAmount getAmount() {
if (amountBuilder_ == null) {
return amount_ == null ? io.opencannabis.schema.inventory.InventoryAmount.getDefaultInstance() : amount_;
} else {
return amountBuilder_.getMessage();
}
}
/**
*
* Amount of inventory, in this batch, that is on-hand.
*
*
* .opencannabis.inventory.InventoryAmount amount = 4;
*/
public Builder setAmount(io.opencannabis.schema.inventory.InventoryAmount value) {
if (amountBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
amount_ = value;
onChanged();
} else {
amountBuilder_.setMessage(value);
}
return this;
}
/**
*
* Amount of inventory, in this batch, that is on-hand.
*
*
* .opencannabis.inventory.InventoryAmount amount = 4;
*/
public Builder setAmount(
io.opencannabis.schema.inventory.InventoryAmount.Builder builderForValue) {
if (amountBuilder_ == null) {
amount_ = builderForValue.build();
onChanged();
} else {
amountBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Amount of inventory, in this batch, that is on-hand.
*
*
* .opencannabis.inventory.InventoryAmount amount = 4;
*/
public Builder mergeAmount(io.opencannabis.schema.inventory.InventoryAmount value) {
if (amountBuilder_ == null) {
if (amount_ != null) {
amount_ =
io.opencannabis.schema.inventory.InventoryAmount.newBuilder(amount_).mergeFrom(value).buildPartial();
} else {
amount_ = value;
}
onChanged();
} else {
amountBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Amount of inventory, in this batch, that is on-hand.
*
*
* .opencannabis.inventory.InventoryAmount amount = 4;
*/
public Builder clearAmount() {
if (amountBuilder_ == null) {
amount_ = null;
onChanged();
} else {
amount_ = null;
amountBuilder_ = null;
}
return this;
}
/**
*
* Amount of inventory, in this batch, that is on-hand.
*
*
* .opencannabis.inventory.InventoryAmount amount = 4;
*/
public io.opencannabis.schema.inventory.InventoryAmount.Builder getAmountBuilder() {
onChanged();
return getAmountFieldBuilder().getBuilder();
}
/**
*
* Amount of inventory, in this batch, that is on-hand.
*
*
* .opencannabis.inventory.InventoryAmount amount = 4;
*/
public io.opencannabis.schema.inventory.InventoryAmountOrBuilder getAmountOrBuilder() {
if (amountBuilder_ != null) {
return amountBuilder_.getMessageOrBuilder();
} else {
return amount_ == null ?
io.opencannabis.schema.inventory.InventoryAmount.getDefaultInstance() : amount_;
}
}
/**
*
* Amount of inventory, in this batch, that is on-hand.
*
*
* .opencannabis.inventory.InventoryAmount amount = 4;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.opencannabis.schema.inventory.InventoryAmount, io.opencannabis.schema.inventory.InventoryAmount.Builder, io.opencannabis.schema.inventory.InventoryAmountOrBuilder>
getAmountFieldBuilder() {
if (amountBuilder_ == null) {
amountBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.opencannabis.schema.inventory.InventoryAmount, io.opencannabis.schema.inventory.InventoryAmount.Builder, io.opencannabis.schema.inventory.InventoryAmountOrBuilder>(
getAmount(),
getParentForChildren(),
isClean());
amount_ = null;
}
return amountBuilder_;
}
private io.opencannabis.schema.temporal.TemporalInstant.Instant created_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
io.opencannabis.schema.temporal.TemporalInstant.Instant, io.opencannabis.schema.temporal.TemporalInstant.Instant.Builder, io.opencannabis.schema.temporal.TemporalInstant.InstantOrBuilder> createdBuilder_;
/**
*
* Timestamp for when this inventory state entry was created. Set after initially saving an inventory state checkin.
*
*
* .opencannabis.temporal.Instant created = 98;
*/
public boolean hasCreated() {
return createdBuilder_ != null || created_ != null;
}
/**
*
* Timestamp for when this inventory state entry was created. Set after initially saving an inventory state checkin.
*
*
* .opencannabis.temporal.Instant created = 98;
*/
public io.opencannabis.schema.temporal.TemporalInstant.Instant getCreated() {
if (createdBuilder_ == null) {
return created_ == null ? io.opencannabis.schema.temporal.TemporalInstant.Instant.getDefaultInstance() : created_;
} else {
return createdBuilder_.getMessage();
}
}
/**
*
* Timestamp for when this inventory state entry was created. Set after initially saving an inventory state checkin.
*
*
* .opencannabis.temporal.Instant created = 98;
*/
public Builder setCreated(io.opencannabis.schema.temporal.TemporalInstant.Instant value) {
if (createdBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
created_ = value;
onChanged();
} else {
createdBuilder_.setMessage(value);
}
return this;
}
/**
*
* Timestamp for when this inventory state entry was created. Set after initially saving an inventory state checkin.
*
*
* .opencannabis.temporal.Instant created = 98;
*/
public Builder setCreated(
io.opencannabis.schema.temporal.TemporalInstant.Instant.Builder builderForValue) {
if (createdBuilder_ == null) {
created_ = builderForValue.build();
onChanged();
} else {
createdBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Timestamp for when this inventory state entry was created. Set after initially saving an inventory state checkin.
*
*
* .opencannabis.temporal.Instant created = 98;
*/
public Builder mergeCreated(io.opencannabis.schema.temporal.TemporalInstant.Instant value) {
if (createdBuilder_ == null) {
if (created_ != null) {
created_ =
io.opencannabis.schema.temporal.TemporalInstant.Instant.newBuilder(created_).mergeFrom(value).buildPartial();
} else {
created_ = value;
}
onChanged();
} else {
createdBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Timestamp for when this inventory state entry was created. Set after initially saving an inventory state checkin.
*
*
* .opencannabis.temporal.Instant created = 98;
*/
public Builder clearCreated() {
if (createdBuilder_ == null) {
created_ = null;
onChanged();
} else {
created_ = null;
createdBuilder_ = null;
}
return this;
}
/**
*
* Timestamp for when this inventory state entry was created. Set after initially saving an inventory state checkin.
*
*
* .opencannabis.temporal.Instant created = 98;
*/
public io.opencannabis.schema.temporal.TemporalInstant.Instant.Builder getCreatedBuilder() {
onChanged();
return getCreatedFieldBuilder().getBuilder();
}
/**
*
* Timestamp for when this inventory state entry was created. Set after initially saving an inventory state checkin.
*
*
* .opencannabis.temporal.Instant created = 98;
*/
public io.opencannabis.schema.temporal.TemporalInstant.InstantOrBuilder getCreatedOrBuilder() {
if (createdBuilder_ != null) {
return createdBuilder_.getMessageOrBuilder();
} else {
return created_ == null ?
io.opencannabis.schema.temporal.TemporalInstant.Instant.getDefaultInstance() : created_;
}
}
/**
*
* Timestamp for when this inventory state entry was created. Set after initially saving an inventory state checkin.
*
*
* .opencannabis.temporal.Instant created = 98;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.opencannabis.schema.temporal.TemporalInstant.Instant, io.opencannabis.schema.temporal.TemporalInstant.Instant.Builder, io.opencannabis.schema.temporal.TemporalInstant.InstantOrBuilder>
getCreatedFieldBuilder() {
if (createdBuilder_ == null) {
createdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.opencannabis.schema.temporal.TemporalInstant.Instant, io.opencannabis.schema.temporal.TemporalInstant.Instant.Builder, io.opencannabis.schema.temporal.TemporalInstant.InstantOrBuilder>(
getCreated(),
getParentForChildren(),
isClean());
created_ = null;
}
return createdBuilder_;
}
private io.opencannabis.schema.temporal.TemporalInstant.Instant modified_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
io.opencannabis.schema.temporal.TemporalInstant.Instant, io.opencannabis.schema.temporal.TemporalInstant.Instant.Builder, io.opencannabis.schema.temporal.TemporalInstant.InstantOrBuilder> modifiedBuilder_;
/**
*
* Timestamp for when this inventory state entry was updated, if applicable. Set after saving an existing inventory
* state checkin.
*
*
* .opencannabis.temporal.Instant modified = 99;
*/
public boolean hasModified() {
return modifiedBuilder_ != null || modified_ != null;
}
/**
*
* Timestamp for when this inventory state entry was updated, if applicable. Set after saving an existing inventory
* state checkin.
*
*
* .opencannabis.temporal.Instant modified = 99;
*/
public io.opencannabis.schema.temporal.TemporalInstant.Instant getModified() {
if (modifiedBuilder_ == null) {
return modified_ == null ? io.opencannabis.schema.temporal.TemporalInstant.Instant.getDefaultInstance() : modified_;
} else {
return modifiedBuilder_.getMessage();
}
}
/**
*
* Timestamp for when this inventory state entry was updated, if applicable. Set after saving an existing inventory
* state checkin.
*
*
* .opencannabis.temporal.Instant modified = 99;
*/
public Builder setModified(io.opencannabis.schema.temporal.TemporalInstant.Instant value) {
if (modifiedBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
modified_ = value;
onChanged();
} else {
modifiedBuilder_.setMessage(value);
}
return this;
}
/**
*
* Timestamp for when this inventory state entry was updated, if applicable. Set after saving an existing inventory
* state checkin.
*
*
* .opencannabis.temporal.Instant modified = 99;
*/
public Builder setModified(
io.opencannabis.schema.temporal.TemporalInstant.Instant.Builder builderForValue) {
if (modifiedBuilder_ == null) {
modified_ = builderForValue.build();
onChanged();
} else {
modifiedBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Timestamp for when this inventory state entry was updated, if applicable. Set after saving an existing inventory
* state checkin.
*
*
* .opencannabis.temporal.Instant modified = 99;
*/
public Builder mergeModified(io.opencannabis.schema.temporal.TemporalInstant.Instant value) {
if (modifiedBuilder_ == null) {
if (modified_ != null) {
modified_ =
io.opencannabis.schema.temporal.TemporalInstant.Instant.newBuilder(modified_).mergeFrom(value).buildPartial();
} else {
modified_ = value;
}
onChanged();
} else {
modifiedBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Timestamp for when this inventory state entry was updated, if applicable. Set after saving an existing inventory
* state checkin.
*
*
* .opencannabis.temporal.Instant modified = 99;
*/
public Builder clearModified() {
if (modifiedBuilder_ == null) {
modified_ = null;
onChanged();
} else {
modified_ = null;
modifiedBuilder_ = null;
}
return this;
}
/**
*
* Timestamp for when this inventory state entry was updated, if applicable. Set after saving an existing inventory
* state checkin.
*
*
* .opencannabis.temporal.Instant modified = 99;
*/
public io.opencannabis.schema.temporal.TemporalInstant.Instant.Builder getModifiedBuilder() {
onChanged();
return getModifiedFieldBuilder().getBuilder();
}
/**
*
* Timestamp for when this inventory state entry was updated, if applicable. Set after saving an existing inventory
* state checkin.
*
*
* .opencannabis.temporal.Instant modified = 99;
*/
public io.opencannabis.schema.temporal.TemporalInstant.InstantOrBuilder getModifiedOrBuilder() {
if (modifiedBuilder_ != null) {
return modifiedBuilder_.getMessageOrBuilder();
} else {
return modified_ == null ?
io.opencannabis.schema.temporal.TemporalInstant.Instant.getDefaultInstance() : modified_;
}
}
/**
*
* Timestamp for when this inventory state entry was updated, if applicable. Set after saving an existing inventory
* state checkin.
*
*
* .opencannabis.temporal.Instant modified = 99;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.opencannabis.schema.temporal.TemporalInstant.Instant, io.opencannabis.schema.temporal.TemporalInstant.Instant.Builder, io.opencannabis.schema.temporal.TemporalInstant.InstantOrBuilder>
getModifiedFieldBuilder() {
if (modifiedBuilder_ == null) {
modifiedBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.opencannabis.schema.temporal.TemporalInstant.Instant, io.opencannabis.schema.temporal.TemporalInstant.Instant.Builder, io.opencannabis.schema.temporal.TemporalInstant.InstantOrBuilder>(
getModified(),
getParentForChildren(),
isClean());
modified_ = null;
}
return modifiedBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:opencannabis.inventory.InventoryState)
}
// @@protoc_insertion_point(class_scope:opencannabis.inventory.InventoryState)
private static final io.opencannabis.schema.inventory.InventoryState DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.opencannabis.schema.inventory.InventoryState();
}
public static io.opencannabis.schema.inventory.InventoryState getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public InventoryState parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new InventoryState(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.inventory.InventoryState getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy