Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: common/collection.proto
package org.hyperledger.fabric.protos.common;
public final class Collection {
private Collection() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistryLite registry) {
}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
registerAllExtensions(
(com.google.protobuf.ExtensionRegistryLite) registry);
}
public interface CollectionConfigPackageOrBuilder extends
// @@protoc_insertion_point(interface_extends:common.CollectionConfigPackage)
com.google.protobuf.MessageOrBuilder {
/**
* repeated .common.CollectionConfig config = 1;
*/
java.util.List
getConfigList();
/**
* repeated .common.CollectionConfig config = 1;
*/
org.hyperledger.fabric.protos.common.Collection.CollectionConfig getConfig(int index);
/**
* repeated .common.CollectionConfig config = 1;
*/
int getConfigCount();
/**
* repeated .common.CollectionConfig config = 1;
*/
java.util.List
getConfigOrBuilderList();
/**
* repeated .common.CollectionConfig config = 1;
*/
org.hyperledger.fabric.protos.common.Collection.CollectionConfigOrBuilder getConfigOrBuilder(
int index);
}
/**
*
* CollectionConfigPackage represents an array of CollectionConfig
* messages; the extra struct is required because repeated oneof is
* forbidden by the protobuf syntax
*
*
* Protobuf type {@code common.CollectionConfigPackage}
*/
public static final class CollectionConfigPackage extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:common.CollectionConfigPackage)
CollectionConfigPackageOrBuilder {
// Use CollectionConfigPackage.newBuilder() to construct.
private CollectionConfigPackage(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private CollectionConfigPackage() {
config_ = java.util.Collections.emptyList();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
private CollectionConfigPackage(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
int mutable_bitField0_ = 0;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!input.skipField(tag)) {
done = true;
}
break;
}
case 10: {
if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
config_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
config_.add(
input.readMessage(org.hyperledger.fabric.protos.common.Collection.CollectionConfig.parser(), extensionRegistry));
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) == 0x00000001)) {
config_ = java.util.Collections.unmodifiableList(config_);
}
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.common.Collection.internal_static_common_CollectionConfigPackage_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.common.Collection.internal_static_common_CollectionConfigPackage_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.common.Collection.CollectionConfigPackage.class, org.hyperledger.fabric.protos.common.Collection.CollectionConfigPackage.Builder.class);
}
public static final int CONFIG_FIELD_NUMBER = 1;
private java.util.List config_;
/**
* repeated .common.CollectionConfig config = 1;
*/
public java.util.List getConfigList() {
return config_;
}
/**
* repeated .common.CollectionConfig config = 1;
*/
public java.util.List
getConfigOrBuilderList() {
return config_;
}
/**
* repeated .common.CollectionConfig config = 1;
*/
public int getConfigCount() {
return config_.size();
}
/**
* repeated .common.CollectionConfig config = 1;
*/
public org.hyperledger.fabric.protos.common.Collection.CollectionConfig getConfig(int index) {
return config_.get(index);
}
/**
* repeated .common.CollectionConfig config = 1;
*/
public org.hyperledger.fabric.protos.common.Collection.CollectionConfigOrBuilder getConfigOrBuilder(
int index) {
return config_.get(index);
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
for (int i = 0; i < config_.size(); i++) {
output.writeMessage(1, config_.get(i));
}
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < config_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, config_.get(i));
}
memoizedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.hyperledger.fabric.protos.common.Collection.CollectionConfigPackage)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.common.Collection.CollectionConfigPackage other = (org.hyperledger.fabric.protos.common.Collection.CollectionConfigPackage) obj;
boolean result = true;
result = result && getConfigList()
.equals(other.getConfigList());
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptorForType().hashCode();
if (getConfigCount() > 0) {
hash = (37 * hash) + CONFIG_FIELD_NUMBER;
hash = (53 * hash) + getConfigList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.common.Collection.CollectionConfigPackage parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.common.Collection.CollectionConfigPackage parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.common.Collection.CollectionConfigPackage parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.common.Collection.CollectionConfigPackage parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.common.Collection.CollectionConfigPackage parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.common.Collection.CollectionConfigPackage 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.hyperledger.fabric.protos.common.Collection.CollectionConfigPackage parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.common.Collection.CollectionConfigPackage 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.hyperledger.fabric.protos.common.Collection.CollectionConfigPackage parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.common.Collection.CollectionConfigPackage parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.hyperledger.fabric.protos.common.Collection.CollectionConfigPackage prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
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;
}
/**
*
* CollectionConfigPackage represents an array of CollectionConfig
* messages; the extra struct is required because repeated oneof is
* forbidden by the protobuf syntax
*
* CollectionConfig defines the configuration of a collection object;
* it currently contains a single, static type.
* Dynamic collections are deferred.
*
*
* Protobuf type {@code common.CollectionConfig}
*/
public static final class CollectionConfig extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:common.CollectionConfig)
CollectionConfigOrBuilder {
// Use CollectionConfig.newBuilder() to construct.
private CollectionConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private CollectionConfig() {
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
private CollectionConfig(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
int mutable_bitField0_ = 0;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!input.skipField(tag)) {
done = true;
}
break;
}
case 10: {
org.hyperledger.fabric.protos.common.Collection.StaticCollectionConfig.Builder subBuilder = null;
if (payloadCase_ == 1) {
subBuilder = ((org.hyperledger.fabric.protos.common.Collection.StaticCollectionConfig) payload_).toBuilder();
}
payload_ =
input.readMessage(org.hyperledger.fabric.protos.common.Collection.StaticCollectionConfig.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((org.hyperledger.fabric.protos.common.Collection.StaticCollectionConfig) payload_);
payload_ = subBuilder.buildPartial();
}
payloadCase_ = 1;
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 {
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.common.Collection.internal_static_common_CollectionConfig_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.common.Collection.internal_static_common_CollectionConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.common.Collection.CollectionConfig.class, org.hyperledger.fabric.protos.common.Collection.CollectionConfig.Builder.class);
}
private int payloadCase_ = 0;
private java.lang.Object payload_;
public enum PayloadCase
implements com.google.protobuf.Internal.EnumLite {
STATIC_COLLECTION_CONFIG(1),
PAYLOAD_NOT_SET(0);
private final int value;
private PayloadCase(int value) {
this.value = value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static PayloadCase valueOf(int value) {
return forNumber(value);
}
public static PayloadCase forNumber(int value) {
switch (value) {
case 1: return STATIC_COLLECTION_CONFIG;
case 0: return PAYLOAD_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public PayloadCase
getPayloadCase() {
return PayloadCase.forNumber(
payloadCase_);
}
public static final int STATIC_COLLECTION_CONFIG_FIELD_NUMBER = 1;
/**
* optional .common.StaticCollectionConfig static_collection_config = 1;
*/
public org.hyperledger.fabric.protos.common.Collection.StaticCollectionConfig getStaticCollectionConfig() {
if (payloadCase_ == 1) {
return (org.hyperledger.fabric.protos.common.Collection.StaticCollectionConfig) payload_;
}
return org.hyperledger.fabric.protos.common.Collection.StaticCollectionConfig.getDefaultInstance();
}
/**
* optional .common.StaticCollectionConfig static_collection_config = 1;
*/
public org.hyperledger.fabric.protos.common.Collection.StaticCollectionConfigOrBuilder getStaticCollectionConfigOrBuilder() {
if (payloadCase_ == 1) {
return (org.hyperledger.fabric.protos.common.Collection.StaticCollectionConfig) payload_;
}
return org.hyperledger.fabric.protos.common.Collection.StaticCollectionConfig.getDefaultInstance();
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (payloadCase_ == 1) {
output.writeMessage(1, (org.hyperledger.fabric.protos.common.Collection.StaticCollectionConfig) payload_);
}
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (payloadCase_ == 1) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, (org.hyperledger.fabric.protos.common.Collection.StaticCollectionConfig) payload_);
}
memoizedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.hyperledger.fabric.protos.common.Collection.CollectionConfig)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.common.Collection.CollectionConfig other = (org.hyperledger.fabric.protos.common.Collection.CollectionConfig) obj;
boolean result = true;
result = result && getPayloadCase().equals(
other.getPayloadCase());
if (!result) return false;
switch (payloadCase_) {
case 1:
result = result && getStaticCollectionConfig()
.equals(other.getStaticCollectionConfig());
break;
case 0:
default:
}
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptorForType().hashCode();
switch (payloadCase_) {
case 1:
hash = (37 * hash) + STATIC_COLLECTION_CONFIG_FIELD_NUMBER;
hash = (53 * hash) + getStaticCollectionConfig().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.common.Collection.CollectionConfig parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.common.Collection.CollectionConfig parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.common.Collection.CollectionConfig parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.common.Collection.CollectionConfig parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.common.Collection.CollectionConfig parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.common.Collection.CollectionConfig 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.hyperledger.fabric.protos.common.Collection.CollectionConfig parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.common.Collection.CollectionConfig 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.hyperledger.fabric.protos.common.Collection.CollectionConfig parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.common.Collection.CollectionConfig parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.hyperledger.fabric.protos.common.Collection.CollectionConfig prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
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;
}
/**
*
* CollectionConfig defines the configuration of a collection object;
* it currently contains a single, static type.
* Dynamic collections are deferred.
*
*
* Protobuf type {@code common.CollectionConfig}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:common.CollectionConfig)
org.hyperledger.fabric.protos.common.Collection.CollectionConfigOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.common.Collection.internal_static_common_CollectionConfig_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.common.Collection.internal_static_common_CollectionConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.common.Collection.CollectionConfig.class, org.hyperledger.fabric.protos.common.Collection.CollectionConfig.Builder.class);
}
// Construct using org.hyperledger.fabric.protos.common.Collection.CollectionConfig.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
payloadCase_ = 0;
payload_ = null;
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.common.Collection.internal_static_common_CollectionConfig_descriptor;
}
public org.hyperledger.fabric.protos.common.Collection.CollectionConfig getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.common.Collection.CollectionConfig.getDefaultInstance();
}
public org.hyperledger.fabric.protos.common.Collection.CollectionConfig build() {
org.hyperledger.fabric.protos.common.Collection.CollectionConfig result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.hyperledger.fabric.protos.common.Collection.CollectionConfig buildPartial() {
org.hyperledger.fabric.protos.common.Collection.CollectionConfig result = new org.hyperledger.fabric.protos.common.Collection.CollectionConfig(this);
if (payloadCase_ == 1) {
if (staticCollectionConfigBuilder_ == null) {
result.payload_ = payload_;
} else {
result.payload_ = staticCollectionConfigBuilder_.build();
}
}
result.payloadCase_ = payloadCase_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.fabric.protos.common.Collection.CollectionConfig) {
return mergeFrom((org.hyperledger.fabric.protos.common.Collection.CollectionConfig)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.fabric.protos.common.Collection.CollectionConfig other) {
if (other == org.hyperledger.fabric.protos.common.Collection.CollectionConfig.getDefaultInstance()) return this;
switch (other.getPayloadCase()) {
case STATIC_COLLECTION_CONFIG: {
mergeStaticCollectionConfig(other.getStaticCollectionConfig());
break;
}
case PAYLOAD_NOT_SET: {
break;
}
}
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.hyperledger.fabric.protos.common.Collection.CollectionConfig parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.hyperledger.fabric.protos.common.Collection.CollectionConfig) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int payloadCase_ = 0;
private java.lang.Object payload_;
public PayloadCase
getPayloadCase() {
return PayloadCase.forNumber(
payloadCase_);
}
public Builder clearPayload() {
payloadCase_ = 0;
payload_ = null;
onChanged();
return this;
}
private com.google.protobuf.SingleFieldBuilderV3<
org.hyperledger.fabric.protos.common.Collection.StaticCollectionConfig, org.hyperledger.fabric.protos.common.Collection.StaticCollectionConfig.Builder, org.hyperledger.fabric.protos.common.Collection.StaticCollectionConfigOrBuilder> staticCollectionConfigBuilder_;
/**
* optional .common.StaticCollectionConfig static_collection_config = 1;
*/
public org.hyperledger.fabric.protos.common.Collection.StaticCollectionConfig getStaticCollectionConfig() {
if (staticCollectionConfigBuilder_ == null) {
if (payloadCase_ == 1) {
return (org.hyperledger.fabric.protos.common.Collection.StaticCollectionConfig) payload_;
}
return org.hyperledger.fabric.protos.common.Collection.StaticCollectionConfig.getDefaultInstance();
} else {
if (payloadCase_ == 1) {
return staticCollectionConfigBuilder_.getMessage();
}
return org.hyperledger.fabric.protos.common.Collection.StaticCollectionConfig.getDefaultInstance();
}
}
/**
* optional .common.StaticCollectionConfig static_collection_config = 1;
*/
public Builder setStaticCollectionConfig(org.hyperledger.fabric.protos.common.Collection.StaticCollectionConfig value) {
if (staticCollectionConfigBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
payload_ = value;
onChanged();
} else {
staticCollectionConfigBuilder_.setMessage(value);
}
payloadCase_ = 1;
return this;
}
/**
* optional .common.StaticCollectionConfig static_collection_config = 1;
*/
public Builder setStaticCollectionConfig(
org.hyperledger.fabric.protos.common.Collection.StaticCollectionConfig.Builder builderForValue) {
if (staticCollectionConfigBuilder_ == null) {
payload_ = builderForValue.build();
onChanged();
} else {
staticCollectionConfigBuilder_.setMessage(builderForValue.build());
}
payloadCase_ = 1;
return this;
}
/**
* optional .common.StaticCollectionConfig static_collection_config = 1;
*/
public Builder mergeStaticCollectionConfig(org.hyperledger.fabric.protos.common.Collection.StaticCollectionConfig value) {
if (staticCollectionConfigBuilder_ == null) {
if (payloadCase_ == 1 &&
payload_ != org.hyperledger.fabric.protos.common.Collection.StaticCollectionConfig.getDefaultInstance()) {
payload_ = org.hyperledger.fabric.protos.common.Collection.StaticCollectionConfig.newBuilder((org.hyperledger.fabric.protos.common.Collection.StaticCollectionConfig) payload_)
.mergeFrom(value).buildPartial();
} else {
payload_ = value;
}
onChanged();
} else {
if (payloadCase_ == 1) {
staticCollectionConfigBuilder_.mergeFrom(value);
}
staticCollectionConfigBuilder_.setMessage(value);
}
payloadCase_ = 1;
return this;
}
/**
* optional .common.StaticCollectionConfig static_collection_config = 1;
*/
public Builder clearStaticCollectionConfig() {
if (staticCollectionConfigBuilder_ == null) {
if (payloadCase_ == 1) {
payloadCase_ = 0;
payload_ = null;
onChanged();
}
} else {
if (payloadCase_ == 1) {
payloadCase_ = 0;
payload_ = null;
}
staticCollectionConfigBuilder_.clear();
}
return this;
}
/**
* optional .common.StaticCollectionConfig static_collection_config = 1;
*/
public org.hyperledger.fabric.protos.common.Collection.StaticCollectionConfig.Builder getStaticCollectionConfigBuilder() {
return getStaticCollectionConfigFieldBuilder().getBuilder();
}
/**
* optional .common.StaticCollectionConfig static_collection_config = 1;
*/
public org.hyperledger.fabric.protos.common.Collection.StaticCollectionConfigOrBuilder getStaticCollectionConfigOrBuilder() {
if ((payloadCase_ == 1) && (staticCollectionConfigBuilder_ != null)) {
return staticCollectionConfigBuilder_.getMessageOrBuilder();
} else {
if (payloadCase_ == 1) {
return (org.hyperledger.fabric.protos.common.Collection.StaticCollectionConfig) payload_;
}
return org.hyperledger.fabric.protos.common.Collection.StaticCollectionConfig.getDefaultInstance();
}
}
/**
* optional .common.StaticCollectionConfig static_collection_config = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
org.hyperledger.fabric.protos.common.Collection.StaticCollectionConfig, org.hyperledger.fabric.protos.common.Collection.StaticCollectionConfig.Builder, org.hyperledger.fabric.protos.common.Collection.StaticCollectionConfigOrBuilder>
getStaticCollectionConfigFieldBuilder() {
if (staticCollectionConfigBuilder_ == null) {
if (!(payloadCase_ == 1)) {
payload_ = org.hyperledger.fabric.protos.common.Collection.StaticCollectionConfig.getDefaultInstance();
}
staticCollectionConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
org.hyperledger.fabric.protos.common.Collection.StaticCollectionConfig, org.hyperledger.fabric.protos.common.Collection.StaticCollectionConfig.Builder, org.hyperledger.fabric.protos.common.Collection.StaticCollectionConfigOrBuilder>(
(org.hyperledger.fabric.protos.common.Collection.StaticCollectionConfig) payload_,
getParentForChildren(),
isClean());
payload_ = null;
}
payloadCase_ = 1;
onChanged();;
return staticCollectionConfigBuilder_;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
// @@protoc_insertion_point(builder_scope:common.CollectionConfig)
}
// @@protoc_insertion_point(class_scope:common.CollectionConfig)
private static final org.hyperledger.fabric.protos.common.Collection.CollectionConfig DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.common.Collection.CollectionConfig();
}
public static org.hyperledger.fabric.protos.common.Collection.CollectionConfig getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public CollectionConfig parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new CollectionConfig(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public org.hyperledger.fabric.protos.common.Collection.CollectionConfig getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface StaticCollectionConfigOrBuilder extends
// @@protoc_insertion_point(interface_extends:common.StaticCollectionConfig)
com.google.protobuf.MessageOrBuilder {
/**
*
* the name of the collection inside the denoted chaincode
*
* The minimum number of peers private data will be sent to upon
* endorsement. The endorsement would fail if dissemination to at least
* this number of peers is not achieved.
*
* The number of blocks after which the collection data expires.
* For instance if the value is set to 10, a key last modified by block number 100
* will be purged at block number 111. A zero value is treated same as MaxUint64
*
* StaticCollectionConfig constitutes the configuration parameters of a
* static collection object. Static collections are collections that are
* known at chaincode instantiation time, and that cannot be changed.
* Dynamic collections are deferred.
*
*
* Protobuf type {@code common.StaticCollectionConfig}
*/
public static final class StaticCollectionConfig extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:common.StaticCollectionConfig)
StaticCollectionConfigOrBuilder {
// Use StaticCollectionConfig.newBuilder() to construct.
private StaticCollectionConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private StaticCollectionConfig() {
name_ = "";
requiredPeerCount_ = 0;
maximumPeerCount_ = 0;
blockToLive_ = 0L;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
private StaticCollectionConfig(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
int mutable_bitField0_ = 0;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!input.skipField(tag)) {
done = true;
}
break;
}
case 10: {
java.lang.String s = input.readStringRequireUtf8();
name_ = s;
break;
}
case 18: {
org.hyperledger.fabric.protos.common.Collection.CollectionPolicyConfig.Builder subBuilder = null;
if (memberOrgsPolicy_ != null) {
subBuilder = memberOrgsPolicy_.toBuilder();
}
memberOrgsPolicy_ = input.readMessage(org.hyperledger.fabric.protos.common.Collection.CollectionPolicyConfig.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(memberOrgsPolicy_);
memberOrgsPolicy_ = subBuilder.buildPartial();
}
break;
}
case 24: {
requiredPeerCount_ = input.readInt32();
break;
}
case 32: {
maximumPeerCount_ = input.readInt32();
break;
}
case 40: {
blockToLive_ = input.readUInt64();
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 {
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.common.Collection.internal_static_common_StaticCollectionConfig_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.common.Collection.internal_static_common_StaticCollectionConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.common.Collection.StaticCollectionConfig.class, org.hyperledger.fabric.protos.common.Collection.StaticCollectionConfig.Builder.class);
}
public static final int NAME_FIELD_NUMBER = 1;
private volatile java.lang.Object name_;
/**
*
* the name of the collection inside the denoted chaincode
*
* a reference to a policy residing / managed in the config block
* to define which orgs have access to this collection’s private data
*
*
* optional .common.CollectionPolicyConfig member_orgs_policy = 2;
*/
public org.hyperledger.fabric.protos.common.Collection.CollectionPolicyConfigOrBuilder getMemberOrgsPolicyOrBuilder() {
return getMemberOrgsPolicy();
}
public static final int REQUIRED_PEER_COUNT_FIELD_NUMBER = 3;
private int requiredPeerCount_;
/**
*
* The minimum number of peers private data will be sent to upon
* endorsement. The endorsement would fail if dissemination to at least
* this number of peers is not achieved.
*
*
* optional int32 required_peer_count = 3;
*/
public int getRequiredPeerCount() {
return requiredPeerCount_;
}
public static final int MAXIMUM_PEER_COUNT_FIELD_NUMBER = 4;
private int maximumPeerCount_;
/**
*
* The maximum number of peers that private data will be sent to
* upon endorsement. This number has to be bigger than required_peer_count.
*
*
* optional int32 maximum_peer_count = 4;
*/
public int getMaximumPeerCount() {
return maximumPeerCount_;
}
public static final int BLOCK_TO_LIVE_FIELD_NUMBER = 5;
private long blockToLive_;
/**
*
* The number of blocks after which the collection data expires.
* For instance if the value is set to 10, a key last modified by block number 100
* will be purged at block number 111. A zero value is treated same as MaxUint64
*
*
* optional uint64 block_to_live = 5;
*/
public long getBlockToLive() {
return blockToLive_;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getNameBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
if (memberOrgsPolicy_ != null) {
output.writeMessage(2, getMemberOrgsPolicy());
}
if (requiredPeerCount_ != 0) {
output.writeInt32(3, requiredPeerCount_);
}
if (maximumPeerCount_ != 0) {
output.writeInt32(4, maximumPeerCount_);
}
if (blockToLive_ != 0L) {
output.writeUInt64(5, blockToLive_);
}
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getNameBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
}
if (memberOrgsPolicy_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getMemberOrgsPolicy());
}
if (requiredPeerCount_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(3, requiredPeerCount_);
}
if (maximumPeerCount_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(4, maximumPeerCount_);
}
if (blockToLive_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(5, blockToLive_);
}
memoizedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.hyperledger.fabric.protos.common.Collection.StaticCollectionConfig)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.common.Collection.StaticCollectionConfig other = (org.hyperledger.fabric.protos.common.Collection.StaticCollectionConfig) obj;
boolean result = true;
result = result && getName()
.equals(other.getName());
result = result && (hasMemberOrgsPolicy() == other.hasMemberOrgsPolicy());
if (hasMemberOrgsPolicy()) {
result = result && getMemberOrgsPolicy()
.equals(other.getMemberOrgsPolicy());
}
result = result && (getRequiredPeerCount()
== other.getRequiredPeerCount());
result = result && (getMaximumPeerCount()
== other.getMaximumPeerCount());
result = result && (getBlockToLive()
== other.getBlockToLive());
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptorForType().hashCode();
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
if (hasMemberOrgsPolicy()) {
hash = (37 * hash) + MEMBER_ORGS_POLICY_FIELD_NUMBER;
hash = (53 * hash) + getMemberOrgsPolicy().hashCode();
}
hash = (37 * hash) + REQUIRED_PEER_COUNT_FIELD_NUMBER;
hash = (53 * hash) + getRequiredPeerCount();
hash = (37 * hash) + MAXIMUM_PEER_COUNT_FIELD_NUMBER;
hash = (53 * hash) + getMaximumPeerCount();
hash = (37 * hash) + BLOCK_TO_LIVE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getBlockToLive());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.common.Collection.StaticCollectionConfig parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.common.Collection.StaticCollectionConfig parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.common.Collection.StaticCollectionConfig parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.common.Collection.StaticCollectionConfig parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.common.Collection.StaticCollectionConfig parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.common.Collection.StaticCollectionConfig 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.hyperledger.fabric.protos.common.Collection.StaticCollectionConfig parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.common.Collection.StaticCollectionConfig 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.hyperledger.fabric.protos.common.Collection.StaticCollectionConfig parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.common.Collection.StaticCollectionConfig parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.hyperledger.fabric.protos.common.Collection.StaticCollectionConfig prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
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;
}
/**
*
* StaticCollectionConfig constitutes the configuration parameters of a
* static collection object. Static collections are collections that are
* known at chaincode instantiation time, and that cannot be changed.
* Dynamic collections are deferred.
*
*
* Protobuf type {@code common.StaticCollectionConfig}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:common.StaticCollectionConfig)
org.hyperledger.fabric.protos.common.Collection.StaticCollectionConfigOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.common.Collection.internal_static_common_StaticCollectionConfig_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.common.Collection.internal_static_common_StaticCollectionConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.common.Collection.StaticCollectionConfig.class, org.hyperledger.fabric.protos.common.Collection.StaticCollectionConfig.Builder.class);
}
// Construct using org.hyperledger.fabric.protos.common.Collection.StaticCollectionConfig.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
name_ = "";
if (memberOrgsPolicyBuilder_ == null) {
memberOrgsPolicy_ = null;
} else {
memberOrgsPolicy_ = null;
memberOrgsPolicyBuilder_ = null;
}
requiredPeerCount_ = 0;
maximumPeerCount_ = 0;
blockToLive_ = 0L;
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.common.Collection.internal_static_common_StaticCollectionConfig_descriptor;
}
public org.hyperledger.fabric.protos.common.Collection.StaticCollectionConfig getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.common.Collection.StaticCollectionConfig.getDefaultInstance();
}
public org.hyperledger.fabric.protos.common.Collection.StaticCollectionConfig build() {
org.hyperledger.fabric.protos.common.Collection.StaticCollectionConfig result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.hyperledger.fabric.protos.common.Collection.StaticCollectionConfig buildPartial() {
org.hyperledger.fabric.protos.common.Collection.StaticCollectionConfig result = new org.hyperledger.fabric.protos.common.Collection.StaticCollectionConfig(this);
result.name_ = name_;
if (memberOrgsPolicyBuilder_ == null) {
result.memberOrgsPolicy_ = memberOrgsPolicy_;
} else {
result.memberOrgsPolicy_ = memberOrgsPolicyBuilder_.build();
}
result.requiredPeerCount_ = requiredPeerCount_;
result.maximumPeerCount_ = maximumPeerCount_;
result.blockToLive_ = blockToLive_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.fabric.protos.common.Collection.StaticCollectionConfig) {
return mergeFrom((org.hyperledger.fabric.protos.common.Collection.StaticCollectionConfig)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.fabric.protos.common.Collection.StaticCollectionConfig other) {
if (other == org.hyperledger.fabric.protos.common.Collection.StaticCollectionConfig.getDefaultInstance()) return this;
if (!other.getName().isEmpty()) {
name_ = other.name_;
onChanged();
}
if (other.hasMemberOrgsPolicy()) {
mergeMemberOrgsPolicy(other.getMemberOrgsPolicy());
}
if (other.getRequiredPeerCount() != 0) {
setRequiredPeerCount(other.getRequiredPeerCount());
}
if (other.getMaximumPeerCount() != 0) {
setMaximumPeerCount(other.getMaximumPeerCount());
}
if (other.getBlockToLive() != 0L) {
setBlockToLive(other.getBlockToLive());
}
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.hyperledger.fabric.protos.common.Collection.StaticCollectionConfig parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.hyperledger.fabric.protos.common.Collection.StaticCollectionConfig) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object name_ = "";
/**
*
* the name of the collection inside the denoted chaincode
*
* The minimum number of peers private data will be sent to upon
* endorsement. The endorsement would fail if dissemination to at least
* this number of peers is not achieved.
*
*
* optional int32 required_peer_count = 3;
*/
public int getRequiredPeerCount() {
return requiredPeerCount_;
}
/**
*
* The minimum number of peers private data will be sent to upon
* endorsement. The endorsement would fail if dissemination to at least
* this number of peers is not achieved.
*
* The minimum number of peers private data will be sent to upon
* endorsement. The endorsement would fail if dissemination to at least
* this number of peers is not achieved.
*
* The number of blocks after which the collection data expires.
* For instance if the value is set to 10, a key last modified by block number 100
* will be purged at block number 111. A zero value is treated same as MaxUint64
*
*
* optional uint64 block_to_live = 5;
*/
public long getBlockToLive() {
return blockToLive_;
}
/**
*
* The number of blocks after which the collection data expires.
* For instance if the value is set to 10, a key last modified by block number 100
* will be purged at block number 111. A zero value is treated same as MaxUint64
*
* The number of blocks after which the collection data expires.
* For instance if the value is set to 10, a key last modified by block number 100
* will be purged at block number 111. A zero value is treated same as MaxUint64
*
*
* optional uint64 block_to_live = 5;
*/
public Builder clearBlockToLive() {
blockToLive_ = 0L;
onChanged();
return this;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
// @@protoc_insertion_point(builder_scope:common.StaticCollectionConfig)
}
// @@protoc_insertion_point(class_scope:common.StaticCollectionConfig)
private static final org.hyperledger.fabric.protos.common.Collection.StaticCollectionConfig DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.common.Collection.StaticCollectionConfig();
}
public static org.hyperledger.fabric.protos.common.Collection.StaticCollectionConfig getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public StaticCollectionConfig parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new StaticCollectionConfig(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public org.hyperledger.fabric.protos.common.Collection.StaticCollectionConfig getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface CollectionPolicyConfigOrBuilder extends
// @@protoc_insertion_point(interface_extends:common.CollectionPolicyConfig)
com.google.protobuf.MessageOrBuilder {
/**
*
* Initially, only a signature policy is supported.
*
* Collection policy configuration. Initially, the configuration can only
* contain a SignaturePolicy. In the future, the SignaturePolicy may be a
* more general Policy. Instead of containing the actual policy, the
* configuration may in the future contain a string reference to a policy.
*
*
* Protobuf type {@code common.CollectionPolicyConfig}
*/
public static final class CollectionPolicyConfig extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:common.CollectionPolicyConfig)
CollectionPolicyConfigOrBuilder {
// Use CollectionPolicyConfig.newBuilder() to construct.
private CollectionPolicyConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private CollectionPolicyConfig() {
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
private CollectionPolicyConfig(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
int mutable_bitField0_ = 0;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!input.skipField(tag)) {
done = true;
}
break;
}
case 10: {
org.hyperledger.fabric.protos.common.Policies.SignaturePolicyEnvelope.Builder subBuilder = null;
if (payloadCase_ == 1) {
subBuilder = ((org.hyperledger.fabric.protos.common.Policies.SignaturePolicyEnvelope) payload_).toBuilder();
}
payload_ =
input.readMessage(org.hyperledger.fabric.protos.common.Policies.SignaturePolicyEnvelope.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((org.hyperledger.fabric.protos.common.Policies.SignaturePolicyEnvelope) payload_);
payload_ = subBuilder.buildPartial();
}
payloadCase_ = 1;
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 {
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.common.Collection.internal_static_common_CollectionPolicyConfig_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.common.Collection.internal_static_common_CollectionPolicyConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.common.Collection.CollectionPolicyConfig.class, org.hyperledger.fabric.protos.common.Collection.CollectionPolicyConfig.Builder.class);
}
private int payloadCase_ = 0;
private java.lang.Object payload_;
public enum PayloadCase
implements com.google.protobuf.Internal.EnumLite {
SIGNATURE_POLICY(1),
PAYLOAD_NOT_SET(0);
private final int value;
private PayloadCase(int value) {
this.value = value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static PayloadCase valueOf(int value) {
return forNumber(value);
}
public static PayloadCase forNumber(int value) {
switch (value) {
case 1: return SIGNATURE_POLICY;
case 0: return PAYLOAD_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public PayloadCase
getPayloadCase() {
return PayloadCase.forNumber(
payloadCase_);
}
public static final int SIGNATURE_POLICY_FIELD_NUMBER = 1;
/**
*
* Initially, only a signature policy is supported.
*
* Initially, only a signature policy is supported.
*
*
* optional .common.SignaturePolicyEnvelope signature_policy = 1;
*/
public org.hyperledger.fabric.protos.common.Policies.SignaturePolicyEnvelopeOrBuilder getSignaturePolicyOrBuilder() {
if (payloadCase_ == 1) {
return (org.hyperledger.fabric.protos.common.Policies.SignaturePolicyEnvelope) payload_;
}
return org.hyperledger.fabric.protos.common.Policies.SignaturePolicyEnvelope.getDefaultInstance();
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (payloadCase_ == 1) {
output.writeMessage(1, (org.hyperledger.fabric.protos.common.Policies.SignaturePolicyEnvelope) payload_);
}
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (payloadCase_ == 1) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, (org.hyperledger.fabric.protos.common.Policies.SignaturePolicyEnvelope) payload_);
}
memoizedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.hyperledger.fabric.protos.common.Collection.CollectionPolicyConfig)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.common.Collection.CollectionPolicyConfig other = (org.hyperledger.fabric.protos.common.Collection.CollectionPolicyConfig) obj;
boolean result = true;
result = result && getPayloadCase().equals(
other.getPayloadCase());
if (!result) return false;
switch (payloadCase_) {
case 1:
result = result && getSignaturePolicy()
.equals(other.getSignaturePolicy());
break;
case 0:
default:
}
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptorForType().hashCode();
switch (payloadCase_) {
case 1:
hash = (37 * hash) + SIGNATURE_POLICY_FIELD_NUMBER;
hash = (53 * hash) + getSignaturePolicy().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.common.Collection.CollectionPolicyConfig parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.common.Collection.CollectionPolicyConfig parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.common.Collection.CollectionPolicyConfig parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.common.Collection.CollectionPolicyConfig parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.common.Collection.CollectionPolicyConfig parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.common.Collection.CollectionPolicyConfig 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.hyperledger.fabric.protos.common.Collection.CollectionPolicyConfig parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.common.Collection.CollectionPolicyConfig 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.hyperledger.fabric.protos.common.Collection.CollectionPolicyConfig parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.common.Collection.CollectionPolicyConfig parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.hyperledger.fabric.protos.common.Collection.CollectionPolicyConfig prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
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;
}
/**
*
* Collection policy configuration. Initially, the configuration can only
* contain a SignaturePolicy. In the future, the SignaturePolicy may be a
* more general Policy. Instead of containing the actual policy, the
* configuration may in the future contain a string reference to a policy.
*
*
* Protobuf type {@code common.CollectionPolicyConfig}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:common.CollectionPolicyConfig)
org.hyperledger.fabric.protos.common.Collection.CollectionPolicyConfigOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.common.Collection.internal_static_common_CollectionPolicyConfig_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.common.Collection.internal_static_common_CollectionPolicyConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.common.Collection.CollectionPolicyConfig.class, org.hyperledger.fabric.protos.common.Collection.CollectionPolicyConfig.Builder.class);
}
// Construct using org.hyperledger.fabric.protos.common.Collection.CollectionPolicyConfig.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
payloadCase_ = 0;
payload_ = null;
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.common.Collection.internal_static_common_CollectionPolicyConfig_descriptor;
}
public org.hyperledger.fabric.protos.common.Collection.CollectionPolicyConfig getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.common.Collection.CollectionPolicyConfig.getDefaultInstance();
}
public org.hyperledger.fabric.protos.common.Collection.CollectionPolicyConfig build() {
org.hyperledger.fabric.protos.common.Collection.CollectionPolicyConfig result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.hyperledger.fabric.protos.common.Collection.CollectionPolicyConfig buildPartial() {
org.hyperledger.fabric.protos.common.Collection.CollectionPolicyConfig result = new org.hyperledger.fabric.protos.common.Collection.CollectionPolicyConfig(this);
if (payloadCase_ == 1) {
if (signaturePolicyBuilder_ == null) {
result.payload_ = payload_;
} else {
result.payload_ = signaturePolicyBuilder_.build();
}
}
result.payloadCase_ = payloadCase_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.fabric.protos.common.Collection.CollectionPolicyConfig) {
return mergeFrom((org.hyperledger.fabric.protos.common.Collection.CollectionPolicyConfig)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.fabric.protos.common.Collection.CollectionPolicyConfig other) {
if (other == org.hyperledger.fabric.protos.common.Collection.CollectionPolicyConfig.getDefaultInstance()) return this;
switch (other.getPayloadCase()) {
case SIGNATURE_POLICY: {
mergeSignaturePolicy(other.getSignaturePolicy());
break;
}
case PAYLOAD_NOT_SET: {
break;
}
}
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.hyperledger.fabric.protos.common.Collection.CollectionPolicyConfig parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.hyperledger.fabric.protos.common.Collection.CollectionPolicyConfig) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int payloadCase_ = 0;
private java.lang.Object payload_;
public PayloadCase
getPayloadCase() {
return PayloadCase.forNumber(
payloadCase_);
}
public Builder clearPayload() {
payloadCase_ = 0;
payload_ = null;
onChanged();
return this;
}
private com.google.protobuf.SingleFieldBuilderV3<
org.hyperledger.fabric.protos.common.Policies.SignaturePolicyEnvelope, org.hyperledger.fabric.protos.common.Policies.SignaturePolicyEnvelope.Builder, org.hyperledger.fabric.protos.common.Policies.SignaturePolicyEnvelopeOrBuilder> signaturePolicyBuilder_;
/**
*
* Initially, only a signature policy is supported.
*