
io.opencannabis.schema.inventory.InventoryLocation 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/InventoryLocation.proto
package io.opencannabis.schema.inventory;
/**
*
* Specifies the notion of a concrete location that handles or stores inventory.
*
*
* Protobuf type {@code opencannabis.inventory.InventoryLocation}
*/
public final class InventoryLocation extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:opencannabis.inventory.InventoryLocation)
InventoryLocationOrBuilder {
private static final long serialVersionUID = 0L;
// Use InventoryLocation.newBuilder() to construct.
private InventoryLocation(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private InventoryLocation() {
type_ = 0;
name_ = "";
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private InventoryLocation(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
io.opencannabis.schema.inventory.InventoryLocationKey.Builder subBuilder = null;
if (key_ != null) {
subBuilder = key_.toBuilder();
}
key_ = input.readMessage(io.opencannabis.schema.inventory.InventoryLocationKey.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(key_);
key_ = subBuilder.buildPartial();
}
break;
}
case 16: {
int rawValue = input.readEnum();
type_ = rawValue;
break;
}
case 26: {
java.lang.String s = input.readStringRequireUtf8();
name_ = s;
break;
}
case 34: {
io.opencannabis.schema.contact.GenericContact.ContactInfo.Builder subBuilder = null;
if (contact_ != null) {
subBuilder = contact_.toBuilder();
}
contact_ = input.readMessage(io.opencannabis.schema.contact.GenericContact.ContactInfo.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(contact_);
contact_ = subBuilder.buildPartial();
}
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.opencannabis.schema.inventory.InventoryLocationOuterClass.internal_static_opencannabis_inventory_InventoryLocation_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.opencannabis.schema.inventory.InventoryLocationOuterClass.internal_static_opencannabis_inventory_InventoryLocation_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.opencannabis.schema.inventory.InventoryLocation.class, io.opencannabis.schema.inventory.InventoryLocation.Builder.class);
}
public static final int KEY_FIELD_NUMBER = 1;
private io.opencannabis.schema.inventory.InventoryLocationKey key_;
/**
*
* Key representing this inventory location.
*
*
* .opencannabis.inventory.InventoryLocationKey key = 1 [(.core.field) = { ... }
*/
public boolean hasKey() {
return key_ != null;
}
/**
*
* Key representing this inventory location.
*
*
* .opencannabis.inventory.InventoryLocationKey key = 1 [(.core.field) = { ... }
*/
public io.opencannabis.schema.inventory.InventoryLocationKey getKey() {
return key_ == null ? io.opencannabis.schema.inventory.InventoryLocationKey.getDefaultInstance() : key_;
}
/**
*
* Key representing this inventory location.
*
*
* .opencannabis.inventory.InventoryLocationKey key = 1 [(.core.field) = { ... }
*/
public io.opencannabis.schema.inventory.InventoryLocationKeyOrBuilder getKeyOrBuilder() {
return getKey();
}
public static final int TYPE_FIELD_NUMBER = 2;
private int type_;
/**
*
* Specifies the type of this inventory location.
*
*
* .opencannabis.inventory.InventoryLocationType type = 2;
*/
public int getTypeValue() {
return type_;
}
/**
*
* Specifies the type of this inventory location.
*
*
* .opencannabis.inventory.InventoryLocationType type = 2;
*/
public io.opencannabis.schema.inventory.InventoryLocationType getType() {
@SuppressWarnings("deprecation")
io.opencannabis.schema.inventory.InventoryLocationType result = io.opencannabis.schema.inventory.InventoryLocationType.valueOf(type_);
return result == null ? io.opencannabis.schema.inventory.InventoryLocationType.UNRECOGNIZED : result;
}
public static final int NAME_FIELD_NUMBER = 3;
private volatile java.lang.Object name_;
/**
*
* Human-readable label for this location.
*
*
* string name = 3;
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
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();
name_ = s;
return s;
}
}
/**
*
* Human-readable label for this location.
*
*
* string name = 3;
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int CONTACT_FIELD_NUMBER = 4;
private io.opencannabis.schema.contact.GenericContact.ContactInfo contact_;
/**
*
* Physical and digital contact and location info.
*
*
* .opencannabis.contact.ContactInfo contact = 4;
*/
public boolean hasContact() {
return contact_ != null;
}
/**
*
* Physical and digital contact and location info.
*
*
* .opencannabis.contact.ContactInfo contact = 4;
*/
public io.opencannabis.schema.contact.GenericContact.ContactInfo getContact() {
return contact_ == null ? io.opencannabis.schema.contact.GenericContact.ContactInfo.getDefaultInstance() : contact_;
}
/**
*
* Physical and digital contact and location info.
*
*
* .opencannabis.contact.ContactInfo contact = 4;
*/
public io.opencannabis.schema.contact.GenericContact.ContactInfoOrBuilder getContactOrBuilder() {
return getContact();
}
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 (key_ != null) {
output.writeMessage(1, getKey());
}
if (type_ != io.opencannabis.schema.inventory.InventoryLocationType.RETAIL.getNumber()) {
output.writeEnum(2, type_);
}
if (!getNameBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, name_);
}
if (contact_ != null) {
output.writeMessage(4, getContact());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (key_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getKey());
}
if (type_ != io.opencannabis.schema.inventory.InventoryLocationType.RETAIL.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(2, type_);
}
if (!getNameBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, name_);
}
if (contact_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getContact());
}
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.InventoryLocation)) {
return super.equals(obj);
}
io.opencannabis.schema.inventory.InventoryLocation other = (io.opencannabis.schema.inventory.InventoryLocation) obj;
if (hasKey() != other.hasKey()) return false;
if (hasKey()) {
if (!getKey()
.equals(other.getKey())) return false;
}
if (type_ != other.type_) return false;
if (!getName()
.equals(other.getName())) return false;
if (hasContact() != other.hasContact()) return false;
if (hasContact()) {
if (!getContact()
.equals(other.getContact())) return false;
}
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasKey()) {
hash = (37 * hash) + KEY_FIELD_NUMBER;
hash = (53 * hash) + getKey().hashCode();
}
hash = (37 * hash) + TYPE_FIELD_NUMBER;
hash = (53 * hash) + type_;
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
if (hasContact()) {
hash = (37 * hash) + CONTACT_FIELD_NUMBER;
hash = (53 * hash) + getContact().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.opencannabis.schema.inventory.InventoryLocation parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.opencannabis.schema.inventory.InventoryLocation 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.InventoryLocation parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.opencannabis.schema.inventory.InventoryLocation 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.InventoryLocation parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.opencannabis.schema.inventory.InventoryLocation parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.opencannabis.schema.inventory.InventoryLocation parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.opencannabis.schema.inventory.InventoryLocation 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.InventoryLocation parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.opencannabis.schema.inventory.InventoryLocation 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.InventoryLocation parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.opencannabis.schema.inventory.InventoryLocation 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.InventoryLocation 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 notion of a concrete location that handles or stores inventory.
*
*
* Protobuf type {@code opencannabis.inventory.InventoryLocation}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:opencannabis.inventory.InventoryLocation)
io.opencannabis.schema.inventory.InventoryLocationOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.opencannabis.schema.inventory.InventoryLocationOuterClass.internal_static_opencannabis_inventory_InventoryLocation_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.opencannabis.schema.inventory.InventoryLocationOuterClass.internal_static_opencannabis_inventory_InventoryLocation_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.opencannabis.schema.inventory.InventoryLocation.class, io.opencannabis.schema.inventory.InventoryLocation.Builder.class);
}
// Construct using io.opencannabis.schema.inventory.InventoryLocation.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (keyBuilder_ == null) {
key_ = null;
} else {
key_ = null;
keyBuilder_ = null;
}
type_ = 0;
name_ = "";
if (contactBuilder_ == null) {
contact_ = null;
} else {
contact_ = null;
contactBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.opencannabis.schema.inventory.InventoryLocationOuterClass.internal_static_opencannabis_inventory_InventoryLocation_descriptor;
}
@java.lang.Override
public io.opencannabis.schema.inventory.InventoryLocation getDefaultInstanceForType() {
return io.opencannabis.schema.inventory.InventoryLocation.getDefaultInstance();
}
@java.lang.Override
public io.opencannabis.schema.inventory.InventoryLocation build() {
io.opencannabis.schema.inventory.InventoryLocation result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.opencannabis.schema.inventory.InventoryLocation buildPartial() {
io.opencannabis.schema.inventory.InventoryLocation result = new io.opencannabis.schema.inventory.InventoryLocation(this);
if (keyBuilder_ == null) {
result.key_ = key_;
} else {
result.key_ = keyBuilder_.build();
}
result.type_ = type_;
result.name_ = name_;
if (contactBuilder_ == null) {
result.contact_ = contact_;
} else {
result.contact_ = contactBuilder_.build();
}
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof io.opencannabis.schema.inventory.InventoryLocation) {
return mergeFrom((io.opencannabis.schema.inventory.InventoryLocation)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.opencannabis.schema.inventory.InventoryLocation other) {
if (other == io.opencannabis.schema.inventory.InventoryLocation.getDefaultInstance()) return this;
if (other.hasKey()) {
mergeKey(other.getKey());
}
if (other.type_ != 0) {
setTypeValue(other.getTypeValue());
}
if (!other.getName().isEmpty()) {
name_ = other.name_;
onChanged();
}
if (other.hasContact()) {
mergeContact(other.getContact());
}
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.InventoryLocation parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.opencannabis.schema.inventory.InventoryLocation) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private io.opencannabis.schema.inventory.InventoryLocationKey key_;
private com.google.protobuf.SingleFieldBuilderV3<
io.opencannabis.schema.inventory.InventoryLocationKey, io.opencannabis.schema.inventory.InventoryLocationKey.Builder, io.opencannabis.schema.inventory.InventoryLocationKeyOrBuilder> keyBuilder_;
/**
*
* Key representing this inventory location.
*
*
* .opencannabis.inventory.InventoryLocationKey key = 1 [(.core.field) = { ... }
*/
public boolean hasKey() {
return keyBuilder_ != null || key_ != null;
}
/**
*
* Key representing this inventory location.
*
*
* .opencannabis.inventory.InventoryLocationKey key = 1 [(.core.field) = { ... }
*/
public io.opencannabis.schema.inventory.InventoryLocationKey getKey() {
if (keyBuilder_ == null) {
return key_ == null ? io.opencannabis.schema.inventory.InventoryLocationKey.getDefaultInstance() : key_;
} else {
return keyBuilder_.getMessage();
}
}
/**
*
* Key representing this inventory location.
*
*
* .opencannabis.inventory.InventoryLocationKey key = 1 [(.core.field) = { ... }
*/
public Builder setKey(io.opencannabis.schema.inventory.InventoryLocationKey value) {
if (keyBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
key_ = value;
onChanged();
} else {
keyBuilder_.setMessage(value);
}
return this;
}
/**
*
* Key representing this inventory location.
*
*
* .opencannabis.inventory.InventoryLocationKey key = 1 [(.core.field) = { ... }
*/
public Builder setKey(
io.opencannabis.schema.inventory.InventoryLocationKey.Builder builderForValue) {
if (keyBuilder_ == null) {
key_ = builderForValue.build();
onChanged();
} else {
keyBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Key representing this inventory location.
*
*
* .opencannabis.inventory.InventoryLocationKey key = 1 [(.core.field) = { ... }
*/
public Builder mergeKey(io.opencannabis.schema.inventory.InventoryLocationKey value) {
if (keyBuilder_ == null) {
if (key_ != null) {
key_ =
io.opencannabis.schema.inventory.InventoryLocationKey.newBuilder(key_).mergeFrom(value).buildPartial();
} else {
key_ = value;
}
onChanged();
} else {
keyBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Key representing this inventory location.
*
*
* .opencannabis.inventory.InventoryLocationKey key = 1 [(.core.field) = { ... }
*/
public Builder clearKey() {
if (keyBuilder_ == null) {
key_ = null;
onChanged();
} else {
key_ = null;
keyBuilder_ = null;
}
return this;
}
/**
*
* Key representing this inventory location.
*
*
* .opencannabis.inventory.InventoryLocationKey key = 1 [(.core.field) = { ... }
*/
public io.opencannabis.schema.inventory.InventoryLocationKey.Builder getKeyBuilder() {
onChanged();
return getKeyFieldBuilder().getBuilder();
}
/**
*
* Key representing this inventory location.
*
*
* .opencannabis.inventory.InventoryLocationKey key = 1 [(.core.field) = { ... }
*/
public io.opencannabis.schema.inventory.InventoryLocationKeyOrBuilder getKeyOrBuilder() {
if (keyBuilder_ != null) {
return keyBuilder_.getMessageOrBuilder();
} else {
return key_ == null ?
io.opencannabis.schema.inventory.InventoryLocationKey.getDefaultInstance() : key_;
}
}
/**
*
* Key representing this inventory location.
*
*
* .opencannabis.inventory.InventoryLocationKey key = 1 [(.core.field) = { ... }
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.opencannabis.schema.inventory.InventoryLocationKey, io.opencannabis.schema.inventory.InventoryLocationKey.Builder, io.opencannabis.schema.inventory.InventoryLocationKeyOrBuilder>
getKeyFieldBuilder() {
if (keyBuilder_ == null) {
keyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.opencannabis.schema.inventory.InventoryLocationKey, io.opencannabis.schema.inventory.InventoryLocationKey.Builder, io.opencannabis.schema.inventory.InventoryLocationKeyOrBuilder>(
getKey(),
getParentForChildren(),
isClean());
key_ = null;
}
return keyBuilder_;
}
private int type_ = 0;
/**
*
* Specifies the type of this inventory location.
*
*
* .opencannabis.inventory.InventoryLocationType type = 2;
*/
public int getTypeValue() {
return type_;
}
/**
*
* Specifies the type of this inventory location.
*
*
* .opencannabis.inventory.InventoryLocationType type = 2;
*/
public Builder setTypeValue(int value) {
type_ = value;
onChanged();
return this;
}
/**
*
* Specifies the type of this inventory location.
*
*
* .opencannabis.inventory.InventoryLocationType type = 2;
*/
public io.opencannabis.schema.inventory.InventoryLocationType getType() {
@SuppressWarnings("deprecation")
io.opencannabis.schema.inventory.InventoryLocationType result = io.opencannabis.schema.inventory.InventoryLocationType.valueOf(type_);
return result == null ? io.opencannabis.schema.inventory.InventoryLocationType.UNRECOGNIZED : result;
}
/**
*
* Specifies the type of this inventory location.
*
*
* .opencannabis.inventory.InventoryLocationType type = 2;
*/
public Builder setType(io.opencannabis.schema.inventory.InventoryLocationType value) {
if (value == null) {
throw new NullPointerException();
}
type_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Specifies the type of this inventory location.
*
*
* .opencannabis.inventory.InventoryLocationType type = 2;
*/
public Builder clearType() {
type_ = 0;
onChanged();
return this;
}
private java.lang.Object name_ = "";
/**
*
* Human-readable label for this location.
*
*
* string name = 3;
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Human-readable label for this location.
*
*
* string name = 3;
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Human-readable label for this location.
*
*
* string name = 3;
*/
public Builder setName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
name_ = value;
onChanged();
return this;
}
/**
*
* Human-readable label for this location.
*
*
* string name = 3;
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
onChanged();
return this;
}
/**
*
* Human-readable label for this location.
*
*
* string name = 3;
*/
public Builder setNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
name_ = value;
onChanged();
return this;
}
private io.opencannabis.schema.contact.GenericContact.ContactInfo contact_;
private com.google.protobuf.SingleFieldBuilderV3<
io.opencannabis.schema.contact.GenericContact.ContactInfo, io.opencannabis.schema.contact.GenericContact.ContactInfo.Builder, io.opencannabis.schema.contact.GenericContact.ContactInfoOrBuilder> contactBuilder_;
/**
*
* Physical and digital contact and location info.
*
*
* .opencannabis.contact.ContactInfo contact = 4;
*/
public boolean hasContact() {
return contactBuilder_ != null || contact_ != null;
}
/**
*
* Physical and digital contact and location info.
*
*
* .opencannabis.contact.ContactInfo contact = 4;
*/
public io.opencannabis.schema.contact.GenericContact.ContactInfo getContact() {
if (contactBuilder_ == null) {
return contact_ == null ? io.opencannabis.schema.contact.GenericContact.ContactInfo.getDefaultInstance() : contact_;
} else {
return contactBuilder_.getMessage();
}
}
/**
*
* Physical and digital contact and location info.
*
*
* .opencannabis.contact.ContactInfo contact = 4;
*/
public Builder setContact(io.opencannabis.schema.contact.GenericContact.ContactInfo value) {
if (contactBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
contact_ = value;
onChanged();
} else {
contactBuilder_.setMessage(value);
}
return this;
}
/**
*
* Physical and digital contact and location info.
*
*
* .opencannabis.contact.ContactInfo contact = 4;
*/
public Builder setContact(
io.opencannabis.schema.contact.GenericContact.ContactInfo.Builder builderForValue) {
if (contactBuilder_ == null) {
contact_ = builderForValue.build();
onChanged();
} else {
contactBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Physical and digital contact and location info.
*
*
* .opencannabis.contact.ContactInfo contact = 4;
*/
public Builder mergeContact(io.opencannabis.schema.contact.GenericContact.ContactInfo value) {
if (contactBuilder_ == null) {
if (contact_ != null) {
contact_ =
io.opencannabis.schema.contact.GenericContact.ContactInfo.newBuilder(contact_).mergeFrom(value).buildPartial();
} else {
contact_ = value;
}
onChanged();
} else {
contactBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Physical and digital contact and location info.
*
*
* .opencannabis.contact.ContactInfo contact = 4;
*/
public Builder clearContact() {
if (contactBuilder_ == null) {
contact_ = null;
onChanged();
} else {
contact_ = null;
contactBuilder_ = null;
}
return this;
}
/**
*
* Physical and digital contact and location info.
*
*
* .opencannabis.contact.ContactInfo contact = 4;
*/
public io.opencannabis.schema.contact.GenericContact.ContactInfo.Builder getContactBuilder() {
onChanged();
return getContactFieldBuilder().getBuilder();
}
/**
*
* Physical and digital contact and location info.
*
*
* .opencannabis.contact.ContactInfo contact = 4;
*/
public io.opencannabis.schema.contact.GenericContact.ContactInfoOrBuilder getContactOrBuilder() {
if (contactBuilder_ != null) {
return contactBuilder_.getMessageOrBuilder();
} else {
return contact_ == null ?
io.opencannabis.schema.contact.GenericContact.ContactInfo.getDefaultInstance() : contact_;
}
}
/**
*
* Physical and digital contact and location info.
*
*
* .opencannabis.contact.ContactInfo contact = 4;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.opencannabis.schema.contact.GenericContact.ContactInfo, io.opencannabis.schema.contact.GenericContact.ContactInfo.Builder, io.opencannabis.schema.contact.GenericContact.ContactInfoOrBuilder>
getContactFieldBuilder() {
if (contactBuilder_ == null) {
contactBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.opencannabis.schema.contact.GenericContact.ContactInfo, io.opencannabis.schema.contact.GenericContact.ContactInfo.Builder, io.opencannabis.schema.contact.GenericContact.ContactInfoOrBuilder>(
getContact(),
getParentForChildren(),
isClean());
contact_ = null;
}
return contactBuilder_;
}
@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.InventoryLocation)
}
// @@protoc_insertion_point(class_scope:opencannabis.inventory.InventoryLocation)
private static final io.opencannabis.schema.inventory.InventoryLocation DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.opencannabis.schema.inventory.InventoryLocation();
}
public static io.opencannabis.schema.inventory.InventoryLocation getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public InventoryLocation parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new InventoryLocation(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.InventoryLocation getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy