io.opencannabis.schema.menu.ForeignReference 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: products/menu/Menu.proto
package io.opencannabis.schema.menu;
/**
*
* Specifies a foreign reference for a given menu product. A foreign reference is a unique ID or link between a product
* and that same product in some foreign computer system.
*
*
* Protobuf type {@code opencannabis.products.menu.ForeignReference}
*/
public final class ForeignReference extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:opencannabis.products.menu.ForeignReference)
ForeignReferenceOrBuilder {
private static final long serialVersionUID = 0L;
// Use ForeignReference.newBuilder() to construct.
private ForeignReference(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ForeignReference() {
key_ = "";
domain_ = "";
link_ = "";
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private ForeignReference(
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();
key_ = s;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
domain_ = s;
break;
}
case 26: {
java.lang.String s = input.readStringRequireUtf8();
link_ = s;
break;
}
case 34: {
io.opencannabis.schema.temporal.TemporalInstant.Instant.Builder subBuilder = null;
if (attached_ != null) {
subBuilder = attached_.toBuilder();
}
attached_ = input.readMessage(io.opencannabis.schema.temporal.TemporalInstant.Instant.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(attached_);
attached_ = subBuilder.buildPartial();
}
break;
}
case 42: {
io.opencannabis.schema.temporal.TemporalInstant.Instant.Builder subBuilder = null;
if (validated_ != null) {
subBuilder = validated_.toBuilder();
}
validated_ = input.readMessage(io.opencannabis.schema.temporal.TemporalInstant.Instant.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(validated_);
validated_ = 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.menu.MenuOuterClass.internal_static_opencannabis_products_menu_ForeignReference_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.opencannabis.schema.menu.MenuOuterClass.internal_static_opencannabis_products_menu_ForeignReference_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.opencannabis.schema.menu.ForeignReference.class, io.opencannabis.schema.menu.ForeignReference.Builder.class);
}
public static final int KEY_FIELD_NUMBER = 1;
private volatile java.lang.Object key_;
/**
*
* Foreign key value for a reference between an in-network product and an out-of-network representation of that same
* product in a different computer system.
*
*
* string key = 1;
*/
public java.lang.String getKey() {
java.lang.Object ref = key_;
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();
key_ = s;
return s;
}
}
/**
*
* Foreign key value for a reference between an in-network product and an out-of-network representation of that same
* product in a different computer system.
*
*
* string key = 1;
*/
public com.google.protobuf.ByteString
getKeyBytes() {
java.lang.Object ref = key_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
key_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int DOMAIN_FIELD_NUMBER = 2;
private volatile java.lang.Object domain_;
/**
*
* Domain for the integrating system. This is usually set to a unique domain value that corresponds to the foreign
* system, and can be used to identify it later.
*
*
* string domain = 2;
*/
public java.lang.String getDomain() {
java.lang.Object ref = domain_;
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();
domain_ = s;
return s;
}
}
/**
*
* Domain for the integrating system. This is usually set to a unique domain value that corresponds to the foreign
* system, and can be used to identify it later.
*
*
* string domain = 2;
*/
public com.google.protobuf.ByteString
getDomainBytes() {
java.lang.Object ref = domain_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
domain_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int LINK_FIELD_NUMBER = 3;
private volatile java.lang.Object link_;
/**
*
* URL to this product in the foreign system, if applicable. Can also be a link to a REST URL payload representing
* this product's data in the foreign system.
*
*
* string link = 3;
*/
public java.lang.String getLink() {
java.lang.Object ref = link_;
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();
link_ = s;
return s;
}
}
/**
*
* URL to this product in the foreign system, if applicable. Can also be a link to a REST URL payload representing
* this product's data in the foreign system.
*
*
* string link = 3;
*/
public com.google.protobuf.ByteString
getLinkBytes() {
java.lang.Object ref = link_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
link_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ATTACHED_FIELD_NUMBER = 4;
private io.opencannabis.schema.temporal.TemporalInstant.Instant attached_;
/**
*
* Timestamp for when this foreign reference was attached to a given menu product. This timestamp should only be set
* once, upon original creation/linking of the foreign reference.
*
*
* .opencannabis.temporal.Instant attached = 4;
*/
public boolean hasAttached() {
return attached_ != null;
}
/**
*
* Timestamp for when this foreign reference was attached to a given menu product. This timestamp should only be set
* once, upon original creation/linking of the foreign reference.
*
*
* .opencannabis.temporal.Instant attached = 4;
*/
public io.opencannabis.schema.temporal.TemporalInstant.Instant getAttached() {
return attached_ == null ? io.opencannabis.schema.temporal.TemporalInstant.Instant.getDefaultInstance() : attached_;
}
/**
*
* Timestamp for when this foreign reference was attached to a given menu product. This timestamp should only be set
* once, upon original creation/linking of the foreign reference.
*
*
* .opencannabis.temporal.Instant attached = 4;
*/
public io.opencannabis.schema.temporal.TemporalInstant.InstantOrBuilder getAttachedOrBuilder() {
return getAttached();
}
public static final int VALIDATED_FIELD_NUMBER = 5;
private io.opencannabis.schema.temporal.TemporalInstant.Instant validated_;
/**
*
* Timestamp indicating when this foreign product reference was last validated with the foreign system. Each time an
* item is fetched or otherwise synchronized, this should be updated.
*
*
* .opencannabis.temporal.Instant validated = 5;
*/
public boolean hasValidated() {
return validated_ != null;
}
/**
*
* Timestamp indicating when this foreign product reference was last validated with the foreign system. Each time an
* item is fetched or otherwise synchronized, this should be updated.
*
*
* .opencannabis.temporal.Instant validated = 5;
*/
public io.opencannabis.schema.temporal.TemporalInstant.Instant getValidated() {
return validated_ == null ? io.opencannabis.schema.temporal.TemporalInstant.Instant.getDefaultInstance() : validated_;
}
/**
*
* Timestamp indicating when this foreign product reference was last validated with the foreign system. Each time an
* item is fetched or otherwise synchronized, this should be updated.
*
*
* .opencannabis.temporal.Instant validated = 5;
*/
public io.opencannabis.schema.temporal.TemporalInstant.InstantOrBuilder getValidatedOrBuilder() {
return getValidated();
}
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 (!getKeyBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, key_);
}
if (!getDomainBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, domain_);
}
if (!getLinkBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, link_);
}
if (attached_ != null) {
output.writeMessage(4, getAttached());
}
if (validated_ != null) {
output.writeMessage(5, getValidated());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getKeyBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, key_);
}
if (!getDomainBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, domain_);
}
if (!getLinkBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, link_);
}
if (attached_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getAttached());
}
if (validated_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, getValidated());
}
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.menu.ForeignReference)) {
return super.equals(obj);
}
io.opencannabis.schema.menu.ForeignReference other = (io.opencannabis.schema.menu.ForeignReference) obj;
if (!getKey()
.equals(other.getKey())) return false;
if (!getDomain()
.equals(other.getDomain())) return false;
if (!getLink()
.equals(other.getLink())) return false;
if (hasAttached() != other.hasAttached()) return false;
if (hasAttached()) {
if (!getAttached()
.equals(other.getAttached())) return false;
}
if (hasValidated() != other.hasValidated()) return false;
if (hasValidated()) {
if (!getValidated()
.equals(other.getValidated())) 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) + KEY_FIELD_NUMBER;
hash = (53 * hash) + getKey().hashCode();
hash = (37 * hash) + DOMAIN_FIELD_NUMBER;
hash = (53 * hash) + getDomain().hashCode();
hash = (37 * hash) + LINK_FIELD_NUMBER;
hash = (53 * hash) + getLink().hashCode();
if (hasAttached()) {
hash = (37 * hash) + ATTACHED_FIELD_NUMBER;
hash = (53 * hash) + getAttached().hashCode();
}
if (hasValidated()) {
hash = (37 * hash) + VALIDATED_FIELD_NUMBER;
hash = (53 * hash) + getValidated().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.opencannabis.schema.menu.ForeignReference parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.opencannabis.schema.menu.ForeignReference 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.menu.ForeignReference parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.opencannabis.schema.menu.ForeignReference 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.menu.ForeignReference parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.opencannabis.schema.menu.ForeignReference parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.opencannabis.schema.menu.ForeignReference parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.opencannabis.schema.menu.ForeignReference 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.menu.ForeignReference parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.opencannabis.schema.menu.ForeignReference 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.menu.ForeignReference parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.opencannabis.schema.menu.ForeignReference 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.menu.ForeignReference 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 foreign reference for a given menu product. A foreign reference is a unique ID or link between a product
* and that same product in some foreign computer system.
*
*
* Protobuf type {@code opencannabis.products.menu.ForeignReference}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:opencannabis.products.menu.ForeignReference)
io.opencannabis.schema.menu.ForeignReferenceOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.opencannabis.schema.menu.MenuOuterClass.internal_static_opencannabis_products_menu_ForeignReference_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.opencannabis.schema.menu.MenuOuterClass.internal_static_opencannabis_products_menu_ForeignReference_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.opencannabis.schema.menu.ForeignReference.class, io.opencannabis.schema.menu.ForeignReference.Builder.class);
}
// Construct using io.opencannabis.schema.menu.ForeignReference.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();
key_ = "";
domain_ = "";
link_ = "";
if (attachedBuilder_ == null) {
attached_ = null;
} else {
attached_ = null;
attachedBuilder_ = null;
}
if (validatedBuilder_ == null) {
validated_ = null;
} else {
validated_ = null;
validatedBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.opencannabis.schema.menu.MenuOuterClass.internal_static_opencannabis_products_menu_ForeignReference_descriptor;
}
@java.lang.Override
public io.opencannabis.schema.menu.ForeignReference getDefaultInstanceForType() {
return io.opencannabis.schema.menu.ForeignReference.getDefaultInstance();
}
@java.lang.Override
public io.opencannabis.schema.menu.ForeignReference build() {
io.opencannabis.schema.menu.ForeignReference result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.opencannabis.schema.menu.ForeignReference buildPartial() {
io.opencannabis.schema.menu.ForeignReference result = new io.opencannabis.schema.menu.ForeignReference(this);
result.key_ = key_;
result.domain_ = domain_;
result.link_ = link_;
if (attachedBuilder_ == null) {
result.attached_ = attached_;
} else {
result.attached_ = attachedBuilder_.build();
}
if (validatedBuilder_ == null) {
result.validated_ = validated_;
} else {
result.validated_ = validatedBuilder_.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.menu.ForeignReference) {
return mergeFrom((io.opencannabis.schema.menu.ForeignReference)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.opencannabis.schema.menu.ForeignReference other) {
if (other == io.opencannabis.schema.menu.ForeignReference.getDefaultInstance()) return this;
if (!other.getKey().isEmpty()) {
key_ = other.key_;
onChanged();
}
if (!other.getDomain().isEmpty()) {
domain_ = other.domain_;
onChanged();
}
if (!other.getLink().isEmpty()) {
link_ = other.link_;
onChanged();
}
if (other.hasAttached()) {
mergeAttached(other.getAttached());
}
if (other.hasValidated()) {
mergeValidated(other.getValidated());
}
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.menu.ForeignReference parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.opencannabis.schema.menu.ForeignReference) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object key_ = "";
/**
*
* Foreign key value for a reference between an in-network product and an out-of-network representation of that same
* product in a different computer system.
*
*
* string key = 1;
*/
public java.lang.String getKey() {
java.lang.Object ref = key_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
key_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Foreign key value for a reference between an in-network product and an out-of-network representation of that same
* product in a different computer system.
*
*
* string key = 1;
*/
public com.google.protobuf.ByteString
getKeyBytes() {
java.lang.Object ref = key_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
key_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Foreign key value for a reference between an in-network product and an out-of-network representation of that same
* product in a different computer system.
*
*
* string key = 1;
*/
public Builder setKey(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
key_ = value;
onChanged();
return this;
}
/**
*
* Foreign key value for a reference between an in-network product and an out-of-network representation of that same
* product in a different computer system.
*
*
* string key = 1;
*/
public Builder clearKey() {
key_ = getDefaultInstance().getKey();
onChanged();
return this;
}
/**
*
* Foreign key value for a reference between an in-network product and an out-of-network representation of that same
* product in a different computer system.
*
*
* string key = 1;
*/
public Builder setKeyBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
key_ = value;
onChanged();
return this;
}
private java.lang.Object domain_ = "";
/**
*
* Domain for the integrating system. This is usually set to a unique domain value that corresponds to the foreign
* system, and can be used to identify it later.
*
*
* string domain = 2;
*/
public java.lang.String getDomain() {
java.lang.Object ref = domain_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
domain_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Domain for the integrating system. This is usually set to a unique domain value that corresponds to the foreign
* system, and can be used to identify it later.
*
*
* string domain = 2;
*/
public com.google.protobuf.ByteString
getDomainBytes() {
java.lang.Object ref = domain_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
domain_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Domain for the integrating system. This is usually set to a unique domain value that corresponds to the foreign
* system, and can be used to identify it later.
*
*
* string domain = 2;
*/
public Builder setDomain(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
domain_ = value;
onChanged();
return this;
}
/**
*
* Domain for the integrating system. This is usually set to a unique domain value that corresponds to the foreign
* system, and can be used to identify it later.
*
*
* string domain = 2;
*/
public Builder clearDomain() {
domain_ = getDefaultInstance().getDomain();
onChanged();
return this;
}
/**
*
* Domain for the integrating system. This is usually set to a unique domain value that corresponds to the foreign
* system, and can be used to identify it later.
*
*
* string domain = 2;
*/
public Builder setDomainBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
domain_ = value;
onChanged();
return this;
}
private java.lang.Object link_ = "";
/**
*
* URL to this product in the foreign system, if applicable. Can also be a link to a REST URL payload representing
* this product's data in the foreign system.
*
*
* string link = 3;
*/
public java.lang.String getLink() {
java.lang.Object ref = link_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
link_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* URL to this product in the foreign system, if applicable. Can also be a link to a REST URL payload representing
* this product's data in the foreign system.
*
*
* string link = 3;
*/
public com.google.protobuf.ByteString
getLinkBytes() {
java.lang.Object ref = link_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
link_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* URL to this product in the foreign system, if applicable. Can also be a link to a REST URL payload representing
* this product's data in the foreign system.
*
*
* string link = 3;
*/
public Builder setLink(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
link_ = value;
onChanged();
return this;
}
/**
*
* URL to this product in the foreign system, if applicable. Can also be a link to a REST URL payload representing
* this product's data in the foreign system.
*
*
* string link = 3;
*/
public Builder clearLink() {
link_ = getDefaultInstance().getLink();
onChanged();
return this;
}
/**
*
* URL to this product in the foreign system, if applicable. Can also be a link to a REST URL payload representing
* this product's data in the foreign system.
*
*
* string link = 3;
*/
public Builder setLinkBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
link_ = value;
onChanged();
return this;
}
private io.opencannabis.schema.temporal.TemporalInstant.Instant attached_;
private com.google.protobuf.SingleFieldBuilderV3<
io.opencannabis.schema.temporal.TemporalInstant.Instant, io.opencannabis.schema.temporal.TemporalInstant.Instant.Builder, io.opencannabis.schema.temporal.TemporalInstant.InstantOrBuilder> attachedBuilder_;
/**
*
* Timestamp for when this foreign reference was attached to a given menu product. This timestamp should only be set
* once, upon original creation/linking of the foreign reference.
*
*
* .opencannabis.temporal.Instant attached = 4;
*/
public boolean hasAttached() {
return attachedBuilder_ != null || attached_ != null;
}
/**
*
* Timestamp for when this foreign reference was attached to a given menu product. This timestamp should only be set
* once, upon original creation/linking of the foreign reference.
*
*
* .opencannabis.temporal.Instant attached = 4;
*/
public io.opencannabis.schema.temporal.TemporalInstant.Instant getAttached() {
if (attachedBuilder_ == null) {
return attached_ == null ? io.opencannabis.schema.temporal.TemporalInstant.Instant.getDefaultInstance() : attached_;
} else {
return attachedBuilder_.getMessage();
}
}
/**
*
* Timestamp for when this foreign reference was attached to a given menu product. This timestamp should only be set
* once, upon original creation/linking of the foreign reference.
*
*
* .opencannabis.temporal.Instant attached = 4;
*/
public Builder setAttached(io.opencannabis.schema.temporal.TemporalInstant.Instant value) {
if (attachedBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
attached_ = value;
onChanged();
} else {
attachedBuilder_.setMessage(value);
}
return this;
}
/**
*
* Timestamp for when this foreign reference was attached to a given menu product. This timestamp should only be set
* once, upon original creation/linking of the foreign reference.
*
*
* .opencannabis.temporal.Instant attached = 4;
*/
public Builder setAttached(
io.opencannabis.schema.temporal.TemporalInstant.Instant.Builder builderForValue) {
if (attachedBuilder_ == null) {
attached_ = builderForValue.build();
onChanged();
} else {
attachedBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Timestamp for when this foreign reference was attached to a given menu product. This timestamp should only be set
* once, upon original creation/linking of the foreign reference.
*
*
* .opencannabis.temporal.Instant attached = 4;
*/
public Builder mergeAttached(io.opencannabis.schema.temporal.TemporalInstant.Instant value) {
if (attachedBuilder_ == null) {
if (attached_ != null) {
attached_ =
io.opencannabis.schema.temporal.TemporalInstant.Instant.newBuilder(attached_).mergeFrom(value).buildPartial();
} else {
attached_ = value;
}
onChanged();
} else {
attachedBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Timestamp for when this foreign reference was attached to a given menu product. This timestamp should only be set
* once, upon original creation/linking of the foreign reference.
*
*
* .opencannabis.temporal.Instant attached = 4;
*/
public Builder clearAttached() {
if (attachedBuilder_ == null) {
attached_ = null;
onChanged();
} else {
attached_ = null;
attachedBuilder_ = null;
}
return this;
}
/**
*
* Timestamp for when this foreign reference was attached to a given menu product. This timestamp should only be set
* once, upon original creation/linking of the foreign reference.
*
*
* .opencannabis.temporal.Instant attached = 4;
*/
public io.opencannabis.schema.temporal.TemporalInstant.Instant.Builder getAttachedBuilder() {
onChanged();
return getAttachedFieldBuilder().getBuilder();
}
/**
*
* Timestamp for when this foreign reference was attached to a given menu product. This timestamp should only be set
* once, upon original creation/linking of the foreign reference.
*
*
* .opencannabis.temporal.Instant attached = 4;
*/
public io.opencannabis.schema.temporal.TemporalInstant.InstantOrBuilder getAttachedOrBuilder() {
if (attachedBuilder_ != null) {
return attachedBuilder_.getMessageOrBuilder();
} else {
return attached_ == null ?
io.opencannabis.schema.temporal.TemporalInstant.Instant.getDefaultInstance() : attached_;
}
}
/**
*
* Timestamp for when this foreign reference was attached to a given menu product. This timestamp should only be set
* once, upon original creation/linking of the foreign reference.
*
*
* .opencannabis.temporal.Instant attached = 4;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.opencannabis.schema.temporal.TemporalInstant.Instant, io.opencannabis.schema.temporal.TemporalInstant.Instant.Builder, io.opencannabis.schema.temporal.TemporalInstant.InstantOrBuilder>
getAttachedFieldBuilder() {
if (attachedBuilder_ == null) {
attachedBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.opencannabis.schema.temporal.TemporalInstant.Instant, io.opencannabis.schema.temporal.TemporalInstant.Instant.Builder, io.opencannabis.schema.temporal.TemporalInstant.InstantOrBuilder>(
getAttached(),
getParentForChildren(),
isClean());
attached_ = null;
}
return attachedBuilder_;
}
private io.opencannabis.schema.temporal.TemporalInstant.Instant validated_;
private com.google.protobuf.SingleFieldBuilderV3<
io.opencannabis.schema.temporal.TemporalInstant.Instant, io.opencannabis.schema.temporal.TemporalInstant.Instant.Builder, io.opencannabis.schema.temporal.TemporalInstant.InstantOrBuilder> validatedBuilder_;
/**
*
* Timestamp indicating when this foreign product reference was last validated with the foreign system. Each time an
* item is fetched or otherwise synchronized, this should be updated.
*
*
* .opencannabis.temporal.Instant validated = 5;
*/
public boolean hasValidated() {
return validatedBuilder_ != null || validated_ != null;
}
/**
*
* Timestamp indicating when this foreign product reference was last validated with the foreign system. Each time an
* item is fetched or otherwise synchronized, this should be updated.
*
*
* .opencannabis.temporal.Instant validated = 5;
*/
public io.opencannabis.schema.temporal.TemporalInstant.Instant getValidated() {
if (validatedBuilder_ == null) {
return validated_ == null ? io.opencannabis.schema.temporal.TemporalInstant.Instant.getDefaultInstance() : validated_;
} else {
return validatedBuilder_.getMessage();
}
}
/**
*
* Timestamp indicating when this foreign product reference was last validated with the foreign system. Each time an
* item is fetched or otherwise synchronized, this should be updated.
*
*
* .opencannabis.temporal.Instant validated = 5;
*/
public Builder setValidated(io.opencannabis.schema.temporal.TemporalInstant.Instant value) {
if (validatedBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
validated_ = value;
onChanged();
} else {
validatedBuilder_.setMessage(value);
}
return this;
}
/**
*
* Timestamp indicating when this foreign product reference was last validated with the foreign system. Each time an
* item is fetched or otherwise synchronized, this should be updated.
*
*
* .opencannabis.temporal.Instant validated = 5;
*/
public Builder setValidated(
io.opencannabis.schema.temporal.TemporalInstant.Instant.Builder builderForValue) {
if (validatedBuilder_ == null) {
validated_ = builderForValue.build();
onChanged();
} else {
validatedBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Timestamp indicating when this foreign product reference was last validated with the foreign system. Each time an
* item is fetched or otherwise synchronized, this should be updated.
*
*
* .opencannabis.temporal.Instant validated = 5;
*/
public Builder mergeValidated(io.opencannabis.schema.temporal.TemporalInstant.Instant value) {
if (validatedBuilder_ == null) {
if (validated_ != null) {
validated_ =
io.opencannabis.schema.temporal.TemporalInstant.Instant.newBuilder(validated_).mergeFrom(value).buildPartial();
} else {
validated_ = value;
}
onChanged();
} else {
validatedBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Timestamp indicating when this foreign product reference was last validated with the foreign system. Each time an
* item is fetched or otherwise synchronized, this should be updated.
*
*
* .opencannabis.temporal.Instant validated = 5;
*/
public Builder clearValidated() {
if (validatedBuilder_ == null) {
validated_ = null;
onChanged();
} else {
validated_ = null;
validatedBuilder_ = null;
}
return this;
}
/**
*
* Timestamp indicating when this foreign product reference was last validated with the foreign system. Each time an
* item is fetched or otherwise synchronized, this should be updated.
*
*
* .opencannabis.temporal.Instant validated = 5;
*/
public io.opencannabis.schema.temporal.TemporalInstant.Instant.Builder getValidatedBuilder() {
onChanged();
return getValidatedFieldBuilder().getBuilder();
}
/**
*
* Timestamp indicating when this foreign product reference was last validated with the foreign system. Each time an
* item is fetched or otherwise synchronized, this should be updated.
*
*
* .opencannabis.temporal.Instant validated = 5;
*/
public io.opencannabis.schema.temporal.TemporalInstant.InstantOrBuilder getValidatedOrBuilder() {
if (validatedBuilder_ != null) {
return validatedBuilder_.getMessageOrBuilder();
} else {
return validated_ == null ?
io.opencannabis.schema.temporal.TemporalInstant.Instant.getDefaultInstance() : validated_;
}
}
/**
*
* Timestamp indicating when this foreign product reference was last validated with the foreign system. Each time an
* item is fetched or otherwise synchronized, this should be updated.
*
*
* .opencannabis.temporal.Instant validated = 5;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.opencannabis.schema.temporal.TemporalInstant.Instant, io.opencannabis.schema.temporal.TemporalInstant.Instant.Builder, io.opencannabis.schema.temporal.TemporalInstant.InstantOrBuilder>
getValidatedFieldBuilder() {
if (validatedBuilder_ == null) {
validatedBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.opencannabis.schema.temporal.TemporalInstant.Instant, io.opencannabis.schema.temporal.TemporalInstant.Instant.Builder, io.opencannabis.schema.temporal.TemporalInstant.InstantOrBuilder>(
getValidated(),
getParentForChildren(),
isClean());
validated_ = null;
}
return validatedBuilder_;
}
@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.products.menu.ForeignReference)
}
// @@protoc_insertion_point(class_scope:opencannabis.products.menu.ForeignReference)
private static final io.opencannabis.schema.menu.ForeignReference DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.opencannabis.schema.menu.ForeignReference();
}
public static io.opencannabis.schema.menu.ForeignReference getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ForeignReference parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ForeignReference(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.menu.ForeignReference getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy