io.opencannabis.schema.base.BaseProductKey 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: base/ProductKey.proto
package io.opencannabis.schema.base;
public final class BaseProductKey {
private BaseProductKey() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistryLite registry) {
}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
registerAllExtensions(
(com.google.protobuf.ExtensionRegistryLite) registry);
}
public interface ProductReferenceOrBuilder extends
// @@protoc_insertion_point(interface_extends:opencannabis.base.ProductReference)
com.google.protobuf.MessageOrBuilder {
/**
*
* Specifies the name of a product.
*
*
* .opencannabis.content.Name name = 1 [(.gen_bq_schema.description) = "Specifies the name of a product."];
*/
boolean hasName();
/**
*
* Specifies the name of a product.
*
*
* .opencannabis.content.Name name = 1 [(.gen_bq_schema.description) = "Specifies the name of a product."];
*/
io.opencannabis.schema.content.NameContent.Name getName();
/**
*
* Specifies the name of a product.
*
*
* .opencannabis.content.Name name = 1 [(.gen_bq_schema.description) = "Specifies the name of a product."];
*/
io.opencannabis.schema.content.NameContent.NameOrBuilder getNameOrBuilder();
/**
*
* Specifies the key, if known, of a product.
*
*
* .opencannabis.base.ProductKey key = 2 [(.gen_bq_schema.description) = "Specifies the key, if known, of a product."];
*/
boolean hasKey();
/**
*
* Specifies the key, if known, of a product.
*
*
* .opencannabis.base.ProductKey key = 2 [(.gen_bq_schema.description) = "Specifies the key, if known, of a product."];
*/
io.opencannabis.schema.base.BaseProductKey.ProductKey getKey();
/**
*
* Specifies the key, if known, of a product.
*
*
* .opencannabis.base.ProductKey key = 2 [(.gen_bq_schema.description) = "Specifies the key, if known, of a product."];
*/
io.opencannabis.schema.base.BaseProductKey.ProductKeyOrBuilder getKeyOrBuilder();
}
/**
*
* Specifies a reference to a product.
*
*
* Protobuf type {@code opencannabis.base.ProductReference}
*/
public static final class ProductReference extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:opencannabis.base.ProductReference)
ProductReferenceOrBuilder {
private static final long serialVersionUID = 0L;
// Use ProductReference.newBuilder() to construct.
private ProductReference(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ProductReference() {
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private ProductReference(
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.content.NameContent.Name.Builder subBuilder = null;
if (name_ != null) {
subBuilder = name_.toBuilder();
}
name_ = input.readMessage(io.opencannabis.schema.content.NameContent.Name.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(name_);
name_ = subBuilder.buildPartial();
}
break;
}
case 18: {
io.opencannabis.schema.base.BaseProductKey.ProductKey.Builder subBuilder = null;
if (key_ != null) {
subBuilder = key_.toBuilder();
}
key_ = input.readMessage(io.opencannabis.schema.base.BaseProductKey.ProductKey.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(key_);
key_ = 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.base.BaseProductKey.internal_static_opencannabis_base_ProductReference_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.opencannabis.schema.base.BaseProductKey.internal_static_opencannabis_base_ProductReference_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.opencannabis.schema.base.BaseProductKey.ProductReference.class, io.opencannabis.schema.base.BaseProductKey.ProductReference.Builder.class);
}
public static final int NAME_FIELD_NUMBER = 1;
private io.opencannabis.schema.content.NameContent.Name name_;
/**
*
* Specifies the name of a product.
*
*
* .opencannabis.content.Name name = 1 [(.gen_bq_schema.description) = "Specifies the name of a product."];
*/
public boolean hasName() {
return name_ != null;
}
/**
*
* Specifies the name of a product.
*
*
* .opencannabis.content.Name name = 1 [(.gen_bq_schema.description) = "Specifies the name of a product."];
*/
public io.opencannabis.schema.content.NameContent.Name getName() {
return name_ == null ? io.opencannabis.schema.content.NameContent.Name.getDefaultInstance() : name_;
}
/**
*
* Specifies the name of a product.
*
*
* .opencannabis.content.Name name = 1 [(.gen_bq_schema.description) = "Specifies the name of a product."];
*/
public io.opencannabis.schema.content.NameContent.NameOrBuilder getNameOrBuilder() {
return getName();
}
public static final int KEY_FIELD_NUMBER = 2;
private io.opencannabis.schema.base.BaseProductKey.ProductKey key_;
/**
*
* Specifies the key, if known, of a product.
*
*
* .opencannabis.base.ProductKey key = 2 [(.gen_bq_schema.description) = "Specifies the key, if known, of a product."];
*/
public boolean hasKey() {
return key_ != null;
}
/**
*
* Specifies the key, if known, of a product.
*
*
* .opencannabis.base.ProductKey key = 2 [(.gen_bq_schema.description) = "Specifies the key, if known, of a product."];
*/
public io.opencannabis.schema.base.BaseProductKey.ProductKey getKey() {
return key_ == null ? io.opencannabis.schema.base.BaseProductKey.ProductKey.getDefaultInstance() : key_;
}
/**
*
* Specifies the key, if known, of a product.
*
*
* .opencannabis.base.ProductKey key = 2 [(.gen_bq_schema.description) = "Specifies the key, if known, of a product."];
*/
public io.opencannabis.schema.base.BaseProductKey.ProductKeyOrBuilder getKeyOrBuilder() {
return getKey();
}
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 (name_ != null) {
output.writeMessage(1, getName());
}
if (key_ != null) {
output.writeMessage(2, getKey());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (name_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getName());
}
if (key_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getKey());
}
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.base.BaseProductKey.ProductReference)) {
return super.equals(obj);
}
io.opencannabis.schema.base.BaseProductKey.ProductReference other = (io.opencannabis.schema.base.BaseProductKey.ProductReference) obj;
if (hasName() != other.hasName()) return false;
if (hasName()) {
if (!getName()
.equals(other.getName())) return false;
}
if (hasKey() != other.hasKey()) return false;
if (hasKey()) {
if (!getKey()
.equals(other.getKey())) 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 (hasName()) {
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
}
if (hasKey()) {
hash = (37 * hash) + KEY_FIELD_NUMBER;
hash = (53 * hash) + getKey().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.opencannabis.schema.base.BaseProductKey.ProductReference parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.opencannabis.schema.base.BaseProductKey.ProductReference 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.base.BaseProductKey.ProductReference parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.opencannabis.schema.base.BaseProductKey.ProductReference 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.base.BaseProductKey.ProductReference parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.opencannabis.schema.base.BaseProductKey.ProductReference parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.opencannabis.schema.base.BaseProductKey.ProductReference parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.opencannabis.schema.base.BaseProductKey.ProductReference 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.base.BaseProductKey.ProductReference parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.opencannabis.schema.base.BaseProductKey.ProductReference 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.base.BaseProductKey.ProductReference parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.opencannabis.schema.base.BaseProductKey.ProductReference 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.base.BaseProductKey.ProductReference 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 a reference to a product.
*
*
* Protobuf type {@code opencannabis.base.ProductReference}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:opencannabis.base.ProductReference)
io.opencannabis.schema.base.BaseProductKey.ProductReferenceOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.opencannabis.schema.base.BaseProductKey.internal_static_opencannabis_base_ProductReference_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.opencannabis.schema.base.BaseProductKey.internal_static_opencannabis_base_ProductReference_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.opencannabis.schema.base.BaseProductKey.ProductReference.class, io.opencannabis.schema.base.BaseProductKey.ProductReference.Builder.class);
}
// Construct using io.opencannabis.schema.base.BaseProductKey.ProductReference.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 (nameBuilder_ == null) {
name_ = null;
} else {
name_ = null;
nameBuilder_ = null;
}
if (keyBuilder_ == null) {
key_ = null;
} else {
key_ = null;
keyBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.opencannabis.schema.base.BaseProductKey.internal_static_opencannabis_base_ProductReference_descriptor;
}
@java.lang.Override
public io.opencannabis.schema.base.BaseProductKey.ProductReference getDefaultInstanceForType() {
return io.opencannabis.schema.base.BaseProductKey.ProductReference.getDefaultInstance();
}
@java.lang.Override
public io.opencannabis.schema.base.BaseProductKey.ProductReference build() {
io.opencannabis.schema.base.BaseProductKey.ProductReference result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.opencannabis.schema.base.BaseProductKey.ProductReference buildPartial() {
io.opencannabis.schema.base.BaseProductKey.ProductReference result = new io.opencannabis.schema.base.BaseProductKey.ProductReference(this);
if (nameBuilder_ == null) {
result.name_ = name_;
} else {
result.name_ = nameBuilder_.build();
}
if (keyBuilder_ == null) {
result.key_ = key_;
} else {
result.key_ = keyBuilder_.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.base.BaseProductKey.ProductReference) {
return mergeFrom((io.opencannabis.schema.base.BaseProductKey.ProductReference)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.opencannabis.schema.base.BaseProductKey.ProductReference other) {
if (other == io.opencannabis.schema.base.BaseProductKey.ProductReference.getDefaultInstance()) return this;
if (other.hasName()) {
mergeName(other.getName());
}
if (other.hasKey()) {
mergeKey(other.getKey());
}
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.base.BaseProductKey.ProductReference parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.opencannabis.schema.base.BaseProductKey.ProductReference) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private io.opencannabis.schema.content.NameContent.Name name_;
private com.google.protobuf.SingleFieldBuilderV3<
io.opencannabis.schema.content.NameContent.Name, io.opencannabis.schema.content.NameContent.Name.Builder, io.opencannabis.schema.content.NameContent.NameOrBuilder> nameBuilder_;
/**
*
* Specifies the name of a product.
*
*
* .opencannabis.content.Name name = 1 [(.gen_bq_schema.description) = "Specifies the name of a product."];
*/
public boolean hasName() {
return nameBuilder_ != null || name_ != null;
}
/**
*
* Specifies the name of a product.
*
*
* .opencannabis.content.Name name = 1 [(.gen_bq_schema.description) = "Specifies the name of a product."];
*/
public io.opencannabis.schema.content.NameContent.Name getName() {
if (nameBuilder_ == null) {
return name_ == null ? io.opencannabis.schema.content.NameContent.Name.getDefaultInstance() : name_;
} else {
return nameBuilder_.getMessage();
}
}
/**
*
* Specifies the name of a product.
*
*
* .opencannabis.content.Name name = 1 [(.gen_bq_schema.description) = "Specifies the name of a product."];
*/
public Builder setName(io.opencannabis.schema.content.NameContent.Name value) {
if (nameBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
name_ = value;
onChanged();
} else {
nameBuilder_.setMessage(value);
}
return this;
}
/**
*
* Specifies the name of a product.
*
*
* .opencannabis.content.Name name = 1 [(.gen_bq_schema.description) = "Specifies the name of a product."];
*/
public Builder setName(
io.opencannabis.schema.content.NameContent.Name.Builder builderForValue) {
if (nameBuilder_ == null) {
name_ = builderForValue.build();
onChanged();
} else {
nameBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Specifies the name of a product.
*
*
* .opencannabis.content.Name name = 1 [(.gen_bq_schema.description) = "Specifies the name of a product."];
*/
public Builder mergeName(io.opencannabis.schema.content.NameContent.Name value) {
if (nameBuilder_ == null) {
if (name_ != null) {
name_ =
io.opencannabis.schema.content.NameContent.Name.newBuilder(name_).mergeFrom(value).buildPartial();
} else {
name_ = value;
}
onChanged();
} else {
nameBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Specifies the name of a product.
*
*
* .opencannabis.content.Name name = 1 [(.gen_bq_schema.description) = "Specifies the name of a product."];
*/
public Builder clearName() {
if (nameBuilder_ == null) {
name_ = null;
onChanged();
} else {
name_ = null;
nameBuilder_ = null;
}
return this;
}
/**
*
* Specifies the name of a product.
*
*
* .opencannabis.content.Name name = 1 [(.gen_bq_schema.description) = "Specifies the name of a product."];
*/
public io.opencannabis.schema.content.NameContent.Name.Builder getNameBuilder() {
onChanged();
return getNameFieldBuilder().getBuilder();
}
/**
*
* Specifies the name of a product.
*
*
* .opencannabis.content.Name name = 1 [(.gen_bq_schema.description) = "Specifies the name of a product."];
*/
public io.opencannabis.schema.content.NameContent.NameOrBuilder getNameOrBuilder() {
if (nameBuilder_ != null) {
return nameBuilder_.getMessageOrBuilder();
} else {
return name_ == null ?
io.opencannabis.schema.content.NameContent.Name.getDefaultInstance() : name_;
}
}
/**
*
* Specifies the name of a product.
*
*
* .opencannabis.content.Name name = 1 [(.gen_bq_schema.description) = "Specifies the name of a product."];
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.opencannabis.schema.content.NameContent.Name, io.opencannabis.schema.content.NameContent.Name.Builder, io.opencannabis.schema.content.NameContent.NameOrBuilder>
getNameFieldBuilder() {
if (nameBuilder_ == null) {
nameBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.opencannabis.schema.content.NameContent.Name, io.opencannabis.schema.content.NameContent.Name.Builder, io.opencannabis.schema.content.NameContent.NameOrBuilder>(
getName(),
getParentForChildren(),
isClean());
name_ = null;
}
return nameBuilder_;
}
private io.opencannabis.schema.base.BaseProductKey.ProductKey key_;
private com.google.protobuf.SingleFieldBuilderV3<
io.opencannabis.schema.base.BaseProductKey.ProductKey, io.opencannabis.schema.base.BaseProductKey.ProductKey.Builder, io.opencannabis.schema.base.BaseProductKey.ProductKeyOrBuilder> keyBuilder_;
/**
*
* Specifies the key, if known, of a product.
*
*
* .opencannabis.base.ProductKey key = 2 [(.gen_bq_schema.description) = "Specifies the key, if known, of a product."];
*/
public boolean hasKey() {
return keyBuilder_ != null || key_ != null;
}
/**
*
* Specifies the key, if known, of a product.
*
*
* .opencannabis.base.ProductKey key = 2 [(.gen_bq_schema.description) = "Specifies the key, if known, of a product."];
*/
public io.opencannabis.schema.base.BaseProductKey.ProductKey getKey() {
if (keyBuilder_ == null) {
return key_ == null ? io.opencannabis.schema.base.BaseProductKey.ProductKey.getDefaultInstance() : key_;
} else {
return keyBuilder_.getMessage();
}
}
/**
*
* Specifies the key, if known, of a product.
*
*
* .opencannabis.base.ProductKey key = 2 [(.gen_bq_schema.description) = "Specifies the key, if known, of a product."];
*/
public Builder setKey(io.opencannabis.schema.base.BaseProductKey.ProductKey value) {
if (keyBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
key_ = value;
onChanged();
} else {
keyBuilder_.setMessage(value);
}
return this;
}
/**
*
* Specifies the key, if known, of a product.
*
*
* .opencannabis.base.ProductKey key = 2 [(.gen_bq_schema.description) = "Specifies the key, if known, of a product."];
*/
public Builder setKey(
io.opencannabis.schema.base.BaseProductKey.ProductKey.Builder builderForValue) {
if (keyBuilder_ == null) {
key_ = builderForValue.build();
onChanged();
} else {
keyBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Specifies the key, if known, of a product.
*
*
* .opencannabis.base.ProductKey key = 2 [(.gen_bq_schema.description) = "Specifies the key, if known, of a product."];
*/
public Builder mergeKey(io.opencannabis.schema.base.BaseProductKey.ProductKey value) {
if (keyBuilder_ == null) {
if (key_ != null) {
key_ =
io.opencannabis.schema.base.BaseProductKey.ProductKey.newBuilder(key_).mergeFrom(value).buildPartial();
} else {
key_ = value;
}
onChanged();
} else {
keyBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Specifies the key, if known, of a product.
*
*
* .opencannabis.base.ProductKey key = 2 [(.gen_bq_schema.description) = "Specifies the key, if known, of a product."];
*/
public Builder clearKey() {
if (keyBuilder_ == null) {
key_ = null;
onChanged();
} else {
key_ = null;
keyBuilder_ = null;
}
return this;
}
/**
*
* Specifies the key, if known, of a product.
*
*
* .opencannabis.base.ProductKey key = 2 [(.gen_bq_schema.description) = "Specifies the key, if known, of a product."];
*/
public io.opencannabis.schema.base.BaseProductKey.ProductKey.Builder getKeyBuilder() {
onChanged();
return getKeyFieldBuilder().getBuilder();
}
/**
*
* Specifies the key, if known, of a product.
*
*
* .opencannabis.base.ProductKey key = 2 [(.gen_bq_schema.description) = "Specifies the key, if known, of a product."];
*/
public io.opencannabis.schema.base.BaseProductKey.ProductKeyOrBuilder getKeyOrBuilder() {
if (keyBuilder_ != null) {
return keyBuilder_.getMessageOrBuilder();
} else {
return key_ == null ?
io.opencannabis.schema.base.BaseProductKey.ProductKey.getDefaultInstance() : key_;
}
}
/**
*
* Specifies the key, if known, of a product.
*
*
* .opencannabis.base.ProductKey key = 2 [(.gen_bq_schema.description) = "Specifies the key, if known, of a product."];
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.opencannabis.schema.base.BaseProductKey.ProductKey, io.opencannabis.schema.base.BaseProductKey.ProductKey.Builder, io.opencannabis.schema.base.BaseProductKey.ProductKeyOrBuilder>
getKeyFieldBuilder() {
if (keyBuilder_ == null) {
keyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.opencannabis.schema.base.BaseProductKey.ProductKey, io.opencannabis.schema.base.BaseProductKey.ProductKey.Builder, io.opencannabis.schema.base.BaseProductKey.ProductKeyOrBuilder>(
getKey(),
getParentForChildren(),
isClean());
key_ = null;
}
return keyBuilder_;
}
@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.base.ProductReference)
}
// @@protoc_insertion_point(class_scope:opencannabis.base.ProductReference)
private static final io.opencannabis.schema.base.BaseProductKey.ProductReference DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.opencannabis.schema.base.BaseProductKey.ProductReference();
}
public static io.opencannabis.schema.base.BaseProductKey.ProductReference getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ProductReference parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ProductReference(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.base.BaseProductKey.ProductReference getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ProductKeyOrBuilder extends
// @@protoc_insertion_point(interface_extends:opencannabis.base.ProductKey)
com.google.protobuf.MessageOrBuilder {
/**
*
* Product ID, an opaque string that is usually autogenerated. Within the scope of an implementing system, this may
* also be a stringified integer such as an auto-incrementing ID, for relational-type systems. The product ID is
* expected to be globally addressable and unique across all product categories.
*
*
* string id = 1 [(.gen_bq_schema.require) = true, (.gen_bq_schema.description) = "Product ID, an opaque string that is usually autogenerated.", (.core.field) = { ... }
*/
java.lang.String getId();
/**
*
* Product ID, an opaque string that is usually autogenerated. Within the scope of an implementing system, this may
* also be a stringified integer such as an auto-incrementing ID, for relational-type systems. The product ID is
* expected to be globally addressable and unique across all product categories.
*
*
* string id = 1 [(.gen_bq_schema.require) = true, (.gen_bq_schema.description) = "Product ID, an opaque string that is usually autogenerated.", (.core.field) = { ... }
*/
com.google.protobuf.ByteString
getIdBytes();
/**
*
* Type of product the ID is referring to. In most cases this entry can be omitted.
*
*
* .opencannabis.base.ProductKind type = 2 [(.gen_bq_schema.description) = "Type of product the ID is referring to. In most cases this entry can be omitted."];
*/
int getTypeValue();
/**
*
* Type of product the ID is referring to. In most cases this entry can be omitted.
*
*
* .opencannabis.base.ProductKind type = 2 [(.gen_bq_schema.description) = "Type of product the ID is referring to. In most cases this entry can be omitted."];
*/
io.opencannabis.schema.base.BaseProductKind.ProductKind getType();
}
/**
*
* Specifies a general key for a product, which is the combined specification of a product ID and type, which is
* enumerated in `base.ProductType`.
*
*
* Protobuf type {@code opencannabis.base.ProductKey}
*/
public static final class ProductKey extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:opencannabis.base.ProductKey)
ProductKeyOrBuilder {
private static final long serialVersionUID = 0L;
// Use ProductKey.newBuilder() to construct.
private ProductKey(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ProductKey() {
id_ = "";
type_ = 0;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private ProductKey(
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();
id_ = s;
break;
}
case 16: {
int rawValue = input.readEnum();
type_ = rawValue;
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.base.BaseProductKey.internal_static_opencannabis_base_ProductKey_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.opencannabis.schema.base.BaseProductKey.internal_static_opencannabis_base_ProductKey_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.opencannabis.schema.base.BaseProductKey.ProductKey.class, io.opencannabis.schema.base.BaseProductKey.ProductKey.Builder.class);
}
public static final int ID_FIELD_NUMBER = 1;
private volatile java.lang.Object id_;
/**
*
* Product ID, an opaque string that is usually autogenerated. Within the scope of an implementing system, this may
* also be a stringified integer such as an auto-incrementing ID, for relational-type systems. The product ID is
* expected to be globally addressable and unique across all product categories.
*
*
* string id = 1 [(.gen_bq_schema.require) = true, (.gen_bq_schema.description) = "Product ID, an opaque string that is usually autogenerated.", (.core.field) = { ... }
*/
public java.lang.String getId() {
java.lang.Object ref = id_;
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();
id_ = s;
return s;
}
}
/**
*
* Product ID, an opaque string that is usually autogenerated. Within the scope of an implementing system, this may
* also be a stringified integer such as an auto-incrementing ID, for relational-type systems. The product ID is
* expected to be globally addressable and unique across all product categories.
*
*
* string id = 1 [(.gen_bq_schema.require) = true, (.gen_bq_schema.description) = "Product ID, an opaque string that is usually autogenerated.", (.core.field) = { ... }
*/
public com.google.protobuf.ByteString
getIdBytes() {
java.lang.Object ref = id_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
id_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int TYPE_FIELD_NUMBER = 2;
private int type_;
/**
*
* Type of product the ID is referring to. In most cases this entry can be omitted.
*
*
* .opencannabis.base.ProductKind type = 2 [(.gen_bq_schema.description) = "Type of product the ID is referring to. In most cases this entry can be omitted."];
*/
public int getTypeValue() {
return type_;
}
/**
*
* Type of product the ID is referring to. In most cases this entry can be omitted.
*
*
* .opencannabis.base.ProductKind type = 2 [(.gen_bq_schema.description) = "Type of product the ID is referring to. In most cases this entry can be omitted."];
*/
public io.opencannabis.schema.base.BaseProductKind.ProductKind getType() {
@SuppressWarnings("deprecation")
io.opencannabis.schema.base.BaseProductKind.ProductKind result = io.opencannabis.schema.base.BaseProductKind.ProductKind.valueOf(type_);
return result == null ? io.opencannabis.schema.base.BaseProductKind.ProductKind.UNRECOGNIZED : result;
}
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 (!getIdBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_);
}
if (type_ != io.opencannabis.schema.base.BaseProductKind.ProductKind.FLOWERS.getNumber()) {
output.writeEnum(2, type_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getIdBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_);
}
if (type_ != io.opencannabis.schema.base.BaseProductKind.ProductKind.FLOWERS.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(2, type_);
}
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.base.BaseProductKey.ProductKey)) {
return super.equals(obj);
}
io.opencannabis.schema.base.BaseProductKey.ProductKey other = (io.opencannabis.schema.base.BaseProductKey.ProductKey) obj;
if (!getId()
.equals(other.getId())) return false;
if (type_ != other.type_) 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) + ID_FIELD_NUMBER;
hash = (53 * hash) + getId().hashCode();
hash = (37 * hash) + TYPE_FIELD_NUMBER;
hash = (53 * hash) + type_;
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.opencannabis.schema.base.BaseProductKey.ProductKey parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.opencannabis.schema.base.BaseProductKey.ProductKey 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.base.BaseProductKey.ProductKey parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.opencannabis.schema.base.BaseProductKey.ProductKey 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.base.BaseProductKey.ProductKey parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.opencannabis.schema.base.BaseProductKey.ProductKey parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.opencannabis.schema.base.BaseProductKey.ProductKey parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.opencannabis.schema.base.BaseProductKey.ProductKey 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.base.BaseProductKey.ProductKey parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.opencannabis.schema.base.BaseProductKey.ProductKey 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.base.BaseProductKey.ProductKey parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.opencannabis.schema.base.BaseProductKey.ProductKey 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.base.BaseProductKey.ProductKey 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 a general key for a product, which is the combined specification of a product ID and type, which is
* enumerated in `base.ProductType`.
*
*
* Protobuf type {@code opencannabis.base.ProductKey}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:opencannabis.base.ProductKey)
io.opencannabis.schema.base.BaseProductKey.ProductKeyOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.opencannabis.schema.base.BaseProductKey.internal_static_opencannabis_base_ProductKey_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.opencannabis.schema.base.BaseProductKey.internal_static_opencannabis_base_ProductKey_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.opencannabis.schema.base.BaseProductKey.ProductKey.class, io.opencannabis.schema.base.BaseProductKey.ProductKey.Builder.class);
}
// Construct using io.opencannabis.schema.base.BaseProductKey.ProductKey.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();
id_ = "";
type_ = 0;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.opencannabis.schema.base.BaseProductKey.internal_static_opencannabis_base_ProductKey_descriptor;
}
@java.lang.Override
public io.opencannabis.schema.base.BaseProductKey.ProductKey getDefaultInstanceForType() {
return io.opencannabis.schema.base.BaseProductKey.ProductKey.getDefaultInstance();
}
@java.lang.Override
public io.opencannabis.schema.base.BaseProductKey.ProductKey build() {
io.opencannabis.schema.base.BaseProductKey.ProductKey result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.opencannabis.schema.base.BaseProductKey.ProductKey buildPartial() {
io.opencannabis.schema.base.BaseProductKey.ProductKey result = new io.opencannabis.schema.base.BaseProductKey.ProductKey(this);
result.id_ = id_;
result.type_ = type_;
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.base.BaseProductKey.ProductKey) {
return mergeFrom((io.opencannabis.schema.base.BaseProductKey.ProductKey)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.opencannabis.schema.base.BaseProductKey.ProductKey other) {
if (other == io.opencannabis.schema.base.BaseProductKey.ProductKey.getDefaultInstance()) return this;
if (!other.getId().isEmpty()) {
id_ = other.id_;
onChanged();
}
if (other.type_ != 0) {
setTypeValue(other.getTypeValue());
}
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.base.BaseProductKey.ProductKey parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.opencannabis.schema.base.BaseProductKey.ProductKey) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object id_ = "";
/**
*
* Product ID, an opaque string that is usually autogenerated. Within the scope of an implementing system, this may
* also be a stringified integer such as an auto-incrementing ID, for relational-type systems. The product ID is
* expected to be globally addressable and unique across all product categories.
*
*
* string id = 1 [(.gen_bq_schema.require) = true, (.gen_bq_schema.description) = "Product ID, an opaque string that is usually autogenerated.", (.core.field) = { ... }
*/
public java.lang.String getId() {
java.lang.Object ref = id_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
id_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Product ID, an opaque string that is usually autogenerated. Within the scope of an implementing system, this may
* also be a stringified integer such as an auto-incrementing ID, for relational-type systems. The product ID is
* expected to be globally addressable and unique across all product categories.
*
*
* string id = 1 [(.gen_bq_schema.require) = true, (.gen_bq_schema.description) = "Product ID, an opaque string that is usually autogenerated.", (.core.field) = { ... }
*/
public com.google.protobuf.ByteString
getIdBytes() {
java.lang.Object ref = id_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
id_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Product ID, an opaque string that is usually autogenerated. Within the scope of an implementing system, this may
* also be a stringified integer such as an auto-incrementing ID, for relational-type systems. The product ID is
* expected to be globally addressable and unique across all product categories.
*
*
* string id = 1 [(.gen_bq_schema.require) = true, (.gen_bq_schema.description) = "Product ID, an opaque string that is usually autogenerated.", (.core.field) = { ... }
*/
public Builder setId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
id_ = value;
onChanged();
return this;
}
/**
*
* Product ID, an opaque string that is usually autogenerated. Within the scope of an implementing system, this may
* also be a stringified integer such as an auto-incrementing ID, for relational-type systems. The product ID is
* expected to be globally addressable and unique across all product categories.
*
*
* string id = 1 [(.gen_bq_schema.require) = true, (.gen_bq_schema.description) = "Product ID, an opaque string that is usually autogenerated.", (.core.field) = { ... }
*/
public Builder clearId() {
id_ = getDefaultInstance().getId();
onChanged();
return this;
}
/**
*
* Product ID, an opaque string that is usually autogenerated. Within the scope of an implementing system, this may
* also be a stringified integer such as an auto-incrementing ID, for relational-type systems. The product ID is
* expected to be globally addressable and unique across all product categories.
*
*
* string id = 1 [(.gen_bq_schema.require) = true, (.gen_bq_schema.description) = "Product ID, an opaque string that is usually autogenerated.", (.core.field) = { ... }
*/
public Builder setIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
id_ = value;
onChanged();
return this;
}
private int type_ = 0;
/**
*
* Type of product the ID is referring to. In most cases this entry can be omitted.
*
*
* .opencannabis.base.ProductKind type = 2 [(.gen_bq_schema.description) = "Type of product the ID is referring to. In most cases this entry can be omitted."];
*/
public int getTypeValue() {
return type_;
}
/**
*
* Type of product the ID is referring to. In most cases this entry can be omitted.
*
*
* .opencannabis.base.ProductKind type = 2 [(.gen_bq_schema.description) = "Type of product the ID is referring to. In most cases this entry can be omitted."];
*/
public Builder setTypeValue(int value) {
type_ = value;
onChanged();
return this;
}
/**
*
* Type of product the ID is referring to. In most cases this entry can be omitted.
*
*
* .opencannabis.base.ProductKind type = 2 [(.gen_bq_schema.description) = "Type of product the ID is referring to. In most cases this entry can be omitted."];
*/
public io.opencannabis.schema.base.BaseProductKind.ProductKind getType() {
@SuppressWarnings("deprecation")
io.opencannabis.schema.base.BaseProductKind.ProductKind result = io.opencannabis.schema.base.BaseProductKind.ProductKind.valueOf(type_);
return result == null ? io.opencannabis.schema.base.BaseProductKind.ProductKind.UNRECOGNIZED : result;
}
/**
*
* Type of product the ID is referring to. In most cases this entry can be omitted.
*
*
* .opencannabis.base.ProductKind type = 2 [(.gen_bq_schema.description) = "Type of product the ID is referring to. In most cases this entry can be omitted."];
*/
public Builder setType(io.opencannabis.schema.base.BaseProductKind.ProductKind value) {
if (value == null) {
throw new NullPointerException();
}
type_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Type of product the ID is referring to. In most cases this entry can be omitted.
*
*
* .opencannabis.base.ProductKind type = 2 [(.gen_bq_schema.description) = "Type of product the ID is referring to. In most cases this entry can be omitted."];
*/
public Builder clearType() {
type_ = 0;
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.base.ProductKey)
}
// @@protoc_insertion_point(class_scope:opencannabis.base.ProductKey)
private static final io.opencannabis.schema.base.BaseProductKey.ProductKey DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.opencannabis.schema.base.BaseProductKey.ProductKey();
}
public static io.opencannabis.schema.base.BaseProductKey.ProductKey getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ProductKey parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ProductKey(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.base.BaseProductKey.ProductKey getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_opencannabis_base_ProductReference_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_opencannabis_base_ProductReference_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_opencannabis_base_ProductKey_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_opencannabis_base_ProductKey_fieldAccessorTable;
public static com.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {
return descriptor;
}
private static com.google.protobuf.Descriptors.FileDescriptor
descriptor;
static {
java.lang.String[] descriptorData = {
"\n\025base/ProductKey.proto\022\021opencannabis.ba" +
"se\032\016bq_field.proto\032\024core/Datamodel.proto" +
"\032\022content/Name.proto\032\026base/ProductKind.p" +
"roto\"\274\001\n\020ProductReference\022M\n\004name\030\001 \001(\0132" +
"\032.opencannabis.content.NameB#\212@ Specifie" +
"s the name of a product.\022Y\n\003key\030\002 \001(\0132\035." +
"opencannabis.base.ProductKeyB-\212@*Specifi" +
"es the key, if known, of a product.\"\345\001\n\n" +
"ProductKey\022S\n\002id\030\001 \001(\tBG\302\265\003\002\010\002\360?\001\212@;Prod" +
"uct ID, an opaque string that is usually" +
" autogenerated.\022\201\001\n\004type\030\002 \001(\0162\036.opencan" +
"nabis.base.ProductKindBS\212@PType of produ" +
"ct the ID is referring to. In most cases" +
" this entry can be omitted.B7\n\033io.openca" +
"nnabis.schema.baseB\016BaseProductKeyH\001P\000\242\002" +
"\003OCSb\006proto3"
};
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() {
public com.google.protobuf.ExtensionRegistry assignDescriptors(
com.google.protobuf.Descriptors.FileDescriptor root) {
descriptor = root;
return null;
}
};
com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
gen_bq_schema.BqField.getDescriptor(),
core.Datamodel.getDescriptor(),
io.opencannabis.schema.content.NameContent.getDescriptor(),
io.opencannabis.schema.base.BaseProductKind.getDescriptor(),
}, assigner);
internal_static_opencannabis_base_ProductReference_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_opencannabis_base_ProductReference_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_opencannabis_base_ProductReference_descriptor,
new java.lang.String[] { "Name", "Key", });
internal_static_opencannabis_base_ProductKey_descriptor =
getDescriptor().getMessageTypes().get(1);
internal_static_opencannabis_base_ProductKey_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_opencannabis_base_ProductKey_descriptor,
new java.lang.String[] { "Id", "Type", });
com.google.protobuf.ExtensionRegistry registry =
com.google.protobuf.ExtensionRegistry.newInstance();
registry.add(core.Datamodel.field);
registry.add(gen_bq_schema.BqField.description);
registry.add(gen_bq_schema.BqField.require);
com.google.protobuf.Descriptors.FileDescriptor
.internalUpdateFileDescriptor(descriptor, registry);
gen_bq_schema.BqField.getDescriptor();
core.Datamodel.getDescriptor();
io.opencannabis.schema.content.NameContent.getDescriptor();
io.opencannabis.schema.base.BaseProductKind.getDescriptor();
}
// @@protoc_insertion_point(outer_class_scope)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy