
io.opencannabis.schema.inventory.InventoryCoordinates 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: inventory/InventoryProduct.proto
package io.opencannabis.schema.inventory;
/**
*
* Structured information specifying a location where an inventory product can exist. Sets of coordinates are generated
* or resolved when an inventory item is created or allocated, and further updated as the inventory item moves through
* process or physically moves around. How inventory coordinates are used entirely depends on how a partner wants to use
* them, with varying degrees of specificity possible.
*
*
* Protobuf type {@code opencannabis.inventory.InventoryCoordinates}
*/
public final class InventoryCoordinates extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:opencannabis.inventory.InventoryCoordinates)
InventoryCoordinatesOrBuilder {
private static final long serialVersionUID = 0L;
// Use InventoryCoordinates.newBuilder() to construct.
private InventoryCoordinates(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private InventoryCoordinates() {
location_ = "";
zone_ = "";
rack_ = "";
shelf_ = "";
bin_ = "";
batch_ = "";
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private InventoryCoordinates(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
location_ = s;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
zone_ = s;
break;
}
case 26: {
java.lang.String s = input.readStringRequireUtf8();
rack_ = s;
break;
}
case 34: {
java.lang.String s = input.readStringRequireUtf8();
shelf_ = s;
break;
}
case 42: {
java.lang.String s = input.readStringRequireUtf8();
bin_ = s;
break;
}
case 50: {
java.lang.String s = input.readStringRequireUtf8();
batch_ = s;
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.inventory.InventoryProductOuterClass.internal_static_opencannabis_inventory_InventoryCoordinates_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.opencannabis.schema.inventory.InventoryProductOuterClass.internal_static_opencannabis_inventory_InventoryCoordinates_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.opencannabis.schema.inventory.InventoryCoordinates.class, io.opencannabis.schema.inventory.InventoryCoordinates.Builder.class);
}
public static final int LOCATION_FIELD_NUMBER = 1;
private volatile java.lang.Object location_;
/**
*
* Location code. Specifies a physical location where the inventory product is held. This is the highest-resolution
* property specifying inventory coordinates. Optional.
*
*
* string location = 1;
*/
public java.lang.String getLocation() {
java.lang.Object ref = location_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
location_ = s;
return s;
}
}
/**
*
* Location code. Specifies a physical location where the inventory product is held. This is the highest-resolution
* property specifying inventory coordinates. Optional.
*
*
* string location = 1;
*/
public com.google.protobuf.ByteString
getLocationBytes() {
java.lang.Object ref = location_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
location_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ZONE_FIELD_NUMBER = 2;
private volatile java.lang.Object zone_;
/**
*
* Zone code. This property is usually meant to be nested under the value for `location` - i.e., a zone code inside
* given location code. Optional.
*
*
* string zone = 2;
*/
public java.lang.String getZone() {
java.lang.Object ref = zone_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
zone_ = s;
return s;
}
}
/**
*
* Zone code. This property is usually meant to be nested under the value for `location` - i.e., a zone code inside
* given location code. Optional.
*
*
* string zone = 2;
*/
public com.google.protobuf.ByteString
getZoneBytes() {
java.lang.Object ref = zone_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
zone_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int RACK_FIELD_NUMBER = 3;
private volatile java.lang.Object rack_;
/**
*
* Rack code. This property is optional and is usually meant to be nested under the value for `zone` - i.e., a rack
* code or number is inside a given zone which is inside a given location. Optional.
*
*
* string rack = 3;
*/
public java.lang.String getRack() {
java.lang.Object ref = rack_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
rack_ = s;
return s;
}
}
/**
*
* Rack code. This property is optional and is usually meant to be nested under the value for `zone` - i.e., a rack
* code or number is inside a given zone which is inside a given location. Optional.
*
*
* string rack = 3;
*/
public com.google.protobuf.ByteString
getRackBytes() {
java.lang.Object ref = rack_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
rack_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int SHELF_FIELD_NUMBER = 4;
private volatile java.lang.Object shelf_;
/**
*
* Shelf code. This property is optional and is usually meant to be nested under the value for `rack` - i.e., a shelf
* code or number is inside a given rack which is inside a zone which is inside a location. Optional.
*
*
* string shelf = 4;
*/
public java.lang.String getShelf() {
java.lang.Object ref = shelf_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
shelf_ = s;
return s;
}
}
/**
*
* Shelf code. This property is optional and is usually meant to be nested under the value for `rack` - i.e., a shelf
* code or number is inside a given rack which is inside a zone which is inside a location. Optional.
*
*
* string shelf = 4;
*/
public com.google.protobuf.ByteString
getShelfBytes() {
java.lang.Object ref = shelf_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
shelf_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int BIN_FIELD_NUMBER = 5;
private volatile java.lang.Object bin_;
/**
*
* Bin code. This property is optional and is usually meant to be global, although it may be nested as well if bins
* are anonymous in the target partner system.
*
*
* string bin = 5;
*/
public java.lang.String getBin() {
java.lang.Object ref = bin_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
bin_ = s;
return s;
}
}
/**
*
* Bin code. This property is optional and is usually meant to be global, although it may be nested as well if bins
* are anonymous in the target partner system.
*
*
* string bin = 5;
*/
public com.google.protobuf.ByteString
getBinBytes() {
java.lang.Object ref = bin_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
bin_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int BATCH_FIELD_NUMBER = 6;
private volatile java.lang.Object batch_;
/**
*
* Batch code. Used to correlate test results and other data. Optional. Usually meant to be used as a global property,
* but can be nested under any of the other inventory coordinate values. How this property is used is determined by
* the hosting/invoking/subject partner.
*
*
* string batch = 6;
*/
public java.lang.String getBatch() {
java.lang.Object ref = batch_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
batch_ = s;
return s;
}
}
/**
*
* Batch code. Used to correlate test results and other data. Optional. Usually meant to be used as a global property,
* but can be nested under any of the other inventory coordinate values. How this property is used is determined by
* the hosting/invoking/subject partner.
*
*
* string batch = 6;
*/
public com.google.protobuf.ByteString
getBatchBytes() {
java.lang.Object ref = batch_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
batch_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
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 (!getLocationBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, location_);
}
if (!getZoneBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, zone_);
}
if (!getRackBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, rack_);
}
if (!getShelfBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, shelf_);
}
if (!getBinBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, bin_);
}
if (!getBatchBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 6, batch_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getLocationBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, location_);
}
if (!getZoneBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, zone_);
}
if (!getRackBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, rack_);
}
if (!getShelfBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, shelf_);
}
if (!getBinBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, bin_);
}
if (!getBatchBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, batch_);
}
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.InventoryCoordinates)) {
return super.equals(obj);
}
io.opencannabis.schema.inventory.InventoryCoordinates other = (io.opencannabis.schema.inventory.InventoryCoordinates) obj;
if (!getLocation()
.equals(other.getLocation())) return false;
if (!getZone()
.equals(other.getZone())) return false;
if (!getRack()
.equals(other.getRack())) return false;
if (!getShelf()
.equals(other.getShelf())) return false;
if (!getBin()
.equals(other.getBin())) return false;
if (!getBatch()
.equals(other.getBatch())) 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) + LOCATION_FIELD_NUMBER;
hash = (53 * hash) + getLocation().hashCode();
hash = (37 * hash) + ZONE_FIELD_NUMBER;
hash = (53 * hash) + getZone().hashCode();
hash = (37 * hash) + RACK_FIELD_NUMBER;
hash = (53 * hash) + getRack().hashCode();
hash = (37 * hash) + SHELF_FIELD_NUMBER;
hash = (53 * hash) + getShelf().hashCode();
hash = (37 * hash) + BIN_FIELD_NUMBER;
hash = (53 * hash) + getBin().hashCode();
hash = (37 * hash) + BATCH_FIELD_NUMBER;
hash = (53 * hash) + getBatch().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.opencannabis.schema.inventory.InventoryCoordinates parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.opencannabis.schema.inventory.InventoryCoordinates 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.InventoryCoordinates parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.opencannabis.schema.inventory.InventoryCoordinates 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.InventoryCoordinates parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.opencannabis.schema.inventory.InventoryCoordinates parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.opencannabis.schema.inventory.InventoryCoordinates parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.opencannabis.schema.inventory.InventoryCoordinates 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.InventoryCoordinates parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.opencannabis.schema.inventory.InventoryCoordinates 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.InventoryCoordinates parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.opencannabis.schema.inventory.InventoryCoordinates 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.InventoryCoordinates 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;
}
/**
*
* Structured information specifying a location where an inventory product can exist. Sets of coordinates are generated
* or resolved when an inventory item is created or allocated, and further updated as the inventory item moves through
* process or physically moves around. How inventory coordinates are used entirely depends on how a partner wants to use
* them, with varying degrees of specificity possible.
*
*
* Protobuf type {@code opencannabis.inventory.InventoryCoordinates}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:opencannabis.inventory.InventoryCoordinates)
io.opencannabis.schema.inventory.InventoryCoordinatesOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.opencannabis.schema.inventory.InventoryProductOuterClass.internal_static_opencannabis_inventory_InventoryCoordinates_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.opencannabis.schema.inventory.InventoryProductOuterClass.internal_static_opencannabis_inventory_InventoryCoordinates_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.opencannabis.schema.inventory.InventoryCoordinates.class, io.opencannabis.schema.inventory.InventoryCoordinates.Builder.class);
}
// Construct using io.opencannabis.schema.inventory.InventoryCoordinates.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();
location_ = "";
zone_ = "";
rack_ = "";
shelf_ = "";
bin_ = "";
batch_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.opencannabis.schema.inventory.InventoryProductOuterClass.internal_static_opencannabis_inventory_InventoryCoordinates_descriptor;
}
@java.lang.Override
public io.opencannabis.schema.inventory.InventoryCoordinates getDefaultInstanceForType() {
return io.opencannabis.schema.inventory.InventoryCoordinates.getDefaultInstance();
}
@java.lang.Override
public io.opencannabis.schema.inventory.InventoryCoordinates build() {
io.opencannabis.schema.inventory.InventoryCoordinates result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.opencannabis.schema.inventory.InventoryCoordinates buildPartial() {
io.opencannabis.schema.inventory.InventoryCoordinates result = new io.opencannabis.schema.inventory.InventoryCoordinates(this);
result.location_ = location_;
result.zone_ = zone_;
result.rack_ = rack_;
result.shelf_ = shelf_;
result.bin_ = bin_;
result.batch_ = batch_;
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.inventory.InventoryCoordinates) {
return mergeFrom((io.opencannabis.schema.inventory.InventoryCoordinates)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.opencannabis.schema.inventory.InventoryCoordinates other) {
if (other == io.opencannabis.schema.inventory.InventoryCoordinates.getDefaultInstance()) return this;
if (!other.getLocation().isEmpty()) {
location_ = other.location_;
onChanged();
}
if (!other.getZone().isEmpty()) {
zone_ = other.zone_;
onChanged();
}
if (!other.getRack().isEmpty()) {
rack_ = other.rack_;
onChanged();
}
if (!other.getShelf().isEmpty()) {
shelf_ = other.shelf_;
onChanged();
}
if (!other.getBin().isEmpty()) {
bin_ = other.bin_;
onChanged();
}
if (!other.getBatch().isEmpty()) {
batch_ = other.batch_;
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.inventory.InventoryCoordinates parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.opencannabis.schema.inventory.InventoryCoordinates) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object location_ = "";
/**
*
* Location code. Specifies a physical location where the inventory product is held. This is the highest-resolution
* property specifying inventory coordinates. Optional.
*
*
* string location = 1;
*/
public java.lang.String getLocation() {
java.lang.Object ref = location_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
location_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Location code. Specifies a physical location where the inventory product is held. This is the highest-resolution
* property specifying inventory coordinates. Optional.
*
*
* string location = 1;
*/
public com.google.protobuf.ByteString
getLocationBytes() {
java.lang.Object ref = location_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
location_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Location code. Specifies a physical location where the inventory product is held. This is the highest-resolution
* property specifying inventory coordinates. Optional.
*
*
* string location = 1;
*/
public Builder setLocation(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
location_ = value;
onChanged();
return this;
}
/**
*
* Location code. Specifies a physical location where the inventory product is held. This is the highest-resolution
* property specifying inventory coordinates. Optional.
*
*
* string location = 1;
*/
public Builder clearLocation() {
location_ = getDefaultInstance().getLocation();
onChanged();
return this;
}
/**
*
* Location code. Specifies a physical location where the inventory product is held. This is the highest-resolution
* property specifying inventory coordinates. Optional.
*
*
* string location = 1;
*/
public Builder setLocationBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
location_ = value;
onChanged();
return this;
}
private java.lang.Object zone_ = "";
/**
*
* Zone code. This property is usually meant to be nested under the value for `location` - i.e., a zone code inside
* given location code. Optional.
*
*
* string zone = 2;
*/
public java.lang.String getZone() {
java.lang.Object ref = zone_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
zone_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Zone code. This property is usually meant to be nested under the value for `location` - i.e., a zone code inside
* given location code. Optional.
*
*
* string zone = 2;
*/
public com.google.protobuf.ByteString
getZoneBytes() {
java.lang.Object ref = zone_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
zone_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Zone code. This property is usually meant to be nested under the value for `location` - i.e., a zone code inside
* given location code. Optional.
*
*
* string zone = 2;
*/
public Builder setZone(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
zone_ = value;
onChanged();
return this;
}
/**
*
* Zone code. This property is usually meant to be nested under the value for `location` - i.e., a zone code inside
* given location code. Optional.
*
*
* string zone = 2;
*/
public Builder clearZone() {
zone_ = getDefaultInstance().getZone();
onChanged();
return this;
}
/**
*
* Zone code. This property is usually meant to be nested under the value for `location` - i.e., a zone code inside
* given location code. Optional.
*
*
* string zone = 2;
*/
public Builder setZoneBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
zone_ = value;
onChanged();
return this;
}
private java.lang.Object rack_ = "";
/**
*
* Rack code. This property is optional and is usually meant to be nested under the value for `zone` - i.e., a rack
* code or number is inside a given zone which is inside a given location. Optional.
*
*
* string rack = 3;
*/
public java.lang.String getRack() {
java.lang.Object ref = rack_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
rack_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Rack code. This property is optional and is usually meant to be nested under the value for `zone` - i.e., a rack
* code or number is inside a given zone which is inside a given location. Optional.
*
*
* string rack = 3;
*/
public com.google.protobuf.ByteString
getRackBytes() {
java.lang.Object ref = rack_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
rack_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Rack code. This property is optional and is usually meant to be nested under the value for `zone` - i.e., a rack
* code or number is inside a given zone which is inside a given location. Optional.
*
*
* string rack = 3;
*/
public Builder setRack(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
rack_ = value;
onChanged();
return this;
}
/**
*
* Rack code. This property is optional and is usually meant to be nested under the value for `zone` - i.e., a rack
* code or number is inside a given zone which is inside a given location. Optional.
*
*
* string rack = 3;
*/
public Builder clearRack() {
rack_ = getDefaultInstance().getRack();
onChanged();
return this;
}
/**
*
* Rack code. This property is optional and is usually meant to be nested under the value for `zone` - i.e., a rack
* code or number is inside a given zone which is inside a given location. Optional.
*
*
* string rack = 3;
*/
public Builder setRackBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
rack_ = value;
onChanged();
return this;
}
private java.lang.Object shelf_ = "";
/**
*
* Shelf code. This property is optional and is usually meant to be nested under the value for `rack` - i.e., a shelf
* code or number is inside a given rack which is inside a zone which is inside a location. Optional.
*
*
* string shelf = 4;
*/
public java.lang.String getShelf() {
java.lang.Object ref = shelf_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
shelf_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Shelf code. This property is optional and is usually meant to be nested under the value for `rack` - i.e., a shelf
* code or number is inside a given rack which is inside a zone which is inside a location. Optional.
*
*
* string shelf = 4;
*/
public com.google.protobuf.ByteString
getShelfBytes() {
java.lang.Object ref = shelf_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
shelf_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Shelf code. This property is optional and is usually meant to be nested under the value for `rack` - i.e., a shelf
* code or number is inside a given rack which is inside a zone which is inside a location. Optional.
*
*
* string shelf = 4;
*/
public Builder setShelf(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
shelf_ = value;
onChanged();
return this;
}
/**
*
* Shelf code. This property is optional and is usually meant to be nested under the value for `rack` - i.e., a shelf
* code or number is inside a given rack which is inside a zone which is inside a location. Optional.
*
*
* string shelf = 4;
*/
public Builder clearShelf() {
shelf_ = getDefaultInstance().getShelf();
onChanged();
return this;
}
/**
*
* Shelf code. This property is optional and is usually meant to be nested under the value for `rack` - i.e., a shelf
* code or number is inside a given rack which is inside a zone which is inside a location. Optional.
*
*
* string shelf = 4;
*/
public Builder setShelfBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
shelf_ = value;
onChanged();
return this;
}
private java.lang.Object bin_ = "";
/**
*
* Bin code. This property is optional and is usually meant to be global, although it may be nested as well if bins
* are anonymous in the target partner system.
*
*
* string bin = 5;
*/
public java.lang.String getBin() {
java.lang.Object ref = bin_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
bin_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Bin code. This property is optional and is usually meant to be global, although it may be nested as well if bins
* are anonymous in the target partner system.
*
*
* string bin = 5;
*/
public com.google.protobuf.ByteString
getBinBytes() {
java.lang.Object ref = bin_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
bin_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Bin code. This property is optional and is usually meant to be global, although it may be nested as well if bins
* are anonymous in the target partner system.
*
*
* string bin = 5;
*/
public Builder setBin(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bin_ = value;
onChanged();
return this;
}
/**
*
* Bin code. This property is optional and is usually meant to be global, although it may be nested as well if bins
* are anonymous in the target partner system.
*
*
* string bin = 5;
*/
public Builder clearBin() {
bin_ = getDefaultInstance().getBin();
onChanged();
return this;
}
/**
*
* Bin code. This property is optional and is usually meant to be global, although it may be nested as well if bins
* are anonymous in the target partner system.
*
*
* string bin = 5;
*/
public Builder setBinBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
bin_ = value;
onChanged();
return this;
}
private java.lang.Object batch_ = "";
/**
*
* Batch code. Used to correlate test results and other data. Optional. Usually meant to be used as a global property,
* but can be nested under any of the other inventory coordinate values. How this property is used is determined by
* the hosting/invoking/subject partner.
*
*
* string batch = 6;
*/
public java.lang.String getBatch() {
java.lang.Object ref = batch_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
batch_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Batch code. Used to correlate test results and other data. Optional. Usually meant to be used as a global property,
* but can be nested under any of the other inventory coordinate values. How this property is used is determined by
* the hosting/invoking/subject partner.
*
*
* string batch = 6;
*/
public com.google.protobuf.ByteString
getBatchBytes() {
java.lang.Object ref = batch_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
batch_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Batch code. Used to correlate test results and other data. Optional. Usually meant to be used as a global property,
* but can be nested under any of the other inventory coordinate values. How this property is used is determined by
* the hosting/invoking/subject partner.
*
*
* string batch = 6;
*/
public Builder setBatch(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
batch_ = value;
onChanged();
return this;
}
/**
*
* Batch code. Used to correlate test results and other data. Optional. Usually meant to be used as a global property,
* but can be nested under any of the other inventory coordinate values. How this property is used is determined by
* the hosting/invoking/subject partner.
*
*
* string batch = 6;
*/
public Builder clearBatch() {
batch_ = getDefaultInstance().getBatch();
onChanged();
return this;
}
/**
*
* Batch code. Used to correlate test results and other data. Optional. Usually meant to be used as a global property,
* but can be nested under any of the other inventory coordinate values. How this property is used is determined by
* the hosting/invoking/subject partner.
*
*
* string batch = 6;
*/
public Builder setBatchBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
batch_ = 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.inventory.InventoryCoordinates)
}
// @@protoc_insertion_point(class_scope:opencannabis.inventory.InventoryCoordinates)
private static final io.opencannabis.schema.inventory.InventoryCoordinates DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.opencannabis.schema.inventory.InventoryCoordinates();
}
public static io.opencannabis.schema.inventory.InventoryCoordinates getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public InventoryCoordinates parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new InventoryCoordinates(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.InventoryCoordinates getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy