![JAR search and dependency download from the Maven repository](/logo.png)
io.provenance.metadata.v1.ScopeSpecification Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: provenance/metadata/v1/specification.proto
package io.provenance.metadata.v1;
/**
*
* ScopeSpecification defines the required parties, resources, conditions, and consideration outputs for a contract
*
*
* Protobuf type {@code provenance.metadata.v1.ScopeSpecification}
*/
public final class ScopeSpecification extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:provenance.metadata.v1.ScopeSpecification)
ScopeSpecificationOrBuilder {
private static final long serialVersionUID = 0L;
// Use ScopeSpecification.newBuilder() to construct.
private ScopeSpecification(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ScopeSpecification() {
specificationId_ = com.google.protobuf.ByteString.EMPTY;
ownerAddresses_ = com.google.protobuf.LazyStringArrayList.EMPTY;
partiesInvolved_ = java.util.Collections.emptyList();
contractSpecIds_ = java.util.Collections.emptyList();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private ScopeSpecification(
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: {
specificationId_ = input.readBytes();
break;
}
case 18: {
io.provenance.metadata.v1.Description.Builder subBuilder = null;
if (description_ != null) {
subBuilder = description_.toBuilder();
}
description_ = input.readMessage(io.provenance.metadata.v1.Description.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(description_);
description_ = subBuilder.buildPartial();
}
break;
}
case 26: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
ownerAddresses_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000004;
}
ownerAddresses_.add(s);
break;
}
case 32: {
int rawValue = input.readEnum();
if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
partiesInvolved_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000008;
}
partiesInvolved_.add(rawValue);
break;
}
case 34: {
int length = input.readRawVarint32();
int oldLimit = input.pushLimit(length);
while(input.getBytesUntilLimit() > 0) {
int rawValue = input.readEnum();
if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
partiesInvolved_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000008;
}
partiesInvolved_.add(rawValue);
}
input.popLimit(oldLimit);
break;
}
case 42: {
if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
contractSpecIds_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000010;
}
contractSpecIds_.add(input.readBytes());
break;
}
default: {
if (!parseUnknownFieldProto3(
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_ & 0x00000004) == 0x00000004)) {
ownerAddresses_ = ownerAddresses_.getUnmodifiableView();
}
if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
partiesInvolved_ = java.util.Collections.unmodifiableList(partiesInvolved_);
}
if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
contractSpecIds_ = java.util.Collections.unmodifiableList(contractSpecIds_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.provenance.metadata.v1.Specification.internal_static_provenance_metadata_v1_ScopeSpecification_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.provenance.metadata.v1.Specification.internal_static_provenance_metadata_v1_ScopeSpecification_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.provenance.metadata.v1.ScopeSpecification.class, io.provenance.metadata.v1.ScopeSpecification.Builder.class);
}
private int bitField0_;
public static final int SPECIFICATION_ID_FIELD_NUMBER = 1;
private com.google.protobuf.ByteString specificationId_;
/**
*
* unique identifier for this specification on chain
*
*
* bytes specification_id = 1 [(.gogoproto.nullable) = false, (.gogoproto.customtype) = "MetadataAddress", (.gogoproto.moretags) = "yaml:\"specification_id\""];
*/
public com.google.protobuf.ByteString getSpecificationId() {
return specificationId_;
}
public static final int DESCRIPTION_FIELD_NUMBER = 2;
private io.provenance.metadata.v1.Description description_;
/**
*
* General information about this scope specification.
*
*
* .provenance.metadata.v1.Description description = 2;
*/
public boolean hasDescription() {
return description_ != null;
}
/**
*
* General information about this scope specification.
*
*
* .provenance.metadata.v1.Description description = 2;
*/
public io.provenance.metadata.v1.Description getDescription() {
return description_ == null ? io.provenance.metadata.v1.Description.getDefaultInstance() : description_;
}
/**
*
* General information about this scope specification.
*
*
* .provenance.metadata.v1.Description description = 2;
*/
public io.provenance.metadata.v1.DescriptionOrBuilder getDescriptionOrBuilder() {
return getDescription();
}
public static final int OWNER_ADDRESSES_FIELD_NUMBER = 3;
private com.google.protobuf.LazyStringList ownerAddresses_;
/**
*
* Addresses of the owners of this scope specification.
*
*
* repeated string owner_addresses = 3 [(.gogoproto.moretags) = "yaml:\"owner_addresses\""];
*/
public com.google.protobuf.ProtocolStringList
getOwnerAddressesList() {
return ownerAddresses_;
}
/**
*
* Addresses of the owners of this scope specification.
*
*
* repeated string owner_addresses = 3 [(.gogoproto.moretags) = "yaml:\"owner_addresses\""];
*/
public int getOwnerAddressesCount() {
return ownerAddresses_.size();
}
/**
*
* Addresses of the owners of this scope specification.
*
*
* repeated string owner_addresses = 3 [(.gogoproto.moretags) = "yaml:\"owner_addresses\""];
*/
public java.lang.String getOwnerAddresses(int index) {
return ownerAddresses_.get(index);
}
/**
*
* Addresses of the owners of this scope specification.
*
*
* repeated string owner_addresses = 3 [(.gogoproto.moretags) = "yaml:\"owner_addresses\""];
*/
public com.google.protobuf.ByteString
getOwnerAddressesBytes(int index) {
return ownerAddresses_.getByteString(index);
}
public static final int PARTIES_INVOLVED_FIELD_NUMBER = 4;
private java.util.List partiesInvolved_;
private static final com.google.protobuf.Internal.ListAdapter.Converter<
java.lang.Integer, io.provenance.metadata.v1.PartyType> partiesInvolved_converter_ =
new com.google.protobuf.Internal.ListAdapter.Converter<
java.lang.Integer, io.provenance.metadata.v1.PartyType>() {
public io.provenance.metadata.v1.PartyType convert(java.lang.Integer from) {
@SuppressWarnings("deprecation")
io.provenance.metadata.v1.PartyType result = io.provenance.metadata.v1.PartyType.valueOf(from);
return result == null ? io.provenance.metadata.v1.PartyType.UNRECOGNIZED : result;
}
};
/**
*
* A list of parties that must be present on a scope (and their associated roles)
*
*
* repeated .provenance.metadata.v1.PartyType parties_involved = 4 [(.gogoproto.moretags) = "yaml:\"parties_involved\""];
*/
public java.util.List getPartiesInvolvedList() {
return new com.google.protobuf.Internal.ListAdapter<
java.lang.Integer, io.provenance.metadata.v1.PartyType>(partiesInvolved_, partiesInvolved_converter_);
}
/**
*
* A list of parties that must be present on a scope (and their associated roles)
*
*
* repeated .provenance.metadata.v1.PartyType parties_involved = 4 [(.gogoproto.moretags) = "yaml:\"parties_involved\""];
*/
public int getPartiesInvolvedCount() {
return partiesInvolved_.size();
}
/**
*
* A list of parties that must be present on a scope (and their associated roles)
*
*
* repeated .provenance.metadata.v1.PartyType parties_involved = 4 [(.gogoproto.moretags) = "yaml:\"parties_involved\""];
*/
public io.provenance.metadata.v1.PartyType getPartiesInvolved(int index) {
return partiesInvolved_converter_.convert(partiesInvolved_.get(index));
}
/**
*
* A list of parties that must be present on a scope (and their associated roles)
*
*
* repeated .provenance.metadata.v1.PartyType parties_involved = 4 [(.gogoproto.moretags) = "yaml:\"parties_involved\""];
*/
public java.util.List
getPartiesInvolvedValueList() {
return partiesInvolved_;
}
/**
*
* A list of parties that must be present on a scope (and their associated roles)
*
*
* repeated .provenance.metadata.v1.PartyType parties_involved = 4 [(.gogoproto.moretags) = "yaml:\"parties_involved\""];
*/
public int getPartiesInvolvedValue(int index) {
return partiesInvolved_.get(index);
}
private int partiesInvolvedMemoizedSerializedSize;
public static final int CONTRACT_SPEC_IDS_FIELD_NUMBER = 5;
private java.util.List contractSpecIds_;
/**
*
* A list of contract specification ids allowed for a scope based on this specification.
*
*
* repeated bytes contract_spec_ids = 5 [(.gogoproto.nullable) = false, (.gogoproto.customtype) = "MetadataAddress", (.gogoproto.moretags) = "yaml:\"contract_spec_ids\""];
*/
public java.util.List
getContractSpecIdsList() {
return contractSpecIds_;
}
/**
*
* A list of contract specification ids allowed for a scope based on this specification.
*
*
* repeated bytes contract_spec_ids = 5 [(.gogoproto.nullable) = false, (.gogoproto.customtype) = "MetadataAddress", (.gogoproto.moretags) = "yaml:\"contract_spec_ids\""];
*/
public int getContractSpecIdsCount() {
return contractSpecIds_.size();
}
/**
*
* A list of contract specification ids allowed for a scope based on this specification.
*
*
* repeated bytes contract_spec_ids = 5 [(.gogoproto.nullable) = false, (.gogoproto.customtype) = "MetadataAddress", (.gogoproto.moretags) = "yaml:\"contract_spec_ids\""];
*/
public com.google.protobuf.ByteString getContractSpecIds(int index) {
return contractSpecIds_.get(index);
}
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 {
getSerializedSize();
if (!specificationId_.isEmpty()) {
output.writeBytes(1, specificationId_);
}
if (description_ != null) {
output.writeMessage(2, getDescription());
}
for (int i = 0; i < ownerAddresses_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, ownerAddresses_.getRaw(i));
}
if (getPartiesInvolvedList().size() > 0) {
output.writeUInt32NoTag(34);
output.writeUInt32NoTag(partiesInvolvedMemoizedSerializedSize);
}
for (int i = 0; i < partiesInvolved_.size(); i++) {
output.writeEnumNoTag(partiesInvolved_.get(i));
}
for (int i = 0; i < contractSpecIds_.size(); i++) {
output.writeBytes(5, contractSpecIds_.get(i));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!specificationId_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(1, specificationId_);
}
if (description_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getDescription());
}
{
int dataSize = 0;
for (int i = 0; i < ownerAddresses_.size(); i++) {
dataSize += computeStringSizeNoTag(ownerAddresses_.getRaw(i));
}
size += dataSize;
size += 1 * getOwnerAddressesList().size();
}
{
int dataSize = 0;
for (int i = 0; i < partiesInvolved_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeEnumSizeNoTag(partiesInvolved_.get(i));
}
size += dataSize;
if (!getPartiesInvolvedList().isEmpty()) { size += 1;
size += com.google.protobuf.CodedOutputStream
.computeUInt32SizeNoTag(dataSize);
}partiesInvolvedMemoizedSerializedSize = dataSize;
}
{
int dataSize = 0;
for (int i = 0; i < contractSpecIds_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeBytesSizeNoTag(contractSpecIds_.get(i));
}
size += dataSize;
size += 1 * getContractSpecIdsList().size();
}
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.provenance.metadata.v1.ScopeSpecification)) {
return super.equals(obj);
}
io.provenance.metadata.v1.ScopeSpecification other = (io.provenance.metadata.v1.ScopeSpecification) obj;
boolean result = true;
result = result && getSpecificationId()
.equals(other.getSpecificationId());
result = result && (hasDescription() == other.hasDescription());
if (hasDescription()) {
result = result && getDescription()
.equals(other.getDescription());
}
result = result && getOwnerAddressesList()
.equals(other.getOwnerAddressesList());
result = result && partiesInvolved_.equals(other.partiesInvolved_);
result = result && getContractSpecIdsList()
.equals(other.getContractSpecIdsList());
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + SPECIFICATION_ID_FIELD_NUMBER;
hash = (53 * hash) + getSpecificationId().hashCode();
if (hasDescription()) {
hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
hash = (53 * hash) + getDescription().hashCode();
}
if (getOwnerAddressesCount() > 0) {
hash = (37 * hash) + OWNER_ADDRESSES_FIELD_NUMBER;
hash = (53 * hash) + getOwnerAddressesList().hashCode();
}
if (getPartiesInvolvedCount() > 0) {
hash = (37 * hash) + PARTIES_INVOLVED_FIELD_NUMBER;
hash = (53 * hash) + partiesInvolved_.hashCode();
}
if (getContractSpecIdsCount() > 0) {
hash = (37 * hash) + CONTRACT_SPEC_IDS_FIELD_NUMBER;
hash = (53 * hash) + getContractSpecIdsList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.provenance.metadata.v1.ScopeSpecification parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.provenance.metadata.v1.ScopeSpecification parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.provenance.metadata.v1.ScopeSpecification parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.provenance.metadata.v1.ScopeSpecification parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.provenance.metadata.v1.ScopeSpecification parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.provenance.metadata.v1.ScopeSpecification parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.provenance.metadata.v1.ScopeSpecification parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.provenance.metadata.v1.ScopeSpecification 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.provenance.metadata.v1.ScopeSpecification parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.provenance.metadata.v1.ScopeSpecification 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.provenance.metadata.v1.ScopeSpecification parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.provenance.metadata.v1.ScopeSpecification 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.provenance.metadata.v1.ScopeSpecification 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;
}
/**
*
* ScopeSpecification defines the required parties, resources, conditions, and consideration outputs for a contract
*
*
* Protobuf type {@code provenance.metadata.v1.ScopeSpecification}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:provenance.metadata.v1.ScopeSpecification)
io.provenance.metadata.v1.ScopeSpecificationOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.provenance.metadata.v1.Specification.internal_static_provenance_metadata_v1_ScopeSpecification_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.provenance.metadata.v1.Specification.internal_static_provenance_metadata_v1_ScopeSpecification_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.provenance.metadata.v1.ScopeSpecification.class, io.provenance.metadata.v1.ScopeSpecification.Builder.class);
}
// Construct using io.provenance.metadata.v1.ScopeSpecification.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();
specificationId_ = com.google.protobuf.ByteString.EMPTY;
if (descriptionBuilder_ == null) {
description_ = null;
} else {
description_ = null;
descriptionBuilder_ = null;
}
ownerAddresses_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000004);
partiesInvolved_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000008);
contractSpecIds_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000010);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.provenance.metadata.v1.Specification.internal_static_provenance_metadata_v1_ScopeSpecification_descriptor;
}
@java.lang.Override
public io.provenance.metadata.v1.ScopeSpecification getDefaultInstanceForType() {
return io.provenance.metadata.v1.ScopeSpecification.getDefaultInstance();
}
@java.lang.Override
public io.provenance.metadata.v1.ScopeSpecification build() {
io.provenance.metadata.v1.ScopeSpecification result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.provenance.metadata.v1.ScopeSpecification buildPartial() {
io.provenance.metadata.v1.ScopeSpecification result = new io.provenance.metadata.v1.ScopeSpecification(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
result.specificationId_ = specificationId_;
if (descriptionBuilder_ == null) {
result.description_ = description_;
} else {
result.description_ = descriptionBuilder_.build();
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
ownerAddresses_ = ownerAddresses_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000004);
}
result.ownerAddresses_ = ownerAddresses_;
if (((bitField0_ & 0x00000008) == 0x00000008)) {
partiesInvolved_ = java.util.Collections.unmodifiableList(partiesInvolved_);
bitField0_ = (bitField0_ & ~0x00000008);
}
result.partiesInvolved_ = partiesInvolved_;
if (((bitField0_ & 0x00000010) == 0x00000010)) {
contractSpecIds_ = java.util.Collections.unmodifiableList(contractSpecIds_);
bitField0_ = (bitField0_ & ~0x00000010);
}
result.contractSpecIds_ = contractSpecIds_;
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return (Builder) super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof io.provenance.metadata.v1.ScopeSpecification) {
return mergeFrom((io.provenance.metadata.v1.ScopeSpecification)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.provenance.metadata.v1.ScopeSpecification other) {
if (other == io.provenance.metadata.v1.ScopeSpecification.getDefaultInstance()) return this;
if (other.getSpecificationId() != com.google.protobuf.ByteString.EMPTY) {
setSpecificationId(other.getSpecificationId());
}
if (other.hasDescription()) {
mergeDescription(other.getDescription());
}
if (!other.ownerAddresses_.isEmpty()) {
if (ownerAddresses_.isEmpty()) {
ownerAddresses_ = other.ownerAddresses_;
bitField0_ = (bitField0_ & ~0x00000004);
} else {
ensureOwnerAddressesIsMutable();
ownerAddresses_.addAll(other.ownerAddresses_);
}
onChanged();
}
if (!other.partiesInvolved_.isEmpty()) {
if (partiesInvolved_.isEmpty()) {
partiesInvolved_ = other.partiesInvolved_;
bitField0_ = (bitField0_ & ~0x00000008);
} else {
ensurePartiesInvolvedIsMutable();
partiesInvolved_.addAll(other.partiesInvolved_);
}
onChanged();
}
if (!other.contractSpecIds_.isEmpty()) {
if (contractSpecIds_.isEmpty()) {
contractSpecIds_ = other.contractSpecIds_;
bitField0_ = (bitField0_ & ~0x00000010);
} else {
ensureContractSpecIdsIsMutable();
contractSpecIds_.addAll(other.contractSpecIds_);
}
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
io.provenance.metadata.v1.ScopeSpecification parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.provenance.metadata.v1.ScopeSpecification) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private com.google.protobuf.ByteString specificationId_ = com.google.protobuf.ByteString.EMPTY;
/**
*
* unique identifier for this specification on chain
*
*
* bytes specification_id = 1 [(.gogoproto.nullable) = false, (.gogoproto.customtype) = "MetadataAddress", (.gogoproto.moretags) = "yaml:\"specification_id\""];
*/
public com.google.protobuf.ByteString getSpecificationId() {
return specificationId_;
}
/**
*
* unique identifier for this specification on chain
*
*
* bytes specification_id = 1 [(.gogoproto.nullable) = false, (.gogoproto.customtype) = "MetadataAddress", (.gogoproto.moretags) = "yaml:\"specification_id\""];
*/
public Builder setSpecificationId(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
specificationId_ = value;
onChanged();
return this;
}
/**
*
* unique identifier for this specification on chain
*
*
* bytes specification_id = 1 [(.gogoproto.nullable) = false, (.gogoproto.customtype) = "MetadataAddress", (.gogoproto.moretags) = "yaml:\"specification_id\""];
*/
public Builder clearSpecificationId() {
specificationId_ = getDefaultInstance().getSpecificationId();
onChanged();
return this;
}
private io.provenance.metadata.v1.Description description_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
io.provenance.metadata.v1.Description, io.provenance.metadata.v1.Description.Builder, io.provenance.metadata.v1.DescriptionOrBuilder> descriptionBuilder_;
/**
*
* General information about this scope specification.
*
*
* .provenance.metadata.v1.Description description = 2;
*/
public boolean hasDescription() {
return descriptionBuilder_ != null || description_ != null;
}
/**
*
* General information about this scope specification.
*
*
* .provenance.metadata.v1.Description description = 2;
*/
public io.provenance.metadata.v1.Description getDescription() {
if (descriptionBuilder_ == null) {
return description_ == null ? io.provenance.metadata.v1.Description.getDefaultInstance() : description_;
} else {
return descriptionBuilder_.getMessage();
}
}
/**
*
* General information about this scope specification.
*
*
* .provenance.metadata.v1.Description description = 2;
*/
public Builder setDescription(io.provenance.metadata.v1.Description value) {
if (descriptionBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
description_ = value;
onChanged();
} else {
descriptionBuilder_.setMessage(value);
}
return this;
}
/**
*
* General information about this scope specification.
*
*
* .provenance.metadata.v1.Description description = 2;
*/
public Builder setDescription(
io.provenance.metadata.v1.Description.Builder builderForValue) {
if (descriptionBuilder_ == null) {
description_ = builderForValue.build();
onChanged();
} else {
descriptionBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* General information about this scope specification.
*
*
* .provenance.metadata.v1.Description description = 2;
*/
public Builder mergeDescription(io.provenance.metadata.v1.Description value) {
if (descriptionBuilder_ == null) {
if (description_ != null) {
description_ =
io.provenance.metadata.v1.Description.newBuilder(description_).mergeFrom(value).buildPartial();
} else {
description_ = value;
}
onChanged();
} else {
descriptionBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* General information about this scope specification.
*
*
* .provenance.metadata.v1.Description description = 2;
*/
public Builder clearDescription() {
if (descriptionBuilder_ == null) {
description_ = null;
onChanged();
} else {
description_ = null;
descriptionBuilder_ = null;
}
return this;
}
/**
*
* General information about this scope specification.
*
*
* .provenance.metadata.v1.Description description = 2;
*/
public io.provenance.metadata.v1.Description.Builder getDescriptionBuilder() {
onChanged();
return getDescriptionFieldBuilder().getBuilder();
}
/**
*
* General information about this scope specification.
*
*
* .provenance.metadata.v1.Description description = 2;
*/
public io.provenance.metadata.v1.DescriptionOrBuilder getDescriptionOrBuilder() {
if (descriptionBuilder_ != null) {
return descriptionBuilder_.getMessageOrBuilder();
} else {
return description_ == null ?
io.provenance.metadata.v1.Description.getDefaultInstance() : description_;
}
}
/**
*
* General information about this scope specification.
*
*
* .provenance.metadata.v1.Description description = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.provenance.metadata.v1.Description, io.provenance.metadata.v1.Description.Builder, io.provenance.metadata.v1.DescriptionOrBuilder>
getDescriptionFieldBuilder() {
if (descriptionBuilder_ == null) {
descriptionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.provenance.metadata.v1.Description, io.provenance.metadata.v1.Description.Builder, io.provenance.metadata.v1.DescriptionOrBuilder>(
getDescription(),
getParentForChildren(),
isClean());
description_ = null;
}
return descriptionBuilder_;
}
private com.google.protobuf.LazyStringList ownerAddresses_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureOwnerAddressesIsMutable() {
if (!((bitField0_ & 0x00000004) == 0x00000004)) {
ownerAddresses_ = new com.google.protobuf.LazyStringArrayList(ownerAddresses_);
bitField0_ |= 0x00000004;
}
}
/**
*
* Addresses of the owners of this scope specification.
*
*
* repeated string owner_addresses = 3 [(.gogoproto.moretags) = "yaml:\"owner_addresses\""];
*/
public com.google.protobuf.ProtocolStringList
getOwnerAddressesList() {
return ownerAddresses_.getUnmodifiableView();
}
/**
*
* Addresses of the owners of this scope specification.
*
*
* repeated string owner_addresses = 3 [(.gogoproto.moretags) = "yaml:\"owner_addresses\""];
*/
public int getOwnerAddressesCount() {
return ownerAddresses_.size();
}
/**
*
* Addresses of the owners of this scope specification.
*
*
* repeated string owner_addresses = 3 [(.gogoproto.moretags) = "yaml:\"owner_addresses\""];
*/
public java.lang.String getOwnerAddresses(int index) {
return ownerAddresses_.get(index);
}
/**
*
* Addresses of the owners of this scope specification.
*
*
* repeated string owner_addresses = 3 [(.gogoproto.moretags) = "yaml:\"owner_addresses\""];
*/
public com.google.protobuf.ByteString
getOwnerAddressesBytes(int index) {
return ownerAddresses_.getByteString(index);
}
/**
*
* Addresses of the owners of this scope specification.
*
*
* repeated string owner_addresses = 3 [(.gogoproto.moretags) = "yaml:\"owner_addresses\""];
*/
public Builder setOwnerAddresses(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureOwnerAddressesIsMutable();
ownerAddresses_.set(index, value);
onChanged();
return this;
}
/**
*
* Addresses of the owners of this scope specification.
*
*
* repeated string owner_addresses = 3 [(.gogoproto.moretags) = "yaml:\"owner_addresses\""];
*/
public Builder addOwnerAddresses(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureOwnerAddressesIsMutable();
ownerAddresses_.add(value);
onChanged();
return this;
}
/**
*
* Addresses of the owners of this scope specification.
*
*
* repeated string owner_addresses = 3 [(.gogoproto.moretags) = "yaml:\"owner_addresses\""];
*/
public Builder addAllOwnerAddresses(
java.lang.Iterable values) {
ensureOwnerAddressesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, ownerAddresses_);
onChanged();
return this;
}
/**
*
* Addresses of the owners of this scope specification.
*
*
* repeated string owner_addresses = 3 [(.gogoproto.moretags) = "yaml:\"owner_addresses\""];
*/
public Builder clearOwnerAddresses() {
ownerAddresses_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
*
* Addresses of the owners of this scope specification.
*
*
* repeated string owner_addresses = 3 [(.gogoproto.moretags) = "yaml:\"owner_addresses\""];
*/
public Builder addOwnerAddressesBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureOwnerAddressesIsMutable();
ownerAddresses_.add(value);
onChanged();
return this;
}
private java.util.List partiesInvolved_ =
java.util.Collections.emptyList();
private void ensurePartiesInvolvedIsMutable() {
if (!((bitField0_ & 0x00000008) == 0x00000008)) {
partiesInvolved_ = new java.util.ArrayList(partiesInvolved_);
bitField0_ |= 0x00000008;
}
}
/**
*
* A list of parties that must be present on a scope (and their associated roles)
*
*
* repeated .provenance.metadata.v1.PartyType parties_involved = 4 [(.gogoproto.moretags) = "yaml:\"parties_involved\""];
*/
public java.util.List getPartiesInvolvedList() {
return new com.google.protobuf.Internal.ListAdapter<
java.lang.Integer, io.provenance.metadata.v1.PartyType>(partiesInvolved_, partiesInvolved_converter_);
}
/**
*
* A list of parties that must be present on a scope (and their associated roles)
*
*
* repeated .provenance.metadata.v1.PartyType parties_involved = 4 [(.gogoproto.moretags) = "yaml:\"parties_involved\""];
*/
public int getPartiesInvolvedCount() {
return partiesInvolved_.size();
}
/**
*
* A list of parties that must be present on a scope (and their associated roles)
*
*
* repeated .provenance.metadata.v1.PartyType parties_involved = 4 [(.gogoproto.moretags) = "yaml:\"parties_involved\""];
*/
public io.provenance.metadata.v1.PartyType getPartiesInvolved(int index) {
return partiesInvolved_converter_.convert(partiesInvolved_.get(index));
}
/**
*
* A list of parties that must be present on a scope (and their associated roles)
*
*
* repeated .provenance.metadata.v1.PartyType parties_involved = 4 [(.gogoproto.moretags) = "yaml:\"parties_involved\""];
*/
public Builder setPartiesInvolved(
int index, io.provenance.metadata.v1.PartyType value) {
if (value == null) {
throw new NullPointerException();
}
ensurePartiesInvolvedIsMutable();
partiesInvolved_.set(index, value.getNumber());
onChanged();
return this;
}
/**
*
* A list of parties that must be present on a scope (and their associated roles)
*
*
* repeated .provenance.metadata.v1.PartyType parties_involved = 4 [(.gogoproto.moretags) = "yaml:\"parties_involved\""];
*/
public Builder addPartiesInvolved(io.provenance.metadata.v1.PartyType value) {
if (value == null) {
throw new NullPointerException();
}
ensurePartiesInvolvedIsMutable();
partiesInvolved_.add(value.getNumber());
onChanged();
return this;
}
/**
*
* A list of parties that must be present on a scope (and their associated roles)
*
*
* repeated .provenance.metadata.v1.PartyType parties_involved = 4 [(.gogoproto.moretags) = "yaml:\"parties_involved\""];
*/
public Builder addAllPartiesInvolved(
java.lang.Iterable extends io.provenance.metadata.v1.PartyType> values) {
ensurePartiesInvolvedIsMutable();
for (io.provenance.metadata.v1.PartyType value : values) {
partiesInvolved_.add(value.getNumber());
}
onChanged();
return this;
}
/**
*
* A list of parties that must be present on a scope (and their associated roles)
*
*
* repeated .provenance.metadata.v1.PartyType parties_involved = 4 [(.gogoproto.moretags) = "yaml:\"parties_involved\""];
*/
public Builder clearPartiesInvolved() {
partiesInvolved_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
return this;
}
/**
*
* A list of parties that must be present on a scope (and their associated roles)
*
*
* repeated .provenance.metadata.v1.PartyType parties_involved = 4 [(.gogoproto.moretags) = "yaml:\"parties_involved\""];
*/
public java.util.List
getPartiesInvolvedValueList() {
return java.util.Collections.unmodifiableList(partiesInvolved_);
}
/**
*
* A list of parties that must be present on a scope (and their associated roles)
*
*
* repeated .provenance.metadata.v1.PartyType parties_involved = 4 [(.gogoproto.moretags) = "yaml:\"parties_involved\""];
*/
public int getPartiesInvolvedValue(int index) {
return partiesInvolved_.get(index);
}
/**
*
* A list of parties that must be present on a scope (and their associated roles)
*
*
* repeated .provenance.metadata.v1.PartyType parties_involved = 4 [(.gogoproto.moretags) = "yaml:\"parties_involved\""];
*/
public Builder setPartiesInvolvedValue(
int index, int value) {
ensurePartiesInvolvedIsMutable();
partiesInvolved_.set(index, value);
onChanged();
return this;
}
/**
*
* A list of parties that must be present on a scope (and their associated roles)
*
*
* repeated .provenance.metadata.v1.PartyType parties_involved = 4 [(.gogoproto.moretags) = "yaml:\"parties_involved\""];
*/
public Builder addPartiesInvolvedValue(int value) {
ensurePartiesInvolvedIsMutable();
partiesInvolved_.add(value);
onChanged();
return this;
}
/**
*
* A list of parties that must be present on a scope (and their associated roles)
*
*
* repeated .provenance.metadata.v1.PartyType parties_involved = 4 [(.gogoproto.moretags) = "yaml:\"parties_involved\""];
*/
public Builder addAllPartiesInvolvedValue(
java.lang.Iterable values) {
ensurePartiesInvolvedIsMutable();
for (int value : values) {
partiesInvolved_.add(value);
}
onChanged();
return this;
}
private java.util.List contractSpecIds_ = java.util.Collections.emptyList();
private void ensureContractSpecIdsIsMutable() {
if (!((bitField0_ & 0x00000010) == 0x00000010)) {
contractSpecIds_ = new java.util.ArrayList(contractSpecIds_);
bitField0_ |= 0x00000010;
}
}
/**
*
* A list of contract specification ids allowed for a scope based on this specification.
*
*
* repeated bytes contract_spec_ids = 5 [(.gogoproto.nullable) = false, (.gogoproto.customtype) = "MetadataAddress", (.gogoproto.moretags) = "yaml:\"contract_spec_ids\""];
*/
public java.util.List
getContractSpecIdsList() {
return java.util.Collections.unmodifiableList(contractSpecIds_);
}
/**
*
* A list of contract specification ids allowed for a scope based on this specification.
*
*
* repeated bytes contract_spec_ids = 5 [(.gogoproto.nullable) = false, (.gogoproto.customtype) = "MetadataAddress", (.gogoproto.moretags) = "yaml:\"contract_spec_ids\""];
*/
public int getContractSpecIdsCount() {
return contractSpecIds_.size();
}
/**
*
* A list of contract specification ids allowed for a scope based on this specification.
*
*
* repeated bytes contract_spec_ids = 5 [(.gogoproto.nullable) = false, (.gogoproto.customtype) = "MetadataAddress", (.gogoproto.moretags) = "yaml:\"contract_spec_ids\""];
*/
public com.google.protobuf.ByteString getContractSpecIds(int index) {
return contractSpecIds_.get(index);
}
/**
*
* A list of contract specification ids allowed for a scope based on this specification.
*
*
* repeated bytes contract_spec_ids = 5 [(.gogoproto.nullable) = false, (.gogoproto.customtype) = "MetadataAddress", (.gogoproto.moretags) = "yaml:\"contract_spec_ids\""];
*/
public Builder setContractSpecIds(
int index, com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
ensureContractSpecIdsIsMutable();
contractSpecIds_.set(index, value);
onChanged();
return this;
}
/**
*
* A list of contract specification ids allowed for a scope based on this specification.
*
*
* repeated bytes contract_spec_ids = 5 [(.gogoproto.nullable) = false, (.gogoproto.customtype) = "MetadataAddress", (.gogoproto.moretags) = "yaml:\"contract_spec_ids\""];
*/
public Builder addContractSpecIds(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
ensureContractSpecIdsIsMutable();
contractSpecIds_.add(value);
onChanged();
return this;
}
/**
*
* A list of contract specification ids allowed for a scope based on this specification.
*
*
* repeated bytes contract_spec_ids = 5 [(.gogoproto.nullable) = false, (.gogoproto.customtype) = "MetadataAddress", (.gogoproto.moretags) = "yaml:\"contract_spec_ids\""];
*/
public Builder addAllContractSpecIds(
java.lang.Iterable extends com.google.protobuf.ByteString> values) {
ensureContractSpecIdsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, contractSpecIds_);
onChanged();
return this;
}
/**
*
* A list of contract specification ids allowed for a scope based on this specification.
*
*
* repeated bytes contract_spec_ids = 5 [(.gogoproto.nullable) = false, (.gogoproto.customtype) = "MetadataAddress", (.gogoproto.moretags) = "yaml:\"contract_spec_ids\""];
*/
public Builder clearContractSpecIds() {
contractSpecIds_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000010);
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:provenance.metadata.v1.ScopeSpecification)
}
// @@protoc_insertion_point(class_scope:provenance.metadata.v1.ScopeSpecification)
private static final io.provenance.metadata.v1.ScopeSpecification DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.provenance.metadata.v1.ScopeSpecification();
}
public static io.provenance.metadata.v1.ScopeSpecification getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ScopeSpecification parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ScopeSpecification(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.provenance.metadata.v1.ScopeSpecification getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy