All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.openlca.proto.ProtoRef Maven / Gradle / Ivy

There is a newer version: 2.0.1
Show newest version
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: olca.proto

package org.openlca.proto;

/**
 * 
 * A Ref is a reference to a [RootEntity]. When serializing an entity (e.g. a
 * [Process]) that references another standalone entity (e.g. a [Flow] in an
 * [Exchange]) we do not want to write the complete referenced entity into the
 * serialized JSON object but just a reference. However, the reference contains
 * some meta-data like name, category path etc. that are useful to display.
 * 
* * Protobuf type {@code protolca.ProtoRef} */ public final class ProtoRef extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:protolca.ProtoRef) ProtoRefOrBuilder { private static final long serialVersionUID = 0L; // Use ProtoRef.newBuilder() to construct. private ProtoRef(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private ProtoRef() { id_ = ""; name_ = ""; description_ = ""; version_ = ""; lastChange_ = ""; type_ = 0; categoryPath_ = com.google.protobuf.LazyStringArrayList.EMPTY; library_ = ""; refUnit_ = ""; location_ = ""; flowType_ = 0; processType_ = 0; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new ProtoRef(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private ProtoRef( 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 18: { java.lang.String s = input.readStringRequireUtf8(); name_ = s; break; } case 26: { java.lang.String s = input.readStringRequireUtf8(); description_ = s; break; } case 34: { java.lang.String s = input.readStringRequireUtf8(); version_ = s; break; } case 42: { java.lang.String s = input.readStringRequireUtf8(); lastChange_ = s; break; } case 48: { int rawValue = input.readEnum(); type_ = rawValue; break; } case 58: { java.lang.String s = input.readStringRequireUtf8(); if (!((mutable_bitField0_ & 0x00000001) != 0)) { categoryPath_ = new com.google.protobuf.LazyStringArrayList(); mutable_bitField0_ |= 0x00000001; } categoryPath_.add(s); break; } case 66: { java.lang.String s = input.readStringRequireUtf8(); library_ = s; break; } case 74: { java.lang.String s = input.readStringRequireUtf8(); refUnit_ = s; break; } case 82: { java.lang.String s = input.readStringRequireUtf8(); location_ = s; break; } case 88: { int rawValue = input.readEnum(); flowType_ = rawValue; break; } case 96: { int rawValue = input.readEnum(); processType_ = 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 { if (((mutable_bitField0_ & 0x00000001) != 0)) { categoryPath_ = categoryPath_.getUnmodifiableView(); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.openlca.proto.Proto.internal_static_protolca_ProtoRef_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return org.openlca.proto.Proto.internal_static_protolca_ProtoRef_fieldAccessorTable .ensureFieldAccessorsInitialized( org.openlca.proto.ProtoRef.class, org.openlca.proto.ProtoRef.Builder.class); } public static final int ID_FIELD_NUMBER = 1; private volatile java.lang.Object id_; /** *
   * The reference ID (typically an UUID) of the entity.
   * 
* * string id = 1 [json_name = "@id"]; * @return The id. */ @java.lang.Override 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; } } /** *
   * The reference ID (typically an UUID) of the entity.
   * 
* * string id = 1 [json_name = "@id"]; * @return The bytes for id. */ @java.lang.Override 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 NAME_FIELD_NUMBER = 2; private volatile java.lang.Object name_; /** *
   * The name of the entity.
   * 
* * string name = 2; * @return The name. */ @java.lang.Override public java.lang.String getName() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } } /** *
   * The name of the entity.
   * 
* * string name = 2; * @return The bytes for name. */ @java.lang.Override public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int DESCRIPTION_FIELD_NUMBER = 3; private volatile java.lang.Object description_; /** *
   * The description of the entity.
   * 
* * string description = 3; * @return The description. */ @java.lang.Override public java.lang.String getDescription() { java.lang.Object ref = description_; 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(); description_ = s; return s; } } /** *
   * The description of the entity.
   * 
* * string description = 3; * @return The bytes for description. */ @java.lang.Override public com.google.protobuf.ByteString getDescriptionBytes() { java.lang.Object ref = description_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); description_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int VERSION_FIELD_NUMBER = 4; private volatile java.lang.Object version_; /** *
   * A version number in MAJOR.MINOR.PATCH format where the MINOR and PATCH
   * fields are optional and the fields may have leading zeros (so 01.00.00 is
   * the same as 1.0.0 or 1).
   * 
* * string version = 4; * @return The version. */ @java.lang.Override public java.lang.String getVersion() { java.lang.Object ref = version_; 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(); version_ = s; return s; } } /** *
   * A version number in MAJOR.MINOR.PATCH format where the MINOR and PATCH
   * fields are optional and the fields may have leading zeros (so 01.00.00 is
   * the same as 1.0.0 or 1).
   * 
* * string version = 4; * @return The bytes for version. */ @java.lang.Override public com.google.protobuf.ByteString getVersionBytes() { java.lang.Object ref = version_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); version_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int LAST_CHANGE_FIELD_NUMBER = 5; private volatile java.lang.Object lastChange_; /** *
   * The timestamp when the entity was changed the last time.
   * 
* * string last_change = 5; * @return The lastChange. */ @java.lang.Override public java.lang.String getLastChange() { java.lang.Object ref = lastChange_; 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(); lastChange_ = s; return s; } } /** *
   * The timestamp when the entity was changed the last time.
   * 
* * string last_change = 5; * @return The bytes for lastChange. */ @java.lang.Override public com.google.protobuf.ByteString getLastChangeBytes() { java.lang.Object ref = lastChange_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); lastChange_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int TYPE_FIELD_NUMBER = 6; private int type_; /** *
   * The type name of the respective entity.
   * 
* * .protolca.ProtoType type = 6 [json_name = "@type"]; * @return The enum numeric value on the wire for type. */ @java.lang.Override public int getTypeValue() { return type_; } /** *
   * The type name of the respective entity.
   * 
* * .protolca.ProtoType type = 6 [json_name = "@type"]; * @return The type. */ @java.lang.Override public org.openlca.proto.ProtoType getType() { @SuppressWarnings("deprecation") org.openlca.proto.ProtoType result = org.openlca.proto.ProtoType.valueOf(type_); return result == null ? org.openlca.proto.ProtoType.UNRECOGNIZED : result; } public static final int CATEGORY_PATH_FIELD_NUMBER = 7; private com.google.protobuf.LazyStringList categoryPath_; /** *
   * The full path of the category of the referenced entity from top to bottom,
   * e.g. `"Elementary flows", "Emissions to air", "unspecified"`.
   * 
* * repeated string category_path = 7; * @return A list containing the categoryPath. */ public com.google.protobuf.ProtocolStringList getCategoryPathList() { return categoryPath_; } /** *
   * The full path of the category of the referenced entity from top to bottom,
   * e.g. `"Elementary flows", "Emissions to air", "unspecified"`.
   * 
* * repeated string category_path = 7; * @return The count of categoryPath. */ public int getCategoryPathCount() { return categoryPath_.size(); } /** *
   * The full path of the category of the referenced entity from top to bottom,
   * e.g. `"Elementary flows", "Emissions to air", "unspecified"`.
   * 
* * repeated string category_path = 7; * @param index The index of the element to return. * @return The categoryPath at the given index. */ public java.lang.String getCategoryPath(int index) { return categoryPath_.get(index); } /** *
   * The full path of the category of the referenced entity from top to bottom,
   * e.g. `"Elementary flows", "Emissions to air", "unspecified"`.
   * 
* * repeated string category_path = 7; * @param index The index of the value to return. * @return The bytes of the categoryPath at the given index. */ public com.google.protobuf.ByteString getCategoryPathBytes(int index) { return categoryPath_.getByteString(index); } public static final int LIBRARY_FIELD_NUMBER = 8; private volatile java.lang.Object library_; /** *
   * If the entity that is described by this reference is part of a library,
   * this field contains the identifier of that library. The identifier is
   * typically just the combination of the library name and version.
   * 
* * string library = 8; * @return The library. */ @java.lang.Override public java.lang.String getLibrary() { java.lang.Object ref = library_; 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(); library_ = s; return s; } } /** *
   * If the entity that is described by this reference is part of a library,
   * this field contains the identifier of that library. The identifier is
   * typically just the combination of the library name and version.
   * 
* * string library = 8; * @return The bytes for library. */ @java.lang.Override public com.google.protobuf.ByteString getLibraryBytes() { java.lang.Object ref = library_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); library_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int REF_UNIT_FIELD_NUMBER = 9; private volatile java.lang.Object refUnit_; /** *
   * This field is only valid for references of flows or impact categories and
   * contains the name (symbol) of the reference unit of that respective flow
   * or impact category.
   * 
* * string ref_unit = 9; * @return The refUnit. */ @java.lang.Override public java.lang.String getRefUnit() { java.lang.Object ref = refUnit_; 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(); refUnit_ = s; return s; } } /** *
   * This field is only valid for references of flows or impact categories and
   * contains the name (symbol) of the reference unit of that respective flow
   * or impact category.
   * 
* * string ref_unit = 9; * @return The bytes for refUnit. */ @java.lang.Override public com.google.protobuf.ByteString getRefUnitBytes() { java.lang.Object ref = refUnit_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); refUnit_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int LOCATION_FIELD_NUMBER = 10; private volatile java.lang.Object location_; /** *
   * This field is only valid for references of processes or flows and contains
   * the location name or code of that respective process or flow.
   * 
* * string location = 10; * @return The location. */ @java.lang.Override public java.lang.String getLocation() { java.lang.Object ref = location_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); location_ = s; return s; } } /** *
   * This field is only valid for references of processes or flows and contains
   * the location name or code of that respective process or flow.
   * 
* * string location = 10; * @return The bytes for location. */ @java.lang.Override public com.google.protobuf.ByteString getLocationBytes() { java.lang.Object ref = location_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); location_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int FLOW_TYPE_FIELD_NUMBER = 11; private int flowType_; /** *
   * In case of a reference to a flow, this field can contain the type of flow
   * that is referenced.
   * 
* * .protolca.ProtoFlowType flow_type = 11; * @return The enum numeric value on the wire for flowType. */ @java.lang.Override public int getFlowTypeValue() { return flowType_; } /** *
   * In case of a reference to a flow, this field can contain the type of flow
   * that is referenced.
   * 
* * .protolca.ProtoFlowType flow_type = 11; * @return The flowType. */ @java.lang.Override public org.openlca.proto.ProtoFlowType getFlowType() { @SuppressWarnings("deprecation") org.openlca.proto.ProtoFlowType result = org.openlca.proto.ProtoFlowType.valueOf(flowType_); return result == null ? org.openlca.proto.ProtoFlowType.UNRECOGNIZED : result; } public static final int PROCESS_TYPE_FIELD_NUMBER = 12; private int processType_; /** *
   * In case of a reference to a process, this fiel can contain the type of
   * process that is referenced.
   * 
* * .protolca.ProtoProcessType process_type = 12; * @return The enum numeric value on the wire for processType. */ @java.lang.Override public int getProcessTypeValue() { return processType_; } /** *
   * In case of a reference to a process, this fiel can contain the type of
   * process that is referenced.
   * 
* * .protolca.ProtoProcessType process_type = 12; * @return The processType. */ @java.lang.Override public org.openlca.proto.ProtoProcessType getProcessType() { @SuppressWarnings("deprecation") org.openlca.proto.ProtoProcessType result = org.openlca.proto.ProtoProcessType.valueOf(processType_); return result == null ? org.openlca.proto.ProtoProcessType.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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, version_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(lastChange_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, lastChange_); } if (type_ != org.openlca.proto.ProtoType.Undefined.getNumber()) { output.writeEnum(6, type_); } for (int i = 0; i < categoryPath_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 7, categoryPath_.getRaw(i)); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(library_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 8, library_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(refUnit_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 9, refUnit_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(location_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 10, location_); } if (flowType_ != org.openlca.proto.ProtoFlowType.UNDEFINED_FLOW_TYPE.getNumber()) { output.writeEnum(11, flowType_); } if (processType_ != org.openlca.proto.ProtoProcessType.UNDEFINED_PROCESS_TYPE.getNumber()) { output.writeEnum(12, processType_); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, version_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(lastChange_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, lastChange_); } if (type_ != org.openlca.proto.ProtoType.Undefined.getNumber()) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(6, type_); } { int dataSize = 0; for (int i = 0; i < categoryPath_.size(); i++) { dataSize += computeStringSizeNoTag(categoryPath_.getRaw(i)); } size += dataSize; size += 1 * getCategoryPathList().size(); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(library_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, library_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(refUnit_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, refUnit_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(location_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, location_); } if (flowType_ != org.openlca.proto.ProtoFlowType.UNDEFINED_FLOW_TYPE.getNumber()) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(11, flowType_); } if (processType_ != org.openlca.proto.ProtoProcessType.UNDEFINED_PROCESS_TYPE.getNumber()) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(12, processType_); } 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 org.openlca.proto.ProtoRef)) { return super.equals(obj); } org.openlca.proto.ProtoRef other = (org.openlca.proto.ProtoRef) obj; if (!getId() .equals(other.getId())) return false; if (!getName() .equals(other.getName())) return false; if (!getDescription() .equals(other.getDescription())) return false; if (!getVersion() .equals(other.getVersion())) return false; if (!getLastChange() .equals(other.getLastChange())) return false; if (type_ != other.type_) return false; if (!getCategoryPathList() .equals(other.getCategoryPathList())) return false; if (!getLibrary() .equals(other.getLibrary())) return false; if (!getRefUnit() .equals(other.getRefUnit())) return false; if (!getLocation() .equals(other.getLocation())) return false; if (flowType_ != other.flowType_) return false; if (processType_ != other.processType_) 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) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; hash = (53 * hash) + getDescription().hashCode(); hash = (37 * hash) + VERSION_FIELD_NUMBER; hash = (53 * hash) + getVersion().hashCode(); hash = (37 * hash) + LAST_CHANGE_FIELD_NUMBER; hash = (53 * hash) + getLastChange().hashCode(); hash = (37 * hash) + TYPE_FIELD_NUMBER; hash = (53 * hash) + type_; if (getCategoryPathCount() > 0) { hash = (37 * hash) + CATEGORY_PATH_FIELD_NUMBER; hash = (53 * hash) + getCategoryPathList().hashCode(); } hash = (37 * hash) + LIBRARY_FIELD_NUMBER; hash = (53 * hash) + getLibrary().hashCode(); hash = (37 * hash) + REF_UNIT_FIELD_NUMBER; hash = (53 * hash) + getRefUnit().hashCode(); hash = (37 * hash) + LOCATION_FIELD_NUMBER; hash = (53 * hash) + getLocation().hashCode(); hash = (37 * hash) + FLOW_TYPE_FIELD_NUMBER; hash = (53 * hash) + flowType_; hash = (37 * hash) + PROCESS_TYPE_FIELD_NUMBER; hash = (53 * hash) + processType_; hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static org.openlca.proto.ProtoRef parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.openlca.proto.ProtoRef parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.openlca.proto.ProtoRef parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.openlca.proto.ProtoRef parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.openlca.proto.ProtoRef parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.openlca.proto.ProtoRef parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.openlca.proto.ProtoRef parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static org.openlca.proto.ProtoRef 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 org.openlca.proto.ProtoRef parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static org.openlca.proto.ProtoRef 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 org.openlca.proto.ProtoRef parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static org.openlca.proto.ProtoRef 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(org.openlca.proto.ProtoRef 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; } /** *
   * A Ref is a reference to a [RootEntity]. When serializing an entity (e.g. a
   * [Process]) that references another standalone entity (e.g. a [Flow] in an
   * [Exchange]) we do not want to write the complete referenced entity into the
   * serialized JSON object but just a reference. However, the reference contains
   * some meta-data like name, category path etc. that are useful to display.
   * 
* * Protobuf type {@code protolca.ProtoRef} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:protolca.ProtoRef) org.openlca.proto.ProtoRefOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.openlca.proto.Proto.internal_static_protolca_ProtoRef_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return org.openlca.proto.Proto.internal_static_protolca_ProtoRef_fieldAccessorTable .ensureFieldAccessorsInitialized( org.openlca.proto.ProtoRef.class, org.openlca.proto.ProtoRef.Builder.class); } // Construct using org.openlca.proto.ProtoRef.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_ = ""; name_ = ""; description_ = ""; version_ = ""; lastChange_ = ""; type_ = 0; categoryPath_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000001); library_ = ""; refUnit_ = ""; location_ = ""; flowType_ = 0; processType_ = 0; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.openlca.proto.Proto.internal_static_protolca_ProtoRef_descriptor; } @java.lang.Override public org.openlca.proto.ProtoRef getDefaultInstanceForType() { return org.openlca.proto.ProtoRef.getDefaultInstance(); } @java.lang.Override public org.openlca.proto.ProtoRef build() { org.openlca.proto.ProtoRef result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public org.openlca.proto.ProtoRef buildPartial() { org.openlca.proto.ProtoRef result = new org.openlca.proto.ProtoRef(this); int from_bitField0_ = bitField0_; result.id_ = id_; result.name_ = name_; result.description_ = description_; result.version_ = version_; result.lastChange_ = lastChange_; result.type_ = type_; if (((bitField0_ & 0x00000001) != 0)) { categoryPath_ = categoryPath_.getUnmodifiableView(); bitField0_ = (bitField0_ & ~0x00000001); } result.categoryPath_ = categoryPath_; result.library_ = library_; result.refUnit_ = refUnit_; result.location_ = location_; result.flowType_ = flowType_; result.processType_ = processType_; 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 org.openlca.proto.ProtoRef) { return mergeFrom((org.openlca.proto.ProtoRef)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(org.openlca.proto.ProtoRef other) { if (other == org.openlca.proto.ProtoRef.getDefaultInstance()) return this; if (!other.getId().isEmpty()) { id_ = other.id_; onChanged(); } if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); } if (!other.getDescription().isEmpty()) { description_ = other.description_; onChanged(); } if (!other.getVersion().isEmpty()) { version_ = other.version_; onChanged(); } if (!other.getLastChange().isEmpty()) { lastChange_ = other.lastChange_; onChanged(); } if (other.type_ != 0) { setTypeValue(other.getTypeValue()); } if (!other.categoryPath_.isEmpty()) { if (categoryPath_.isEmpty()) { categoryPath_ = other.categoryPath_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureCategoryPathIsMutable(); categoryPath_.addAll(other.categoryPath_); } onChanged(); } if (!other.getLibrary().isEmpty()) { library_ = other.library_; onChanged(); } if (!other.getRefUnit().isEmpty()) { refUnit_ = other.refUnit_; onChanged(); } if (!other.getLocation().isEmpty()) { location_ = other.location_; onChanged(); } if (other.flowType_ != 0) { setFlowTypeValue(other.getFlowTypeValue()); } if (other.processType_ != 0) { setProcessTypeValue(other.getProcessTypeValue()); } 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 { org.openlca.proto.ProtoRef parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (org.openlca.proto.ProtoRef) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private java.lang.Object id_ = ""; /** *
     * The reference ID (typically an UUID) of the entity.
     * 
* * string id = 1 [json_name = "@id"]; * @return The id. */ 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; } } /** *
     * The reference ID (typically an UUID) of the entity.
     * 
* * string id = 1 [json_name = "@id"]; * @return The bytes for id. */ 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; } } /** *
     * The reference ID (typically an UUID) of the entity.
     * 
* * string id = 1 [json_name = "@id"]; * @param value The id to set. * @return This builder for chaining. */ public Builder setId( java.lang.String value) { if (value == null) { throw new NullPointerException(); } id_ = value; onChanged(); return this; } /** *
     * The reference ID (typically an UUID) of the entity.
     * 
* * string id = 1 [json_name = "@id"]; * @return This builder for chaining. */ public Builder clearId() { id_ = getDefaultInstance().getId(); onChanged(); return this; } /** *
     * The reference ID (typically an UUID) of the entity.
     * 
* * string id = 1 [json_name = "@id"]; * @param value The bytes for id to set. * @return This builder for chaining. */ public Builder setIdBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); id_ = value; onChanged(); return this; } private java.lang.Object name_ = ""; /** *
     * The name of the entity.
     * 
* * string name = 2; * @return The name. */ public java.lang.String getName() { java.lang.Object ref = name_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } else { return (java.lang.String) ref; } } /** *
     * The name of the entity.
     * 
* * string name = 2; * @return The bytes for name. */ public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * The name of the entity.
     * 
* * string name = 2; * @param value The name to set. * @return This builder for chaining. */ public Builder setName( java.lang.String value) { if (value == null) { throw new NullPointerException(); } name_ = value; onChanged(); return this; } /** *
     * The name of the entity.
     * 
* * string name = 2; * @return This builder for chaining. */ public Builder clearName() { name_ = getDefaultInstance().getName(); onChanged(); return this; } /** *
     * The name of the entity.
     * 
* * string name = 2; * @param value The bytes for name to set. * @return This builder for chaining. */ public Builder setNameBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); name_ = value; onChanged(); return this; } private java.lang.Object description_ = ""; /** *
     * The description of the entity.
     * 
* * string description = 3; * @return The description. */ public java.lang.String getDescription() { java.lang.Object ref = description_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); description_ = s; return s; } else { return (java.lang.String) ref; } } /** *
     * The description of the entity.
     * 
* * string description = 3; * @return The bytes for description. */ public com.google.protobuf.ByteString getDescriptionBytes() { java.lang.Object ref = description_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); description_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * The description of the entity.
     * 
* * string description = 3; * @param value The description to set. * @return This builder for chaining. */ public Builder setDescription( java.lang.String value) { if (value == null) { throw new NullPointerException(); } description_ = value; onChanged(); return this; } /** *
     * The description of the entity.
     * 
* * string description = 3; * @return This builder for chaining. */ public Builder clearDescription() { description_ = getDefaultInstance().getDescription(); onChanged(); return this; } /** *
     * The description of the entity.
     * 
* * string description = 3; * @param value The bytes for description to set. * @return This builder for chaining. */ public Builder setDescriptionBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); description_ = value; onChanged(); return this; } private java.lang.Object version_ = ""; /** *
     * A version number in MAJOR.MINOR.PATCH format where the MINOR and PATCH
     * fields are optional and the fields may have leading zeros (so 01.00.00 is
     * the same as 1.0.0 or 1).
     * 
* * string version = 4; * @return The version. */ public java.lang.String getVersion() { java.lang.Object ref = version_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); version_ = s; return s; } else { return (java.lang.String) ref; } } /** *
     * A version number in MAJOR.MINOR.PATCH format where the MINOR and PATCH
     * fields are optional and the fields may have leading zeros (so 01.00.00 is
     * the same as 1.0.0 or 1).
     * 
* * string version = 4; * @return The bytes for version. */ public com.google.protobuf.ByteString getVersionBytes() { java.lang.Object ref = version_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); version_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * A version number in MAJOR.MINOR.PATCH format where the MINOR and PATCH
     * fields are optional and the fields may have leading zeros (so 01.00.00 is
     * the same as 1.0.0 or 1).
     * 
* * string version = 4; * @param value The version to set. * @return This builder for chaining. */ public Builder setVersion( java.lang.String value) { if (value == null) { throw new NullPointerException(); } version_ = value; onChanged(); return this; } /** *
     * A version number in MAJOR.MINOR.PATCH format where the MINOR and PATCH
     * fields are optional and the fields may have leading zeros (so 01.00.00 is
     * the same as 1.0.0 or 1).
     * 
* * string version = 4; * @return This builder for chaining. */ public Builder clearVersion() { version_ = getDefaultInstance().getVersion(); onChanged(); return this; } /** *
     * A version number in MAJOR.MINOR.PATCH format where the MINOR and PATCH
     * fields are optional and the fields may have leading zeros (so 01.00.00 is
     * the same as 1.0.0 or 1).
     * 
* * string version = 4; * @param value The bytes for version to set. * @return This builder for chaining. */ public Builder setVersionBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); version_ = value; onChanged(); return this; } private java.lang.Object lastChange_ = ""; /** *
     * The timestamp when the entity was changed the last time.
     * 
* * string last_change = 5; * @return The lastChange. */ public java.lang.String getLastChange() { java.lang.Object ref = lastChange_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); lastChange_ = s; return s; } else { return (java.lang.String) ref; } } /** *
     * The timestamp when the entity was changed the last time.
     * 
* * string last_change = 5; * @return The bytes for lastChange. */ public com.google.protobuf.ByteString getLastChangeBytes() { java.lang.Object ref = lastChange_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); lastChange_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * The timestamp when the entity was changed the last time.
     * 
* * string last_change = 5; * @param value The lastChange to set. * @return This builder for chaining. */ public Builder setLastChange( java.lang.String value) { if (value == null) { throw new NullPointerException(); } lastChange_ = value; onChanged(); return this; } /** *
     * The timestamp when the entity was changed the last time.
     * 
* * string last_change = 5; * @return This builder for chaining. */ public Builder clearLastChange() { lastChange_ = getDefaultInstance().getLastChange(); onChanged(); return this; } /** *
     * The timestamp when the entity was changed the last time.
     * 
* * string last_change = 5; * @param value The bytes for lastChange to set. * @return This builder for chaining. */ public Builder setLastChangeBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); lastChange_ = value; onChanged(); return this; } private int type_ = 0; /** *
     * The type name of the respective entity.
     * 
* * .protolca.ProtoType type = 6 [json_name = "@type"]; * @return The enum numeric value on the wire for type. */ @java.lang.Override public int getTypeValue() { return type_; } /** *
     * The type name of the respective entity.
     * 
* * .protolca.ProtoType type = 6 [json_name = "@type"]; * @param value The enum numeric value on the wire for type to set. * @return This builder for chaining. */ public Builder setTypeValue(int value) { type_ = value; onChanged(); return this; } /** *
     * The type name of the respective entity.
     * 
* * .protolca.ProtoType type = 6 [json_name = "@type"]; * @return The type. */ @java.lang.Override public org.openlca.proto.ProtoType getType() { @SuppressWarnings("deprecation") org.openlca.proto.ProtoType result = org.openlca.proto.ProtoType.valueOf(type_); return result == null ? org.openlca.proto.ProtoType.UNRECOGNIZED : result; } /** *
     * The type name of the respective entity.
     * 
* * .protolca.ProtoType type = 6 [json_name = "@type"]; * @param value The type to set. * @return This builder for chaining. */ public Builder setType(org.openlca.proto.ProtoType value) { if (value == null) { throw new NullPointerException(); } type_ = value.getNumber(); onChanged(); return this; } /** *
     * The type name of the respective entity.
     * 
* * .protolca.ProtoType type = 6 [json_name = "@type"]; * @return This builder for chaining. */ public Builder clearType() { type_ = 0; onChanged(); return this; } private com.google.protobuf.LazyStringList categoryPath_ = com.google.protobuf.LazyStringArrayList.EMPTY; private void ensureCategoryPathIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { categoryPath_ = new com.google.protobuf.LazyStringArrayList(categoryPath_); bitField0_ |= 0x00000001; } } /** *
     * The full path of the category of the referenced entity from top to bottom,
     * e.g. `"Elementary flows", "Emissions to air", "unspecified"`.
     * 
* * repeated string category_path = 7; * @return A list containing the categoryPath. */ public com.google.protobuf.ProtocolStringList getCategoryPathList() { return categoryPath_.getUnmodifiableView(); } /** *
     * The full path of the category of the referenced entity from top to bottom,
     * e.g. `"Elementary flows", "Emissions to air", "unspecified"`.
     * 
* * repeated string category_path = 7; * @return The count of categoryPath. */ public int getCategoryPathCount() { return categoryPath_.size(); } /** *
     * The full path of the category of the referenced entity from top to bottom,
     * e.g. `"Elementary flows", "Emissions to air", "unspecified"`.
     * 
* * repeated string category_path = 7; * @param index The index of the element to return. * @return The categoryPath at the given index. */ public java.lang.String getCategoryPath(int index) { return categoryPath_.get(index); } /** *
     * The full path of the category of the referenced entity from top to bottom,
     * e.g. `"Elementary flows", "Emissions to air", "unspecified"`.
     * 
* * repeated string category_path = 7; * @param index The index of the value to return. * @return The bytes of the categoryPath at the given index. */ public com.google.protobuf.ByteString getCategoryPathBytes(int index) { return categoryPath_.getByteString(index); } /** *
     * The full path of the category of the referenced entity from top to bottom,
     * e.g. `"Elementary flows", "Emissions to air", "unspecified"`.
     * 
* * repeated string category_path = 7; * @param index The index to set the value at. * @param value The categoryPath to set. * @return This builder for chaining. */ public Builder setCategoryPath( int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureCategoryPathIsMutable(); categoryPath_.set(index, value); onChanged(); return this; } /** *
     * The full path of the category of the referenced entity from top to bottom,
     * e.g. `"Elementary flows", "Emissions to air", "unspecified"`.
     * 
* * repeated string category_path = 7; * @param value The categoryPath to add. * @return This builder for chaining. */ public Builder addCategoryPath( java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureCategoryPathIsMutable(); categoryPath_.add(value); onChanged(); return this; } /** *
     * The full path of the category of the referenced entity from top to bottom,
     * e.g. `"Elementary flows", "Emissions to air", "unspecified"`.
     * 
* * repeated string category_path = 7; * @param values The categoryPath to add. * @return This builder for chaining. */ public Builder addAllCategoryPath( java.lang.Iterable values) { ensureCategoryPathIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, categoryPath_); onChanged(); return this; } /** *
     * The full path of the category of the referenced entity from top to bottom,
     * e.g. `"Elementary flows", "Emissions to air", "unspecified"`.
     * 
* * repeated string category_path = 7; * @return This builder for chaining. */ public Builder clearCategoryPath() { categoryPath_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** *
     * The full path of the category of the referenced entity from top to bottom,
     * e.g. `"Elementary flows", "Emissions to air", "unspecified"`.
     * 
* * repeated string category_path = 7; * @param value The bytes of the categoryPath to add. * @return This builder for chaining. */ public Builder addCategoryPathBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); ensureCategoryPathIsMutable(); categoryPath_.add(value); onChanged(); return this; } private java.lang.Object library_ = ""; /** *
     * If the entity that is described by this reference is part of a library,
     * this field contains the identifier of that library. The identifier is
     * typically just the combination of the library name and version.
     * 
* * string library = 8; * @return The library. */ public java.lang.String getLibrary() { java.lang.Object ref = library_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); library_ = s; return s; } else { return (java.lang.String) ref; } } /** *
     * If the entity that is described by this reference is part of a library,
     * this field contains the identifier of that library. The identifier is
     * typically just the combination of the library name and version.
     * 
* * string library = 8; * @return The bytes for library. */ public com.google.protobuf.ByteString getLibraryBytes() { java.lang.Object ref = library_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); library_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * If the entity that is described by this reference is part of a library,
     * this field contains the identifier of that library. The identifier is
     * typically just the combination of the library name and version.
     * 
* * string library = 8; * @param value The library to set. * @return This builder for chaining. */ public Builder setLibrary( java.lang.String value) { if (value == null) { throw new NullPointerException(); } library_ = value; onChanged(); return this; } /** *
     * If the entity that is described by this reference is part of a library,
     * this field contains the identifier of that library. The identifier is
     * typically just the combination of the library name and version.
     * 
* * string library = 8; * @return This builder for chaining. */ public Builder clearLibrary() { library_ = getDefaultInstance().getLibrary(); onChanged(); return this; } /** *
     * If the entity that is described by this reference is part of a library,
     * this field contains the identifier of that library. The identifier is
     * typically just the combination of the library name and version.
     * 
* * string library = 8; * @param value The bytes for library to set. * @return This builder for chaining. */ public Builder setLibraryBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); library_ = value; onChanged(); return this; } private java.lang.Object refUnit_ = ""; /** *
     * This field is only valid for references of flows or impact categories and
     * contains the name (symbol) of the reference unit of that respective flow
     * or impact category.
     * 
* * string ref_unit = 9; * @return The refUnit. */ public java.lang.String getRefUnit() { java.lang.Object ref = refUnit_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); refUnit_ = s; return s; } else { return (java.lang.String) ref; } } /** *
     * This field is only valid for references of flows or impact categories and
     * contains the name (symbol) of the reference unit of that respective flow
     * or impact category.
     * 
* * string ref_unit = 9; * @return The bytes for refUnit. */ public com.google.protobuf.ByteString getRefUnitBytes() { java.lang.Object ref = refUnit_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); refUnit_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * This field is only valid for references of flows or impact categories and
     * contains the name (symbol) of the reference unit of that respective flow
     * or impact category.
     * 
* * string ref_unit = 9; * @param value The refUnit to set. * @return This builder for chaining. */ public Builder setRefUnit( java.lang.String value) { if (value == null) { throw new NullPointerException(); } refUnit_ = value; onChanged(); return this; } /** *
     * This field is only valid for references of flows or impact categories and
     * contains the name (symbol) of the reference unit of that respective flow
     * or impact category.
     * 
* * string ref_unit = 9; * @return This builder for chaining. */ public Builder clearRefUnit() { refUnit_ = getDefaultInstance().getRefUnit(); onChanged(); return this; } /** *
     * This field is only valid for references of flows or impact categories and
     * contains the name (symbol) of the reference unit of that respective flow
     * or impact category.
     * 
* * string ref_unit = 9; * @param value The bytes for refUnit to set. * @return This builder for chaining. */ public Builder setRefUnitBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); refUnit_ = value; onChanged(); return this; } private java.lang.Object location_ = ""; /** *
     * This field is only valid for references of processes or flows and contains
     * the location name or code of that respective process or flow.
     * 
* * string location = 10; * @return The location. */ public java.lang.String getLocation() { java.lang.Object ref = location_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); location_ = s; return s; } else { return (java.lang.String) ref; } } /** *
     * This field is only valid for references of processes or flows and contains
     * the location name or code of that respective process or flow.
     * 
* * string location = 10; * @return The bytes for location. */ public com.google.protobuf.ByteString getLocationBytes() { java.lang.Object ref = location_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); location_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * This field is only valid for references of processes or flows and contains
     * the location name or code of that respective process or flow.
     * 
* * string location = 10; * @param value The location to set. * @return This builder for chaining. */ public Builder setLocation( java.lang.String value) { if (value == null) { throw new NullPointerException(); } location_ = value; onChanged(); return this; } /** *
     * This field is only valid for references of processes or flows and contains
     * the location name or code of that respective process or flow.
     * 
* * string location = 10; * @return This builder for chaining. */ public Builder clearLocation() { location_ = getDefaultInstance().getLocation(); onChanged(); return this; } /** *
     * This field is only valid for references of processes or flows and contains
     * the location name or code of that respective process or flow.
     * 
* * string location = 10; * @param value The bytes for location to set. * @return This builder for chaining. */ public Builder setLocationBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); location_ = value; onChanged(); return this; } private int flowType_ = 0; /** *
     * In case of a reference to a flow, this field can contain the type of flow
     * that is referenced.
     * 
* * .protolca.ProtoFlowType flow_type = 11; * @return The enum numeric value on the wire for flowType. */ @java.lang.Override public int getFlowTypeValue() { return flowType_; } /** *
     * In case of a reference to a flow, this field can contain the type of flow
     * that is referenced.
     * 
* * .protolca.ProtoFlowType flow_type = 11; * @param value The enum numeric value on the wire for flowType to set. * @return This builder for chaining. */ public Builder setFlowTypeValue(int value) { flowType_ = value; onChanged(); return this; } /** *
     * In case of a reference to a flow, this field can contain the type of flow
     * that is referenced.
     * 
* * .protolca.ProtoFlowType flow_type = 11; * @return The flowType. */ @java.lang.Override public org.openlca.proto.ProtoFlowType getFlowType() { @SuppressWarnings("deprecation") org.openlca.proto.ProtoFlowType result = org.openlca.proto.ProtoFlowType.valueOf(flowType_); return result == null ? org.openlca.proto.ProtoFlowType.UNRECOGNIZED : result; } /** *
     * In case of a reference to a flow, this field can contain the type of flow
     * that is referenced.
     * 
* * .protolca.ProtoFlowType flow_type = 11; * @param value The flowType to set. * @return This builder for chaining. */ public Builder setFlowType(org.openlca.proto.ProtoFlowType value) { if (value == null) { throw new NullPointerException(); } flowType_ = value.getNumber(); onChanged(); return this; } /** *
     * In case of a reference to a flow, this field can contain the type of flow
     * that is referenced.
     * 
* * .protolca.ProtoFlowType flow_type = 11; * @return This builder for chaining. */ public Builder clearFlowType() { flowType_ = 0; onChanged(); return this; } private int processType_ = 0; /** *
     * In case of a reference to a process, this fiel can contain the type of
     * process that is referenced.
     * 
* * .protolca.ProtoProcessType process_type = 12; * @return The enum numeric value on the wire for processType. */ @java.lang.Override public int getProcessTypeValue() { return processType_; } /** *
     * In case of a reference to a process, this fiel can contain the type of
     * process that is referenced.
     * 
* * .protolca.ProtoProcessType process_type = 12; * @param value The enum numeric value on the wire for processType to set. * @return This builder for chaining. */ public Builder setProcessTypeValue(int value) { processType_ = value; onChanged(); return this; } /** *
     * In case of a reference to a process, this fiel can contain the type of
     * process that is referenced.
     * 
* * .protolca.ProtoProcessType process_type = 12; * @return The processType. */ @java.lang.Override public org.openlca.proto.ProtoProcessType getProcessType() { @SuppressWarnings("deprecation") org.openlca.proto.ProtoProcessType result = org.openlca.proto.ProtoProcessType.valueOf(processType_); return result == null ? org.openlca.proto.ProtoProcessType.UNRECOGNIZED : result; } /** *
     * In case of a reference to a process, this fiel can contain the type of
     * process that is referenced.
     * 
* * .protolca.ProtoProcessType process_type = 12; * @param value The processType to set. * @return This builder for chaining. */ public Builder setProcessType(org.openlca.proto.ProtoProcessType value) { if (value == null) { throw new NullPointerException(); } processType_ = value.getNumber(); onChanged(); return this; } /** *
     * In case of a reference to a process, this fiel can contain the type of
     * process that is referenced.
     * 
* * .protolca.ProtoProcessType process_type = 12; * @return This builder for chaining. */ public Builder clearProcessType() { processType_ = 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:protolca.ProtoRef) } // @@protoc_insertion_point(class_scope:protolca.ProtoRef) private static final org.openlca.proto.ProtoRef DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new org.openlca.proto.ProtoRef(); } public static org.openlca.proto.ProtoRef getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public ProtoRef parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new ProtoRef(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 org.openlca.proto.ProtoRef getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy