org.hyperledger.fabric.protos.peer.Chaincode Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fabric-chaincode-protos Show documentation
Show all versions of fabric-chaincode-protos Show documentation
Hyperldger Fabric Java chaincode protobuf files
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: peer/chaincode.proto
package org.hyperledger.fabric.protos.peer;
public final class Chaincode {
private Chaincode() {}
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 ChaincodeIDOrBuilder extends
// @@protoc_insertion_point(interface_extends:protos.ChaincodeID)
com.google.protobuf.MessageOrBuilder {
/**
*
*deploy transaction will use the path
*
*
* string path = 1;
*/
java.lang.String getPath();
/**
*
*deploy transaction will use the path
*
*
* string path = 1;
*/
com.google.protobuf.ByteString
getPathBytes();
/**
*
*all other requests will use the name (really a hashcode) generated by
*the deploy transaction
*
*
* string name = 2;
*/
java.lang.String getName();
/**
*
*all other requests will use the name (really a hashcode) generated by
*the deploy transaction
*
*
* string name = 2;
*/
com.google.protobuf.ByteString
getNameBytes();
/**
*
*user friendly version name for the chaincode
*
*
* string version = 3;
*/
java.lang.String getVersion();
/**
*
*user friendly version name for the chaincode
*
*
* string version = 3;
*/
com.google.protobuf.ByteString
getVersionBytes();
}
/**
*
*ChaincodeID contains the path as specified by the deploy transaction
*that created it as well as the hashCode that is generated by the
*system for the path. From the user level (ie, CLI, REST API and so on)
*deploy transaction is expected to provide the path and other requests
*are expected to provide the hashCode. The other value will be ignored.
*Internally, the structure could contain both values. For instance, the
*hashCode will be set when first generated using the path
*
*
* Protobuf type {@code protos.ChaincodeID}
*/
public static final class ChaincodeID extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:protos.ChaincodeID)
ChaincodeIDOrBuilder {
private static final long serialVersionUID = 0L;
// Use ChaincodeID.newBuilder() to construct.
private ChaincodeID(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ChaincodeID() {
path_ = "";
name_ = "";
version_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new ChaincodeID();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private ChaincodeID(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
path_ = s;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
name_ = s;
break;
}
case 26: {
java.lang.String s = input.readStringRequireUtf8();
version_ = s;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.Chaincode.internal_static_protos_ChaincodeID_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.peer.Chaincode.internal_static_protos_ChaincodeID_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID.class, org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID.Builder.class);
}
public static final int PATH_FIELD_NUMBER = 1;
private volatile java.lang.Object path_;
/**
*
*deploy transaction will use the path
*
*
* string path = 1;
*/
public java.lang.String getPath() {
java.lang.Object ref = path_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
path_ = s;
return s;
}
}
/**
*
*deploy transaction will use the path
*
*
* string path = 1;
*/
public com.google.protobuf.ByteString
getPathBytes() {
java.lang.Object ref = path_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
path_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int NAME_FIELD_NUMBER = 2;
private volatile java.lang.Object name_;
/**
*
*all other requests will use the name (really a hashcode) generated by
*the deploy transaction
*
*
* string name = 2;
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
}
}
/**
*
*all other requests will use the name (really a hashcode) generated by
*the deploy transaction
*
*
* string name = 2;
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int VERSION_FIELD_NUMBER = 3;
private volatile java.lang.Object version_;
/**
*
*user friendly version name for the chaincode
*
*
* string version = 3;
*/
public java.lang.String getVersion() {
java.lang.Object ref = version_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
version_ = s;
return s;
}
}
/**
*
*user friendly version name for the chaincode
*
*
* string version = 3;
*/
public com.google.protobuf.ByteString
getVersionBytes() {
java.lang.Object ref = version_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
version_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getPathBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, path_);
}
if (!getNameBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_);
}
if (!getVersionBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, version_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getPathBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, path_);
}
if (!getNameBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_);
}
if (!getVersionBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, version_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID other = (org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID) obj;
if (!getPath()
.equals(other.getPath())) return false;
if (!getName()
.equals(other.getName())) return false;
if (!getVersion()
.equals(other.getVersion())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + PATH_FIELD_NUMBER;
hash = (53 * hash) + getPath().hashCode();
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
hash = (37 * hash) + VERSION_FIELD_NUMBER;
hash = (53 * hash) + getVersion().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID 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.peer.Chaincode.ChaincodeID parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID 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.peer.Chaincode.ChaincodeID parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID 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.peer.Chaincode.ChaincodeID parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID 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;
}
/**
*
*ChaincodeID contains the path as specified by the deploy transaction
*that created it as well as the hashCode that is generated by the
*system for the path. From the user level (ie, CLI, REST API and so on)
*deploy transaction is expected to provide the path and other requests
*are expected to provide the hashCode. The other value will be ignored.
*Internally, the structure could contain both values. For instance, the
*hashCode will be set when first generated using the path
*
*
* Protobuf type {@code protos.ChaincodeID}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:protos.ChaincodeID)
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeIDOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.Chaincode.internal_static_protos_ChaincodeID_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.peer.Chaincode.internal_static_protos_ChaincodeID_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID.class, org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID.Builder.class);
}
// Construct using org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID.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();
path_ = "";
name_ = "";
version_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.peer.Chaincode.internal_static_protos_ChaincodeID_descriptor;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID.getDefaultInstance();
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID build() {
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID buildPartial() {
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID result = new org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID(this);
result.path_ = path_;
result.name_ = name_;
result.version_ = version_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID) {
return mergeFrom((org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID other) {
if (other == org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID.getDefaultInstance()) return this;
if (!other.getPath().isEmpty()) {
path_ = other.path_;
onChanged();
}
if (!other.getName().isEmpty()) {
name_ = other.name_;
onChanged();
}
if (!other.getVersion().isEmpty()) {
version_ = other.version_;
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 {
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object path_ = "";
/**
*
*deploy transaction will use the path
*
*
* string path = 1;
*/
public java.lang.String getPath() {
java.lang.Object ref = path_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
path_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*deploy transaction will use the path
*
*
* string path = 1;
*/
public com.google.protobuf.ByteString
getPathBytes() {
java.lang.Object ref = path_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
path_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*deploy transaction will use the path
*
*
* string path = 1;
*/
public Builder setPath(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
path_ = value;
onChanged();
return this;
}
/**
*
*deploy transaction will use the path
*
*
* string path = 1;
*/
public Builder clearPath() {
path_ = getDefaultInstance().getPath();
onChanged();
return this;
}
/**
*
*deploy transaction will use the path
*
*
* string path = 1;
*/
public Builder setPathBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
path_ = value;
onChanged();
return this;
}
private java.lang.Object name_ = "";
/**
*
*all other requests will use the name (really a hashcode) generated by
*the deploy transaction
*
*
* string name = 2;
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*all other requests will use the name (really a hashcode) generated by
*the deploy transaction
*
*
* string name = 2;
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*all other requests will use the name (really a hashcode) generated by
*the deploy transaction
*
*
* string name = 2;
*/
public Builder setName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
name_ = value;
onChanged();
return this;
}
/**
*
*all other requests will use the name (really a hashcode) generated by
*the deploy transaction
*
*
* string name = 2;
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
onChanged();
return this;
}
/**
*
*all other requests will use the name (really a hashcode) generated by
*the deploy transaction
*
*
* string name = 2;
*/
public Builder setNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
name_ = value;
onChanged();
return this;
}
private java.lang.Object version_ = "";
/**
*
*user friendly version name for the chaincode
*
*
* string version = 3;
*/
public java.lang.String getVersion() {
java.lang.Object ref = version_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
version_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*user friendly version name for the chaincode
*
*
* string version = 3;
*/
public com.google.protobuf.ByteString
getVersionBytes() {
java.lang.Object ref = version_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
version_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*user friendly version name for the chaincode
*
*
* string version = 3;
*/
public Builder setVersion(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
version_ = value;
onChanged();
return this;
}
/**
*
*user friendly version name for the chaincode
*
*
* string version = 3;
*/
public Builder clearVersion() {
version_ = getDefaultInstance().getVersion();
onChanged();
return this;
}
/**
*
*user friendly version name for the chaincode
*
*
* string version = 3;
*/
public Builder setVersionBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
version_ = value;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:protos.ChaincodeID)
}
// @@protoc_insertion_point(class_scope:protos.ChaincodeID)
private static final org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID();
}
public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ChaincodeID parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ChaincodeID(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ChaincodeInputOrBuilder extends
// @@protoc_insertion_point(interface_extends:protos.ChaincodeInput)
com.google.protobuf.MessageOrBuilder {
/**
* repeated bytes args = 1;
*/
java.util.List getArgsList();
/**
* repeated bytes args = 1;
*/
int getArgsCount();
/**
* repeated bytes args = 1;
*/
com.google.protobuf.ByteString getArgs(int index);
/**
* map<string, bytes> decorations = 2;
*/
int getDecorationsCount();
/**
* map<string, bytes> decorations = 2;
*/
boolean containsDecorations(
java.lang.String key);
/**
* Use {@link #getDecorationsMap()} instead.
*/
@java.lang.Deprecated
java.util.Map
getDecorations();
/**
* map<string, bytes> decorations = 2;
*/
java.util.Map
getDecorationsMap();
/**
* map<string, bytes> decorations = 2;
*/
com.google.protobuf.ByteString getDecorationsOrDefault(
java.lang.String key,
com.google.protobuf.ByteString defaultValue);
/**
* map<string, bytes> decorations = 2;
*/
com.google.protobuf.ByteString getDecorationsOrThrow(
java.lang.String key);
/**
*
* is_init is used for the application to signal that an invocation is to be routed
* to the legacy 'Init' function for compatibility with chaincodes which handled
* Init in the old way. New applications should manage their initialized state
* themselves.
*
*
* bool is_init = 3;
*/
boolean getIsInit();
}
/**
*
* Carries the chaincode function and its arguments.
* UnmarshalJSON in transaction.go converts the string-based REST/JSON input to
* the []byte-based current ChaincodeInput structure.
*
*
* Protobuf type {@code protos.ChaincodeInput}
*/
public static final class ChaincodeInput extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:protos.ChaincodeInput)
ChaincodeInputOrBuilder {
private static final long serialVersionUID = 0L;
// Use ChaincodeInput.newBuilder() to construct.
private ChaincodeInput(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ChaincodeInput() {
args_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new ChaincodeInput();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private ChaincodeInput(
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: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
args_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
args_.add(input.readBytes());
break;
}
case 18: {
if (!((mutable_bitField0_ & 0x00000002) != 0)) {
decorations_ = com.google.protobuf.MapField.newMapField(
DecorationsDefaultEntryHolder.defaultEntry);
mutable_bitField0_ |= 0x00000002;
}
com.google.protobuf.MapEntry
decorations__ = input.readMessage(
DecorationsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
decorations_.getMutableMap().put(
decorations__.getKey(), decorations__.getValue());
break;
}
case 24: {
isInit_ = input.readBool();
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
args_ = java.util.Collections.unmodifiableList(args_); // C
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.Chaincode.internal_static_protos_ChaincodeInput_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 2:
return internalGetDecorations();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.peer.Chaincode.internal_static_protos_ChaincodeInput_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput.class, org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput.Builder.class);
}
public static final int ARGS_FIELD_NUMBER = 1;
private java.util.List args_;
/**
* repeated bytes args = 1;
*/
public java.util.List
getArgsList() {
return args_;
}
/**
* repeated bytes args = 1;
*/
public int getArgsCount() {
return args_.size();
}
/**
* repeated bytes args = 1;
*/
public com.google.protobuf.ByteString getArgs(int index) {
return args_.get(index);
}
public static final int DECORATIONS_FIELD_NUMBER = 2;
private static final class DecorationsDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.String, com.google.protobuf.ByteString> defaultEntry =
com.google.protobuf.MapEntry
.newDefaultInstance(
org.hyperledger.fabric.protos.peer.Chaincode.internal_static_protos_ChaincodeInput_DecorationsEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.BYTES,
com.google.protobuf.ByteString.EMPTY);
}
private com.google.protobuf.MapField<
java.lang.String, com.google.protobuf.ByteString> decorations_;
private com.google.protobuf.MapField
internalGetDecorations() {
if (decorations_ == null) {
return com.google.protobuf.MapField.emptyMapField(
DecorationsDefaultEntryHolder.defaultEntry);
}
return decorations_;
}
public int getDecorationsCount() {
return internalGetDecorations().getMap().size();
}
/**
* map<string, bytes> decorations = 2;
*/
public boolean containsDecorations(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
return internalGetDecorations().getMap().containsKey(key);
}
/**
* Use {@link #getDecorationsMap()} instead.
*/
@java.lang.Deprecated
public java.util.Map getDecorations() {
return getDecorationsMap();
}
/**
* map<string, bytes> decorations = 2;
*/
public java.util.Map getDecorationsMap() {
return internalGetDecorations().getMap();
}
/**
* map<string, bytes> decorations = 2;
*/
public com.google.protobuf.ByteString getDecorationsOrDefault(
java.lang.String key,
com.google.protobuf.ByteString defaultValue) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetDecorations().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
* map<string, bytes> decorations = 2;
*/
public com.google.protobuf.ByteString getDecorationsOrThrow(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetDecorations().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public static final int IS_INIT_FIELD_NUMBER = 3;
private boolean isInit_;
/**
*
* is_init is used for the application to signal that an invocation is to be routed
* to the legacy 'Init' function for compatibility with chaincodes which handled
* Init in the old way. New applications should manage their initialized state
* themselves.
*
*
* bool is_init = 3;
*/
public boolean getIsInit() {
return isInit_;
}
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 {
for (int i = 0; i < args_.size(); i++) {
output.writeBytes(1, args_.get(i));
}
com.google.protobuf.GeneratedMessageV3
.serializeStringMapTo(
output,
internalGetDecorations(),
DecorationsDefaultEntryHolder.defaultEntry,
2);
if (isInit_ != false) {
output.writeBool(3, isInit_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
{
int dataSize = 0;
for (int i = 0; i < args_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeBytesSizeNoTag(args_.get(i));
}
size += dataSize;
size += 1 * getArgsList().size();
}
for (java.util.Map.Entry entry
: internalGetDecorations().getMap().entrySet()) {
com.google.protobuf.MapEntry
decorations__ = DecorationsDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, decorations__);
}
if (isInit_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(3, isInit_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput other = (org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput) obj;
if (!getArgsList()
.equals(other.getArgsList())) return false;
if (!internalGetDecorations().equals(
other.internalGetDecorations())) return false;
if (getIsInit()
!= other.getIsInit()) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (getArgsCount() > 0) {
hash = (37 * hash) + ARGS_FIELD_NUMBER;
hash = (53 * hash) + getArgsList().hashCode();
}
if (!internalGetDecorations().getMap().isEmpty()) {
hash = (37 * hash) + DECORATIONS_FIELD_NUMBER;
hash = (53 * hash) + internalGetDecorations().hashCode();
}
hash = (37 * hash) + IS_INIT_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getIsInit());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput 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.peer.Chaincode.ChaincodeInput parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput 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.peer.Chaincode.ChaincodeInput parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput 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.peer.Chaincode.ChaincodeInput parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput 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;
}
/**
*
* Carries the chaincode function and its arguments.
* UnmarshalJSON in transaction.go converts the string-based REST/JSON input to
* the []byte-based current ChaincodeInput structure.
*
*
* Protobuf type {@code protos.ChaincodeInput}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:protos.ChaincodeInput)
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInputOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.Chaincode.internal_static_protos_ChaincodeInput_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 2:
return internalGetDecorations();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMutableMapField(
int number) {
switch (number) {
case 2:
return internalGetMutableDecorations();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.peer.Chaincode.internal_static_protos_ChaincodeInput_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput.class, org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput.Builder.class);
}
// Construct using org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput.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();
args_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
internalGetMutableDecorations().clear();
isInit_ = false;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.peer.Chaincode.internal_static_protos_ChaincodeInput_descriptor;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput.getDefaultInstance();
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput build() {
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput buildPartial() {
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput result = new org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput(this);
int from_bitField0_ = bitField0_;
if (((bitField0_ & 0x00000001) != 0)) {
args_ = java.util.Collections.unmodifiableList(args_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.args_ = args_;
result.decorations_ = internalGetDecorations();
result.decorations_.makeImmutable();
result.isInit_ = isInit_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput) {
return mergeFrom((org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput other) {
if (other == org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput.getDefaultInstance()) return this;
if (!other.args_.isEmpty()) {
if (args_.isEmpty()) {
args_ = other.args_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureArgsIsMutable();
args_.addAll(other.args_);
}
onChanged();
}
internalGetMutableDecorations().mergeFrom(
other.internalGetDecorations());
if (other.getIsInit() != false) {
setIsInit(other.getIsInit());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.util.List args_ = java.util.Collections.emptyList();
private void ensureArgsIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
args_ = new java.util.ArrayList(args_);
bitField0_ |= 0x00000001;
}
}
/**
* repeated bytes args = 1;
*/
public java.util.List
getArgsList() {
return ((bitField0_ & 0x00000001) != 0) ?
java.util.Collections.unmodifiableList(args_) : args_;
}
/**
* repeated bytes args = 1;
*/
public int getArgsCount() {
return args_.size();
}
/**
* repeated bytes args = 1;
*/
public com.google.protobuf.ByteString getArgs(int index) {
return args_.get(index);
}
/**
* repeated bytes args = 1;
*/
public Builder setArgs(
int index, com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
ensureArgsIsMutable();
args_.set(index, value);
onChanged();
return this;
}
/**
* repeated bytes args = 1;
*/
public Builder addArgs(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
ensureArgsIsMutable();
args_.add(value);
onChanged();
return this;
}
/**
* repeated bytes args = 1;
*/
public Builder addAllArgs(
java.lang.Iterable extends com.google.protobuf.ByteString> values) {
ensureArgsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, args_);
onChanged();
return this;
}
/**
* repeated bytes args = 1;
*/
public Builder clearArgs() {
args_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
private com.google.protobuf.MapField<
java.lang.String, com.google.protobuf.ByteString> decorations_;
private com.google.protobuf.MapField
internalGetDecorations() {
if (decorations_ == null) {
return com.google.protobuf.MapField.emptyMapField(
DecorationsDefaultEntryHolder.defaultEntry);
}
return decorations_;
}
private com.google.protobuf.MapField
internalGetMutableDecorations() {
onChanged();;
if (decorations_ == null) {
decorations_ = com.google.protobuf.MapField.newMapField(
DecorationsDefaultEntryHolder.defaultEntry);
}
if (!decorations_.isMutable()) {
decorations_ = decorations_.copy();
}
return decorations_;
}
public int getDecorationsCount() {
return internalGetDecorations().getMap().size();
}
/**
* map<string, bytes> decorations = 2;
*/
public boolean containsDecorations(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
return internalGetDecorations().getMap().containsKey(key);
}
/**
* Use {@link #getDecorationsMap()} instead.
*/
@java.lang.Deprecated
public java.util.Map getDecorations() {
return getDecorationsMap();
}
/**
* map<string, bytes> decorations = 2;
*/
public java.util.Map getDecorationsMap() {
return internalGetDecorations().getMap();
}
/**
* map<string, bytes> decorations = 2;
*/
public com.google.protobuf.ByteString getDecorationsOrDefault(
java.lang.String key,
com.google.protobuf.ByteString defaultValue) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetDecorations().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
* map<string, bytes> decorations = 2;
*/
public com.google.protobuf.ByteString getDecorationsOrThrow(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetDecorations().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearDecorations() {
internalGetMutableDecorations().getMutableMap()
.clear();
return this;
}
/**
* map<string, bytes> decorations = 2;
*/
public Builder removeDecorations(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
internalGetMutableDecorations().getMutableMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutableDecorations() {
return internalGetMutableDecorations().getMutableMap();
}
/**
* map<string, bytes> decorations = 2;
*/
public Builder putDecorations(
java.lang.String key,
com.google.protobuf.ByteString value) {
if (key == null) { throw new java.lang.NullPointerException(); }
if (value == null) { throw new java.lang.NullPointerException(); }
internalGetMutableDecorations().getMutableMap()
.put(key, value);
return this;
}
/**
* map<string, bytes> decorations = 2;
*/
public Builder putAllDecorations(
java.util.Map values) {
internalGetMutableDecorations().getMutableMap()
.putAll(values);
return this;
}
private boolean isInit_ ;
/**
*
* is_init is used for the application to signal that an invocation is to be routed
* to the legacy 'Init' function for compatibility with chaincodes which handled
* Init in the old way. New applications should manage their initialized state
* themselves.
*
*
* bool is_init = 3;
*/
public boolean getIsInit() {
return isInit_;
}
/**
*
* is_init is used for the application to signal that an invocation is to be routed
* to the legacy 'Init' function for compatibility with chaincodes which handled
* Init in the old way. New applications should manage their initialized state
* themselves.
*
*
* bool is_init = 3;
*/
public Builder setIsInit(boolean value) {
isInit_ = value;
onChanged();
return this;
}
/**
*
* is_init is used for the application to signal that an invocation is to be routed
* to the legacy 'Init' function for compatibility with chaincodes which handled
* Init in the old way. New applications should manage their initialized state
* themselves.
*
*
* bool is_init = 3;
*/
public Builder clearIsInit() {
isInit_ = false;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:protos.ChaincodeInput)
}
// @@protoc_insertion_point(class_scope:protos.ChaincodeInput)
private static final org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput();
}
public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ChaincodeInput parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ChaincodeInput(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ChaincodeSpecOrBuilder extends
// @@protoc_insertion_point(interface_extends:protos.ChaincodeSpec)
com.google.protobuf.MessageOrBuilder {
/**
* .protos.ChaincodeSpec.Type type = 1;
*/
int getTypeValue();
/**
* .protos.ChaincodeSpec.Type type = 1;
*/
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.Type getType();
/**
* .protos.ChaincodeID chaincode_id = 2;
*/
boolean hasChaincodeId();
/**
* .protos.ChaincodeID chaincode_id = 2;
*/
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID getChaincodeId();
/**
* .protos.ChaincodeID chaincode_id = 2;
*/
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeIDOrBuilder getChaincodeIdOrBuilder();
/**
* .protos.ChaincodeInput input = 3;
*/
boolean hasInput();
/**
* .protos.ChaincodeInput input = 3;
*/
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput getInput();
/**
* .protos.ChaincodeInput input = 3;
*/
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInputOrBuilder getInputOrBuilder();
/**
* int32 timeout = 4;
*/
int getTimeout();
}
/**
*
* Carries the chaincode specification. This is the actual metadata required for
* defining a chaincode.
*
*
* Protobuf type {@code protos.ChaincodeSpec}
*/
public static final class ChaincodeSpec extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:protos.ChaincodeSpec)
ChaincodeSpecOrBuilder {
private static final long serialVersionUID = 0L;
// Use ChaincodeSpec.newBuilder() to construct.
private ChaincodeSpec(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ChaincodeSpec() {
type_ = 0;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new ChaincodeSpec();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private ChaincodeSpec(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
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 8: {
int rawValue = input.readEnum();
type_ = rawValue;
break;
}
case 18: {
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID.Builder subBuilder = null;
if (chaincodeId_ != null) {
subBuilder = chaincodeId_.toBuilder();
}
chaincodeId_ = input.readMessage(org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(chaincodeId_);
chaincodeId_ = subBuilder.buildPartial();
}
break;
}
case 26: {
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput.Builder subBuilder = null;
if (input_ != null) {
subBuilder = input_.toBuilder();
}
input_ = input.readMessage(org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(input_);
input_ = subBuilder.buildPartial();
}
break;
}
case 32: {
timeout_ = input.readInt32();
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.Chaincode.internal_static_protos_ChaincodeSpec_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.peer.Chaincode.internal_static_protos_ChaincodeSpec_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.class, org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.Builder.class);
}
/**
* Protobuf enum {@code protos.ChaincodeSpec.Type}
*/
public enum Type
implements com.google.protobuf.ProtocolMessageEnum {
/**
* UNDEFINED = 0;
*/
UNDEFINED(0),
/**
* GOLANG = 1;
*/
GOLANG(1),
/**
* NODE = 2;
*/
NODE(2),
/**
* CAR = 3;
*/
CAR(3),
/**
* JAVA = 4;
*/
JAVA(4),
UNRECOGNIZED(-1),
;
/**
* UNDEFINED = 0;
*/
public static final int UNDEFINED_VALUE = 0;
/**
* GOLANG = 1;
*/
public static final int GOLANG_VALUE = 1;
/**
* NODE = 2;
*/
public static final int NODE_VALUE = 2;
/**
* CAR = 3;
*/
public static final int CAR_VALUE = 3;
/**
* JAVA = 4;
*/
public static final int JAVA_VALUE = 4;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static Type valueOf(int value) {
return forNumber(value);
}
public static Type forNumber(int value) {
switch (value) {
case 0: return UNDEFINED;
case 1: return GOLANG;
case 2: return NODE;
case 3: return CAR;
case 4: return JAVA;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
Type> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public Type findValueByNumber(int number) {
return Type.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.getDescriptor().getEnumTypes().get(0);
}
private static final Type[] VALUES = values();
public static Type valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private Type(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:protos.ChaincodeSpec.Type)
}
public static final int TYPE_FIELD_NUMBER = 1;
private int type_;
/**
* .protos.ChaincodeSpec.Type type = 1;
*/
public int getTypeValue() {
return type_;
}
/**
* .protos.ChaincodeSpec.Type type = 1;
*/
public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.Type getType() {
@SuppressWarnings("deprecation")
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.Type result = org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.Type.valueOf(type_);
return result == null ? org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.Type.UNRECOGNIZED : result;
}
public static final int CHAINCODE_ID_FIELD_NUMBER = 2;
private org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID chaincodeId_;
/**
* .protos.ChaincodeID chaincode_id = 2;
*/
public boolean hasChaincodeId() {
return chaincodeId_ != null;
}
/**
* .protos.ChaincodeID chaincode_id = 2;
*/
public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID getChaincodeId() {
return chaincodeId_ == null ? org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID.getDefaultInstance() : chaincodeId_;
}
/**
* .protos.ChaincodeID chaincode_id = 2;
*/
public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeIDOrBuilder getChaincodeIdOrBuilder() {
return getChaincodeId();
}
public static final int INPUT_FIELD_NUMBER = 3;
private org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput input_;
/**
* .protos.ChaincodeInput input = 3;
*/
public boolean hasInput() {
return input_ != null;
}
/**
* .protos.ChaincodeInput input = 3;
*/
public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput getInput() {
return input_ == null ? org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput.getDefaultInstance() : input_;
}
/**
* .protos.ChaincodeInput input = 3;
*/
public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInputOrBuilder getInputOrBuilder() {
return getInput();
}
public static final int TIMEOUT_FIELD_NUMBER = 4;
private int timeout_;
/**
* int32 timeout = 4;
*/
public int getTimeout() {
return timeout_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (type_ != org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.Type.UNDEFINED.getNumber()) {
output.writeEnum(1, type_);
}
if (chaincodeId_ != null) {
output.writeMessage(2, getChaincodeId());
}
if (input_ != null) {
output.writeMessage(3, getInput());
}
if (timeout_ != 0) {
output.writeInt32(4, timeout_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (type_ != org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.Type.UNDEFINED.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(1, type_);
}
if (chaincodeId_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getChaincodeId());
}
if (input_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getInput());
}
if (timeout_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(4, timeout_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec other = (org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec) obj;
if (type_ != other.type_) return false;
if (hasChaincodeId() != other.hasChaincodeId()) return false;
if (hasChaincodeId()) {
if (!getChaincodeId()
.equals(other.getChaincodeId())) return false;
}
if (hasInput() != other.hasInput()) return false;
if (hasInput()) {
if (!getInput()
.equals(other.getInput())) return false;
}
if (getTimeout()
!= other.getTimeout()) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + TYPE_FIELD_NUMBER;
hash = (53 * hash) + type_;
if (hasChaincodeId()) {
hash = (37 * hash) + CHAINCODE_ID_FIELD_NUMBER;
hash = (53 * hash) + getChaincodeId().hashCode();
}
if (hasInput()) {
hash = (37 * hash) + INPUT_FIELD_NUMBER;
hash = (53 * hash) + getInput().hashCode();
}
hash = (37 * hash) + TIMEOUT_FIELD_NUMBER;
hash = (53 * hash) + getTimeout();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec 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.peer.Chaincode.ChaincodeSpec parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec 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.peer.Chaincode.ChaincodeSpec parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec 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.peer.Chaincode.ChaincodeSpec parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec 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;
}
/**
*
* Carries the chaincode specification. This is the actual metadata required for
* defining a chaincode.
*
*
* Protobuf type {@code protos.ChaincodeSpec}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:protos.ChaincodeSpec)
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpecOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.Chaincode.internal_static_protos_ChaincodeSpec_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.peer.Chaincode.internal_static_protos_ChaincodeSpec_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.class, org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.Builder.class);
}
// Construct using org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.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();
type_ = 0;
if (chaincodeIdBuilder_ == null) {
chaincodeId_ = null;
} else {
chaincodeId_ = null;
chaincodeIdBuilder_ = null;
}
if (inputBuilder_ == null) {
input_ = null;
} else {
input_ = null;
inputBuilder_ = null;
}
timeout_ = 0;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.peer.Chaincode.internal_static_protos_ChaincodeSpec_descriptor;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.getDefaultInstance();
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec build() {
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec buildPartial() {
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec result = new org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec(this);
result.type_ = type_;
if (chaincodeIdBuilder_ == null) {
result.chaincodeId_ = chaincodeId_;
} else {
result.chaincodeId_ = chaincodeIdBuilder_.build();
}
if (inputBuilder_ == null) {
result.input_ = input_;
} else {
result.input_ = inputBuilder_.build();
}
result.timeout_ = timeout_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec) {
return mergeFrom((org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec other) {
if (other == org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.getDefaultInstance()) return this;
if (other.type_ != 0) {
setTypeValue(other.getTypeValue());
}
if (other.hasChaincodeId()) {
mergeChaincodeId(other.getChaincodeId());
}
if (other.hasInput()) {
mergeInput(other.getInput());
}
if (other.getTimeout() != 0) {
setTimeout(other.getTimeout());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int type_ = 0;
/**
* .protos.ChaincodeSpec.Type type = 1;
*/
public int getTypeValue() {
return type_;
}
/**
* .protos.ChaincodeSpec.Type type = 1;
*/
public Builder setTypeValue(int value) {
type_ = value;
onChanged();
return this;
}
/**
* .protos.ChaincodeSpec.Type type = 1;
*/
public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.Type getType() {
@SuppressWarnings("deprecation")
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.Type result = org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.Type.valueOf(type_);
return result == null ? org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.Type.UNRECOGNIZED : result;
}
/**
* .protos.ChaincodeSpec.Type type = 1;
*/
public Builder setType(org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.Type value) {
if (value == null) {
throw new NullPointerException();
}
type_ = value.getNumber();
onChanged();
return this;
}
/**
* .protos.ChaincodeSpec.Type type = 1;
*/
public Builder clearType() {
type_ = 0;
onChanged();
return this;
}
private org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID chaincodeId_;
private com.google.protobuf.SingleFieldBuilderV3<
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID, org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID.Builder, org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeIDOrBuilder> chaincodeIdBuilder_;
/**
* .protos.ChaincodeID chaincode_id = 2;
*/
public boolean hasChaincodeId() {
return chaincodeIdBuilder_ != null || chaincodeId_ != null;
}
/**
* .protos.ChaincodeID chaincode_id = 2;
*/
public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID getChaincodeId() {
if (chaincodeIdBuilder_ == null) {
return chaincodeId_ == null ? org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID.getDefaultInstance() : chaincodeId_;
} else {
return chaincodeIdBuilder_.getMessage();
}
}
/**
* .protos.ChaincodeID chaincode_id = 2;
*/
public Builder setChaincodeId(org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID value) {
if (chaincodeIdBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
chaincodeId_ = value;
onChanged();
} else {
chaincodeIdBuilder_.setMessage(value);
}
return this;
}
/**
* .protos.ChaincodeID chaincode_id = 2;
*/
public Builder setChaincodeId(
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID.Builder builderForValue) {
if (chaincodeIdBuilder_ == null) {
chaincodeId_ = builderForValue.build();
onChanged();
} else {
chaincodeIdBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* .protos.ChaincodeID chaincode_id = 2;
*/
public Builder mergeChaincodeId(org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID value) {
if (chaincodeIdBuilder_ == null) {
if (chaincodeId_ != null) {
chaincodeId_ =
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID.newBuilder(chaincodeId_).mergeFrom(value).buildPartial();
} else {
chaincodeId_ = value;
}
onChanged();
} else {
chaincodeIdBuilder_.mergeFrom(value);
}
return this;
}
/**
* .protos.ChaincodeID chaincode_id = 2;
*/
public Builder clearChaincodeId() {
if (chaincodeIdBuilder_ == null) {
chaincodeId_ = null;
onChanged();
} else {
chaincodeId_ = null;
chaincodeIdBuilder_ = null;
}
return this;
}
/**
* .protos.ChaincodeID chaincode_id = 2;
*/
public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID.Builder getChaincodeIdBuilder() {
onChanged();
return getChaincodeIdFieldBuilder().getBuilder();
}
/**
* .protos.ChaincodeID chaincode_id = 2;
*/
public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeIDOrBuilder getChaincodeIdOrBuilder() {
if (chaincodeIdBuilder_ != null) {
return chaincodeIdBuilder_.getMessageOrBuilder();
} else {
return chaincodeId_ == null ?
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID.getDefaultInstance() : chaincodeId_;
}
}
/**
* .protos.ChaincodeID chaincode_id = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID, org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID.Builder, org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeIDOrBuilder>
getChaincodeIdFieldBuilder() {
if (chaincodeIdBuilder_ == null) {
chaincodeIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID, org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID.Builder, org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeIDOrBuilder>(
getChaincodeId(),
getParentForChildren(),
isClean());
chaincodeId_ = null;
}
return chaincodeIdBuilder_;
}
private org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput input_;
private com.google.protobuf.SingleFieldBuilderV3<
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput, org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput.Builder, org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInputOrBuilder> inputBuilder_;
/**
* .protos.ChaincodeInput input = 3;
*/
public boolean hasInput() {
return inputBuilder_ != null || input_ != null;
}
/**
* .protos.ChaincodeInput input = 3;
*/
public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput getInput() {
if (inputBuilder_ == null) {
return input_ == null ? org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput.getDefaultInstance() : input_;
} else {
return inputBuilder_.getMessage();
}
}
/**
* .protos.ChaincodeInput input = 3;
*/
public Builder setInput(org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput value) {
if (inputBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
input_ = value;
onChanged();
} else {
inputBuilder_.setMessage(value);
}
return this;
}
/**
* .protos.ChaincodeInput input = 3;
*/
public Builder setInput(
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput.Builder builderForValue) {
if (inputBuilder_ == null) {
input_ = builderForValue.build();
onChanged();
} else {
inputBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* .protos.ChaincodeInput input = 3;
*/
public Builder mergeInput(org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput value) {
if (inputBuilder_ == null) {
if (input_ != null) {
input_ =
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput.newBuilder(input_).mergeFrom(value).buildPartial();
} else {
input_ = value;
}
onChanged();
} else {
inputBuilder_.mergeFrom(value);
}
return this;
}
/**
* .protos.ChaincodeInput input = 3;
*/
public Builder clearInput() {
if (inputBuilder_ == null) {
input_ = null;
onChanged();
} else {
input_ = null;
inputBuilder_ = null;
}
return this;
}
/**
* .protos.ChaincodeInput input = 3;
*/
public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput.Builder getInputBuilder() {
onChanged();
return getInputFieldBuilder().getBuilder();
}
/**
* .protos.ChaincodeInput input = 3;
*/
public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInputOrBuilder getInputOrBuilder() {
if (inputBuilder_ != null) {
return inputBuilder_.getMessageOrBuilder();
} else {
return input_ == null ?
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput.getDefaultInstance() : input_;
}
}
/**
* .protos.ChaincodeInput input = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput, org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput.Builder, org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInputOrBuilder>
getInputFieldBuilder() {
if (inputBuilder_ == null) {
inputBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput, org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput.Builder, org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInputOrBuilder>(
getInput(),
getParentForChildren(),
isClean());
input_ = null;
}
return inputBuilder_;
}
private int timeout_ ;
/**
* int32 timeout = 4;
*/
public int getTimeout() {
return timeout_;
}
/**
* int32 timeout = 4;
*/
public Builder setTimeout(int value) {
timeout_ = value;
onChanged();
return this;
}
/**
* int32 timeout = 4;
*/
public Builder clearTimeout() {
timeout_ = 0;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:protos.ChaincodeSpec)
}
// @@protoc_insertion_point(class_scope:protos.ChaincodeSpec)
private static final org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec();
}
public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ChaincodeSpec parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ChaincodeSpec(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ChaincodeDeploymentSpecOrBuilder extends
// @@protoc_insertion_point(interface_extends:protos.ChaincodeDeploymentSpec)
com.google.protobuf.MessageOrBuilder {
/**
* .protos.ChaincodeSpec chaincode_spec = 1;
*/
boolean hasChaincodeSpec();
/**
* .protos.ChaincodeSpec chaincode_spec = 1;
*/
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec getChaincodeSpec();
/**
* .protos.ChaincodeSpec chaincode_spec = 1;
*/
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpecOrBuilder getChaincodeSpecOrBuilder();
/**
* bytes code_package = 3;
*/
com.google.protobuf.ByteString getCodePackage();
}
/**
*
* Specify the deployment of a chaincode.
* TODO: Define `codePackage`.
*
*
* Protobuf type {@code protos.ChaincodeDeploymentSpec}
*/
public static final class ChaincodeDeploymentSpec extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:protos.ChaincodeDeploymentSpec)
ChaincodeDeploymentSpecOrBuilder {
private static final long serialVersionUID = 0L;
// Use ChaincodeDeploymentSpec.newBuilder() to construct.
private ChaincodeDeploymentSpec(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ChaincodeDeploymentSpec() {
codePackage_ = com.google.protobuf.ByteString.EMPTY;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new ChaincodeDeploymentSpec();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private ChaincodeDeploymentSpec(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
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: {
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.Builder subBuilder = null;
if (chaincodeSpec_ != null) {
subBuilder = chaincodeSpec_.toBuilder();
}
chaincodeSpec_ = input.readMessage(org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(chaincodeSpec_);
chaincodeSpec_ = subBuilder.buildPartial();
}
break;
}
case 26: {
codePackage_ = input.readBytes();
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.Chaincode.internal_static_protos_ChaincodeDeploymentSpec_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.peer.Chaincode.internal_static_protos_ChaincodeDeploymentSpec_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec.class, org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec.Builder.class);
}
public static final int CHAINCODE_SPEC_FIELD_NUMBER = 1;
private org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec chaincodeSpec_;
/**
* .protos.ChaincodeSpec chaincode_spec = 1;
*/
public boolean hasChaincodeSpec() {
return chaincodeSpec_ != null;
}
/**
* .protos.ChaincodeSpec chaincode_spec = 1;
*/
public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec getChaincodeSpec() {
return chaincodeSpec_ == null ? org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.getDefaultInstance() : chaincodeSpec_;
}
/**
* .protos.ChaincodeSpec chaincode_spec = 1;
*/
public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpecOrBuilder getChaincodeSpecOrBuilder() {
return getChaincodeSpec();
}
public static final int CODE_PACKAGE_FIELD_NUMBER = 3;
private com.google.protobuf.ByteString codePackage_;
/**
* bytes code_package = 3;
*/
public com.google.protobuf.ByteString getCodePackage() {
return codePackage_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (chaincodeSpec_ != null) {
output.writeMessage(1, getChaincodeSpec());
}
if (!codePackage_.isEmpty()) {
output.writeBytes(3, codePackage_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (chaincodeSpec_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getChaincodeSpec());
}
if (!codePackage_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(3, codePackage_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec other = (org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec) obj;
if (hasChaincodeSpec() != other.hasChaincodeSpec()) return false;
if (hasChaincodeSpec()) {
if (!getChaincodeSpec()
.equals(other.getChaincodeSpec())) return false;
}
if (!getCodePackage()
.equals(other.getCodePackage())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasChaincodeSpec()) {
hash = (37 * hash) + CHAINCODE_SPEC_FIELD_NUMBER;
hash = (53 * hash) + getChaincodeSpec().hashCode();
}
hash = (37 * hash) + CODE_PACKAGE_FIELD_NUMBER;
hash = (53 * hash) + getCodePackage().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec 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.peer.Chaincode.ChaincodeDeploymentSpec parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec 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.peer.Chaincode.ChaincodeDeploymentSpec parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec 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.peer.Chaincode.ChaincodeDeploymentSpec parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec 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;
}
/**
*
* Specify the deployment of a chaincode.
* TODO: Define `codePackage`.
*
*
* Protobuf type {@code protos.ChaincodeDeploymentSpec}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:protos.ChaincodeDeploymentSpec)
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpecOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.Chaincode.internal_static_protos_ChaincodeDeploymentSpec_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.peer.Chaincode.internal_static_protos_ChaincodeDeploymentSpec_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec.class, org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec.Builder.class);
}
// Construct using org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (chaincodeSpecBuilder_ == null) {
chaincodeSpec_ = null;
} else {
chaincodeSpec_ = null;
chaincodeSpecBuilder_ = null;
}
codePackage_ = com.google.protobuf.ByteString.EMPTY;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.peer.Chaincode.internal_static_protos_ChaincodeDeploymentSpec_descriptor;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec.getDefaultInstance();
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec build() {
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec buildPartial() {
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec result = new org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec(this);
if (chaincodeSpecBuilder_ == null) {
result.chaincodeSpec_ = chaincodeSpec_;
} else {
result.chaincodeSpec_ = chaincodeSpecBuilder_.build();
}
result.codePackage_ = codePackage_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec) {
return mergeFrom((org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec other) {
if (other == org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec.getDefaultInstance()) return this;
if (other.hasChaincodeSpec()) {
mergeChaincodeSpec(other.getChaincodeSpec());
}
if (other.getCodePackage() != com.google.protobuf.ByteString.EMPTY) {
setCodePackage(other.getCodePackage());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec chaincodeSpec_;
private com.google.protobuf.SingleFieldBuilderV3<
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec, org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.Builder, org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpecOrBuilder> chaincodeSpecBuilder_;
/**
* .protos.ChaincodeSpec chaincode_spec = 1;
*/
public boolean hasChaincodeSpec() {
return chaincodeSpecBuilder_ != null || chaincodeSpec_ != null;
}
/**
* .protos.ChaincodeSpec chaincode_spec = 1;
*/
public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec getChaincodeSpec() {
if (chaincodeSpecBuilder_ == null) {
return chaincodeSpec_ == null ? org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.getDefaultInstance() : chaincodeSpec_;
} else {
return chaincodeSpecBuilder_.getMessage();
}
}
/**
* .protos.ChaincodeSpec chaincode_spec = 1;
*/
public Builder setChaincodeSpec(org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec value) {
if (chaincodeSpecBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
chaincodeSpec_ = value;
onChanged();
} else {
chaincodeSpecBuilder_.setMessage(value);
}
return this;
}
/**
* .protos.ChaincodeSpec chaincode_spec = 1;
*/
public Builder setChaincodeSpec(
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.Builder builderForValue) {
if (chaincodeSpecBuilder_ == null) {
chaincodeSpec_ = builderForValue.build();
onChanged();
} else {
chaincodeSpecBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* .protos.ChaincodeSpec chaincode_spec = 1;
*/
public Builder mergeChaincodeSpec(org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec value) {
if (chaincodeSpecBuilder_ == null) {
if (chaincodeSpec_ != null) {
chaincodeSpec_ =
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.newBuilder(chaincodeSpec_).mergeFrom(value).buildPartial();
} else {
chaincodeSpec_ = value;
}
onChanged();
} else {
chaincodeSpecBuilder_.mergeFrom(value);
}
return this;
}
/**
* .protos.ChaincodeSpec chaincode_spec = 1;
*/
public Builder clearChaincodeSpec() {
if (chaincodeSpecBuilder_ == null) {
chaincodeSpec_ = null;
onChanged();
} else {
chaincodeSpec_ = null;
chaincodeSpecBuilder_ = null;
}
return this;
}
/**
* .protos.ChaincodeSpec chaincode_spec = 1;
*/
public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.Builder getChaincodeSpecBuilder() {
onChanged();
return getChaincodeSpecFieldBuilder().getBuilder();
}
/**
* .protos.ChaincodeSpec chaincode_spec = 1;
*/
public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpecOrBuilder getChaincodeSpecOrBuilder() {
if (chaincodeSpecBuilder_ != null) {
return chaincodeSpecBuilder_.getMessageOrBuilder();
} else {
return chaincodeSpec_ == null ?
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.getDefaultInstance() : chaincodeSpec_;
}
}
/**
* .protos.ChaincodeSpec chaincode_spec = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec, org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.Builder, org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpecOrBuilder>
getChaincodeSpecFieldBuilder() {
if (chaincodeSpecBuilder_ == null) {
chaincodeSpecBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec, org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.Builder, org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpecOrBuilder>(
getChaincodeSpec(),
getParentForChildren(),
isClean());
chaincodeSpec_ = null;
}
return chaincodeSpecBuilder_;
}
private com.google.protobuf.ByteString codePackage_ = com.google.protobuf.ByteString.EMPTY;
/**
* bytes code_package = 3;
*/
public com.google.protobuf.ByteString getCodePackage() {
return codePackage_;
}
/**
* bytes code_package = 3;
*/
public Builder setCodePackage(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
codePackage_ = value;
onChanged();
return this;
}
/**
* bytes code_package = 3;
*/
public Builder clearCodePackage() {
codePackage_ = getDefaultInstance().getCodePackage();
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:protos.ChaincodeDeploymentSpec)
}
// @@protoc_insertion_point(class_scope:protos.ChaincodeDeploymentSpec)
private static final org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec();
}
public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ChaincodeDeploymentSpec parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ChaincodeDeploymentSpec(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ChaincodeInvocationSpecOrBuilder extends
// @@protoc_insertion_point(interface_extends:protos.ChaincodeInvocationSpec)
com.google.protobuf.MessageOrBuilder {
/**
* .protos.ChaincodeSpec chaincode_spec = 1;
*/
boolean hasChaincodeSpec();
/**
* .protos.ChaincodeSpec chaincode_spec = 1;
*/
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec getChaincodeSpec();
/**
* .protos.ChaincodeSpec chaincode_spec = 1;
*/
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpecOrBuilder getChaincodeSpecOrBuilder();
}
/**
*
* Carries the chaincode function and its arguments.
*
*
* Protobuf type {@code protos.ChaincodeInvocationSpec}
*/
public static final class ChaincodeInvocationSpec extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:protos.ChaincodeInvocationSpec)
ChaincodeInvocationSpecOrBuilder {
private static final long serialVersionUID = 0L;
// Use ChaincodeInvocationSpec.newBuilder() to construct.
private ChaincodeInvocationSpec(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ChaincodeInvocationSpec() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new ChaincodeInvocationSpec();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private ChaincodeInvocationSpec(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
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: {
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.Builder subBuilder = null;
if (chaincodeSpec_ != null) {
subBuilder = chaincodeSpec_.toBuilder();
}
chaincodeSpec_ = input.readMessage(org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(chaincodeSpec_);
chaincodeSpec_ = subBuilder.buildPartial();
}
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.Chaincode.internal_static_protos_ChaincodeInvocationSpec_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.peer.Chaincode.internal_static_protos_ChaincodeInvocationSpec_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInvocationSpec.class, org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInvocationSpec.Builder.class);
}
public static final int CHAINCODE_SPEC_FIELD_NUMBER = 1;
private org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec chaincodeSpec_;
/**
* .protos.ChaincodeSpec chaincode_spec = 1;
*/
public boolean hasChaincodeSpec() {
return chaincodeSpec_ != null;
}
/**
* .protos.ChaincodeSpec chaincode_spec = 1;
*/
public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec getChaincodeSpec() {
return chaincodeSpec_ == null ? org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.getDefaultInstance() : chaincodeSpec_;
}
/**
* .protos.ChaincodeSpec chaincode_spec = 1;
*/
public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpecOrBuilder getChaincodeSpecOrBuilder() {
return getChaincodeSpec();
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (chaincodeSpec_ != null) {
output.writeMessage(1, getChaincodeSpec());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (chaincodeSpec_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getChaincodeSpec());
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInvocationSpec)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInvocationSpec other = (org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInvocationSpec) obj;
if (hasChaincodeSpec() != other.hasChaincodeSpec()) return false;
if (hasChaincodeSpec()) {
if (!getChaincodeSpec()
.equals(other.getChaincodeSpec())) return false;
}
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasChaincodeSpec()) {
hash = (37 * hash) + CHAINCODE_SPEC_FIELD_NUMBER;
hash = (53 * hash) + getChaincodeSpec().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInvocationSpec parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInvocationSpec parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInvocationSpec parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInvocationSpec 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.peer.Chaincode.ChaincodeInvocationSpec parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInvocationSpec parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInvocationSpec parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInvocationSpec 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.peer.Chaincode.ChaincodeInvocationSpec parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInvocationSpec 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.peer.Chaincode.ChaincodeInvocationSpec parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInvocationSpec parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInvocationSpec 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;
}
/**
*
* Carries the chaincode function and its arguments.
*
*
* Protobuf type {@code protos.ChaincodeInvocationSpec}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:protos.ChaincodeInvocationSpec)
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInvocationSpecOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.Chaincode.internal_static_protos_ChaincodeInvocationSpec_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.peer.Chaincode.internal_static_protos_ChaincodeInvocationSpec_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInvocationSpec.class, org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInvocationSpec.Builder.class);
}
// Construct using org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInvocationSpec.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (chaincodeSpecBuilder_ == null) {
chaincodeSpec_ = null;
} else {
chaincodeSpec_ = null;
chaincodeSpecBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.peer.Chaincode.internal_static_protos_ChaincodeInvocationSpec_descriptor;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInvocationSpec getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInvocationSpec.getDefaultInstance();
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInvocationSpec build() {
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInvocationSpec result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInvocationSpec buildPartial() {
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInvocationSpec result = new org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInvocationSpec(this);
if (chaincodeSpecBuilder_ == null) {
result.chaincodeSpec_ = chaincodeSpec_;
} else {
result.chaincodeSpec_ = chaincodeSpecBuilder_.build();
}
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInvocationSpec) {
return mergeFrom((org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInvocationSpec)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInvocationSpec other) {
if (other == org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInvocationSpec.getDefaultInstance()) return this;
if (other.hasChaincodeSpec()) {
mergeChaincodeSpec(other.getChaincodeSpec());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInvocationSpec parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInvocationSpec) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec chaincodeSpec_;
private com.google.protobuf.SingleFieldBuilderV3<
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec, org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.Builder, org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpecOrBuilder> chaincodeSpecBuilder_;
/**
* .protos.ChaincodeSpec chaincode_spec = 1;
*/
public boolean hasChaincodeSpec() {
return chaincodeSpecBuilder_ != null || chaincodeSpec_ != null;
}
/**
* .protos.ChaincodeSpec chaincode_spec = 1;
*/
public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec getChaincodeSpec() {
if (chaincodeSpecBuilder_ == null) {
return chaincodeSpec_ == null ? org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.getDefaultInstance() : chaincodeSpec_;
} else {
return chaincodeSpecBuilder_.getMessage();
}
}
/**
* .protos.ChaincodeSpec chaincode_spec = 1;
*/
public Builder setChaincodeSpec(org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec value) {
if (chaincodeSpecBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
chaincodeSpec_ = value;
onChanged();
} else {
chaincodeSpecBuilder_.setMessage(value);
}
return this;
}
/**
* .protos.ChaincodeSpec chaincode_spec = 1;
*/
public Builder setChaincodeSpec(
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.Builder builderForValue) {
if (chaincodeSpecBuilder_ == null) {
chaincodeSpec_ = builderForValue.build();
onChanged();
} else {
chaincodeSpecBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* .protos.ChaincodeSpec chaincode_spec = 1;
*/
public Builder mergeChaincodeSpec(org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec value) {
if (chaincodeSpecBuilder_ == null) {
if (chaincodeSpec_ != null) {
chaincodeSpec_ =
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.newBuilder(chaincodeSpec_).mergeFrom(value).buildPartial();
} else {
chaincodeSpec_ = value;
}
onChanged();
} else {
chaincodeSpecBuilder_.mergeFrom(value);
}
return this;
}
/**
* .protos.ChaincodeSpec chaincode_spec = 1;
*/
public Builder clearChaincodeSpec() {
if (chaincodeSpecBuilder_ == null) {
chaincodeSpec_ = null;
onChanged();
} else {
chaincodeSpec_ = null;
chaincodeSpecBuilder_ = null;
}
return this;
}
/**
* .protos.ChaincodeSpec chaincode_spec = 1;
*/
public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.Builder getChaincodeSpecBuilder() {
onChanged();
return getChaincodeSpecFieldBuilder().getBuilder();
}
/**
* .protos.ChaincodeSpec chaincode_spec = 1;
*/
public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpecOrBuilder getChaincodeSpecOrBuilder() {
if (chaincodeSpecBuilder_ != null) {
return chaincodeSpecBuilder_.getMessageOrBuilder();
} else {
return chaincodeSpec_ == null ?
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.getDefaultInstance() : chaincodeSpec_;
}
}
/**
* .protos.ChaincodeSpec chaincode_spec = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec, org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.Builder, org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpecOrBuilder>
getChaincodeSpecFieldBuilder() {
if (chaincodeSpecBuilder_ == null) {
chaincodeSpecBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec, org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.Builder, org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpecOrBuilder>(
getChaincodeSpec(),
getParentForChildren(),
isClean());
chaincodeSpec_ = null;
}
return chaincodeSpecBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:protos.ChaincodeInvocationSpec)
}
// @@protoc_insertion_point(class_scope:protos.ChaincodeInvocationSpec)
private static final org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInvocationSpec DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInvocationSpec();
}
public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInvocationSpec getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ChaincodeInvocationSpec parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ChaincodeInvocationSpec(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInvocationSpec getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface LifecycleEventOrBuilder extends
// @@protoc_insertion_point(interface_extends:protos.LifecycleEvent)
com.google.protobuf.MessageOrBuilder {
/**
* string chaincode_name = 1;
*/
java.lang.String getChaincodeName();
/**
* string chaincode_name = 1;
*/
com.google.protobuf.ByteString
getChaincodeNameBytes();
}
/**
*
* LifecycleEvent is used as the payload of the chaincode event emitted by LSCC
*
*
* Protobuf type {@code protos.LifecycleEvent}
*/
public static final class LifecycleEvent extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:protos.LifecycleEvent)
LifecycleEventOrBuilder {
private static final long serialVersionUID = 0L;
// Use LifecycleEvent.newBuilder() to construct.
private LifecycleEvent(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private LifecycleEvent() {
chaincodeName_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new LifecycleEvent();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private LifecycleEvent(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
chaincodeName_ = s;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.Chaincode.internal_static_protos_LifecycleEvent_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.peer.Chaincode.internal_static_protos_LifecycleEvent_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.peer.Chaincode.LifecycleEvent.class, org.hyperledger.fabric.protos.peer.Chaincode.LifecycleEvent.Builder.class);
}
public static final int CHAINCODE_NAME_FIELD_NUMBER = 1;
private volatile java.lang.Object chaincodeName_;
/**
* string chaincode_name = 1;
*/
public java.lang.String getChaincodeName() {
java.lang.Object ref = chaincodeName_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
chaincodeName_ = s;
return s;
}
}
/**
* string chaincode_name = 1;
*/
public com.google.protobuf.ByteString
getChaincodeNameBytes() {
java.lang.Object ref = chaincodeName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
chaincodeName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getChaincodeNameBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, chaincodeName_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getChaincodeNameBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, chaincodeName_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.hyperledger.fabric.protos.peer.Chaincode.LifecycleEvent)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.peer.Chaincode.LifecycleEvent other = (org.hyperledger.fabric.protos.peer.Chaincode.LifecycleEvent) obj;
if (!getChaincodeName()
.equals(other.getChaincodeName())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + CHAINCODE_NAME_FIELD_NUMBER;
hash = (53 * hash) + getChaincodeName().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.peer.Chaincode.LifecycleEvent parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.Chaincode.LifecycleEvent parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.peer.Chaincode.LifecycleEvent parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.Chaincode.LifecycleEvent 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.peer.Chaincode.LifecycleEvent parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.Chaincode.LifecycleEvent parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.peer.Chaincode.LifecycleEvent parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.peer.Chaincode.LifecycleEvent 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.peer.Chaincode.LifecycleEvent parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.peer.Chaincode.LifecycleEvent 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.peer.Chaincode.LifecycleEvent parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.peer.Chaincode.LifecycleEvent parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.hyperledger.fabric.protos.peer.Chaincode.LifecycleEvent 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;
}
/**
*
* LifecycleEvent is used as the payload of the chaincode event emitted by LSCC
*
*
* Protobuf type {@code protos.LifecycleEvent}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:protos.LifecycleEvent)
org.hyperledger.fabric.protos.peer.Chaincode.LifecycleEventOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.Chaincode.internal_static_protos_LifecycleEvent_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.peer.Chaincode.internal_static_protos_LifecycleEvent_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.peer.Chaincode.LifecycleEvent.class, org.hyperledger.fabric.protos.peer.Chaincode.LifecycleEvent.Builder.class);
}
// Construct using org.hyperledger.fabric.protos.peer.Chaincode.LifecycleEvent.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();
chaincodeName_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.peer.Chaincode.internal_static_protos_LifecycleEvent_descriptor;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.Chaincode.LifecycleEvent getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.peer.Chaincode.LifecycleEvent.getDefaultInstance();
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.Chaincode.LifecycleEvent build() {
org.hyperledger.fabric.protos.peer.Chaincode.LifecycleEvent result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.Chaincode.LifecycleEvent buildPartial() {
org.hyperledger.fabric.protos.peer.Chaincode.LifecycleEvent result = new org.hyperledger.fabric.protos.peer.Chaincode.LifecycleEvent(this);
result.chaincodeName_ = chaincodeName_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.fabric.protos.peer.Chaincode.LifecycleEvent) {
return mergeFrom((org.hyperledger.fabric.protos.peer.Chaincode.LifecycleEvent)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.fabric.protos.peer.Chaincode.LifecycleEvent other) {
if (other == org.hyperledger.fabric.protos.peer.Chaincode.LifecycleEvent.getDefaultInstance()) return this;
if (!other.getChaincodeName().isEmpty()) {
chaincodeName_ = other.chaincodeName_;
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 {
org.hyperledger.fabric.protos.peer.Chaincode.LifecycleEvent parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.hyperledger.fabric.protos.peer.Chaincode.LifecycleEvent) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object chaincodeName_ = "";
/**
* string chaincode_name = 1;
*/
public java.lang.String getChaincodeName() {
java.lang.Object ref = chaincodeName_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
chaincodeName_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string chaincode_name = 1;
*/
public com.google.protobuf.ByteString
getChaincodeNameBytes() {
java.lang.Object ref = chaincodeName_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
chaincodeName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string chaincode_name = 1;
*/
public Builder setChaincodeName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
chaincodeName_ = value;
onChanged();
return this;
}
/**
* string chaincode_name = 1;
*/
public Builder clearChaincodeName() {
chaincodeName_ = getDefaultInstance().getChaincodeName();
onChanged();
return this;
}
/**
* string chaincode_name = 1;
*/
public Builder setChaincodeNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
chaincodeName_ = value;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:protos.LifecycleEvent)
}
// @@protoc_insertion_point(class_scope:protos.LifecycleEvent)
private static final org.hyperledger.fabric.protos.peer.Chaincode.LifecycleEvent DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.peer.Chaincode.LifecycleEvent();
}
public static org.hyperledger.fabric.protos.peer.Chaincode.LifecycleEvent getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public LifecycleEvent parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new LifecycleEvent(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.Chaincode.LifecycleEvent getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface CDSDataOrBuilder extends
// @@protoc_insertion_point(interface_extends:protos.CDSData)
com.google.protobuf.MessageOrBuilder {
/**
*
* hash of ChaincodeDeploymentSpec.code_package
*
*
* bytes hash = 1;
*/
com.google.protobuf.ByteString getHash();
/**
*
* hash of ChaincodeID.name + ChaincodeID.version
*
*
* bytes metadatahash = 2;
*/
com.google.protobuf.ByteString getMetadatahash();
}
/**
*
* CDSData is data stored in the LSCC on instantiation of a CC
* for CDSPackage. This needs to be serialized for ChaincodeData
* hence the protobuf format
*
*
* Protobuf type {@code protos.CDSData}
*/
public static final class CDSData extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:protos.CDSData)
CDSDataOrBuilder {
private static final long serialVersionUID = 0L;
// Use CDSData.newBuilder() to construct.
private CDSData(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private CDSData() {
hash_ = com.google.protobuf.ByteString.EMPTY;
metadatahash_ = com.google.protobuf.ByteString.EMPTY;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new CDSData();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private CDSData(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
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: {
hash_ = input.readBytes();
break;
}
case 18: {
metadatahash_ = input.readBytes();
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.Chaincode.internal_static_protos_CDSData_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.peer.Chaincode.internal_static_protos_CDSData_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.peer.Chaincode.CDSData.class, org.hyperledger.fabric.protos.peer.Chaincode.CDSData.Builder.class);
}
public static final int HASH_FIELD_NUMBER = 1;
private com.google.protobuf.ByteString hash_;
/**
*
* hash of ChaincodeDeploymentSpec.code_package
*
*
* bytes hash = 1;
*/
public com.google.protobuf.ByteString getHash() {
return hash_;
}
public static final int METADATAHASH_FIELD_NUMBER = 2;
private com.google.protobuf.ByteString metadatahash_;
/**
*
* hash of ChaincodeID.name + ChaincodeID.version
*
*
* bytes metadatahash = 2;
*/
public com.google.protobuf.ByteString getMetadatahash() {
return metadatahash_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!hash_.isEmpty()) {
output.writeBytes(1, hash_);
}
if (!metadatahash_.isEmpty()) {
output.writeBytes(2, metadatahash_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!hash_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(1, hash_);
}
if (!metadatahash_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(2, metadatahash_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.hyperledger.fabric.protos.peer.Chaincode.CDSData)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.peer.Chaincode.CDSData other = (org.hyperledger.fabric.protos.peer.Chaincode.CDSData) obj;
if (!getHash()
.equals(other.getHash())) return false;
if (!getMetadatahash()
.equals(other.getMetadatahash())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + HASH_FIELD_NUMBER;
hash = (53 * hash) + getHash().hashCode();
hash = (37 * hash) + METADATAHASH_FIELD_NUMBER;
hash = (53 * hash) + getMetadatahash().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.peer.Chaincode.CDSData parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.Chaincode.CDSData parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.peer.Chaincode.CDSData parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.Chaincode.CDSData 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.peer.Chaincode.CDSData parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.Chaincode.CDSData parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.peer.Chaincode.CDSData parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.peer.Chaincode.CDSData 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.peer.Chaincode.CDSData parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.peer.Chaincode.CDSData 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.peer.Chaincode.CDSData parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.peer.Chaincode.CDSData parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.hyperledger.fabric.protos.peer.Chaincode.CDSData 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;
}
/**
*
* CDSData is data stored in the LSCC on instantiation of a CC
* for CDSPackage. This needs to be serialized for ChaincodeData
* hence the protobuf format
*
*
* Protobuf type {@code protos.CDSData}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:protos.CDSData)
org.hyperledger.fabric.protos.peer.Chaincode.CDSDataOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.Chaincode.internal_static_protos_CDSData_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.peer.Chaincode.internal_static_protos_CDSData_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.peer.Chaincode.CDSData.class, org.hyperledger.fabric.protos.peer.Chaincode.CDSData.Builder.class);
}
// Construct using org.hyperledger.fabric.protos.peer.Chaincode.CDSData.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();
hash_ = com.google.protobuf.ByteString.EMPTY;
metadatahash_ = com.google.protobuf.ByteString.EMPTY;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.peer.Chaincode.internal_static_protos_CDSData_descriptor;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.Chaincode.CDSData getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.peer.Chaincode.CDSData.getDefaultInstance();
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.Chaincode.CDSData build() {
org.hyperledger.fabric.protos.peer.Chaincode.CDSData result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.Chaincode.CDSData buildPartial() {
org.hyperledger.fabric.protos.peer.Chaincode.CDSData result = new org.hyperledger.fabric.protos.peer.Chaincode.CDSData(this);
result.hash_ = hash_;
result.metadatahash_ = metadatahash_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.fabric.protos.peer.Chaincode.CDSData) {
return mergeFrom((org.hyperledger.fabric.protos.peer.Chaincode.CDSData)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.fabric.protos.peer.Chaincode.CDSData other) {
if (other == org.hyperledger.fabric.protos.peer.Chaincode.CDSData.getDefaultInstance()) return this;
if (other.getHash() != com.google.protobuf.ByteString.EMPTY) {
setHash(other.getHash());
}
if (other.getMetadatahash() != com.google.protobuf.ByteString.EMPTY) {
setMetadatahash(other.getMetadatahash());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.hyperledger.fabric.protos.peer.Chaincode.CDSData parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.hyperledger.fabric.protos.peer.Chaincode.CDSData) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private com.google.protobuf.ByteString hash_ = com.google.protobuf.ByteString.EMPTY;
/**
*
* hash of ChaincodeDeploymentSpec.code_package
*
*
* bytes hash = 1;
*/
public com.google.protobuf.ByteString getHash() {
return hash_;
}
/**
*
* hash of ChaincodeDeploymentSpec.code_package
*
*
* bytes hash = 1;
*/
public Builder setHash(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
hash_ = value;
onChanged();
return this;
}
/**
*
* hash of ChaincodeDeploymentSpec.code_package
*
*
* bytes hash = 1;
*/
public Builder clearHash() {
hash_ = getDefaultInstance().getHash();
onChanged();
return this;
}
private com.google.protobuf.ByteString metadatahash_ = com.google.protobuf.ByteString.EMPTY;
/**
*
* hash of ChaincodeID.name + ChaincodeID.version
*
*
* bytes metadatahash = 2;
*/
public com.google.protobuf.ByteString getMetadatahash() {
return metadatahash_;
}
/**
*
* hash of ChaincodeID.name + ChaincodeID.version
*
*
* bytes metadatahash = 2;
*/
public Builder setMetadatahash(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
metadatahash_ = value;
onChanged();
return this;
}
/**
*
* hash of ChaincodeID.name + ChaincodeID.version
*
*
* bytes metadatahash = 2;
*/
public Builder clearMetadatahash() {
metadatahash_ = getDefaultInstance().getMetadatahash();
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:protos.CDSData)
}
// @@protoc_insertion_point(class_scope:protos.CDSData)
private static final org.hyperledger.fabric.protos.peer.Chaincode.CDSData DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.peer.Chaincode.CDSData();
}
public static org.hyperledger.fabric.protos.peer.Chaincode.CDSData getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public CDSData parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new CDSData(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.Chaincode.CDSData getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ChaincodeDataOrBuilder extends
// @@protoc_insertion_point(interface_extends:protos.ChaincodeData)
com.google.protobuf.MessageOrBuilder {
/**
*
* Name of the chaincode
*
*
* string name = 1;
*/
java.lang.String getName();
/**
*
* Name of the chaincode
*
*
* string name = 1;
*/
com.google.protobuf.ByteString
getNameBytes();
/**
*
* Version of the chaincode
*
*
* string version = 2;
*/
java.lang.String getVersion();
/**
*
* Version of the chaincode
*
*
* string version = 2;
*/
com.google.protobuf.ByteString
getVersionBytes();
/**
*
* Escc for the chaincode instance
*
*
* string escc = 3;
*/
java.lang.String getEscc();
/**
*
* Escc for the chaincode instance
*
*
* string escc = 3;
*/
com.google.protobuf.ByteString
getEsccBytes();
/**
*
* Vscc for the chaincode instance
*
*
* string vscc = 4;
*/
java.lang.String getVscc();
/**
*
* Vscc for the chaincode instance
*
*
* string vscc = 4;
*/
com.google.protobuf.ByteString
getVsccBytes();
/**
*
* Policy endorsement policy for the chaincode instance
*
*
* .common.SignaturePolicyEnvelope policy = 5;
*/
boolean hasPolicy();
/**
*
* Policy endorsement policy for the chaincode instance
*
*
* .common.SignaturePolicyEnvelope policy = 5;
*/
org.hyperledger.fabric.protos.common.Policies.SignaturePolicyEnvelope getPolicy();
/**
*
* Policy endorsement policy for the chaincode instance
*
*
* .common.SignaturePolicyEnvelope policy = 5;
*/
org.hyperledger.fabric.protos.common.Policies.SignaturePolicyEnvelopeOrBuilder getPolicyOrBuilder();
/**
*
* Data data specific to the package
*
*
* bytes data = 6;
*/
com.google.protobuf.ByteString getData();
/**
*
* Id of the chaincode that's the unique fingerprint for the CC This is not
* currently used anywhere but serves as a good eyecatcher
*
*
* bytes id = 7;
*/
com.google.protobuf.ByteString getId();
/**
*
* InstantiationPolicy for the chaincode
*
*
* .common.SignaturePolicyEnvelope instantiation_policy = 8;
*/
boolean hasInstantiationPolicy();
/**
*
* InstantiationPolicy for the chaincode
*
*
* .common.SignaturePolicyEnvelope instantiation_policy = 8;
*/
org.hyperledger.fabric.protos.common.Policies.SignaturePolicyEnvelope getInstantiationPolicy();
/**
*
* InstantiationPolicy for the chaincode
*
*
* .common.SignaturePolicyEnvelope instantiation_policy = 8;
*/
org.hyperledger.fabric.protos.common.Policies.SignaturePolicyEnvelopeOrBuilder getInstantiationPolicyOrBuilder();
}
/**
*
* ChaincodeData defines the datastructure for chaincodes to be serialized by proto
* Type provides an additional check by directing to use a specific package after instantiation
* Data is Type specific (see CDSPackage and SignedCDSPackage)
*
*
* Protobuf type {@code protos.ChaincodeData}
*/
public static final class ChaincodeData extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:protos.ChaincodeData)
ChaincodeDataOrBuilder {
private static final long serialVersionUID = 0L;
// Use ChaincodeData.newBuilder() to construct.
private ChaincodeData(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ChaincodeData() {
name_ = "";
version_ = "";
escc_ = "";
vscc_ = "";
data_ = com.google.protobuf.ByteString.EMPTY;
id_ = com.google.protobuf.ByteString.EMPTY;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new ChaincodeData();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private ChaincodeData(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
name_ = s;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
version_ = s;
break;
}
case 26: {
java.lang.String s = input.readStringRequireUtf8();
escc_ = s;
break;
}
case 34: {
java.lang.String s = input.readStringRequireUtf8();
vscc_ = s;
break;
}
case 42: {
org.hyperledger.fabric.protos.common.Policies.SignaturePolicyEnvelope.Builder subBuilder = null;
if (policy_ != null) {
subBuilder = policy_.toBuilder();
}
policy_ = input.readMessage(org.hyperledger.fabric.protos.common.Policies.SignaturePolicyEnvelope.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(policy_);
policy_ = subBuilder.buildPartial();
}
break;
}
case 50: {
data_ = input.readBytes();
break;
}
case 58: {
id_ = input.readBytes();
break;
}
case 66: {
org.hyperledger.fabric.protos.common.Policies.SignaturePolicyEnvelope.Builder subBuilder = null;
if (instantiationPolicy_ != null) {
subBuilder = instantiationPolicy_.toBuilder();
}
instantiationPolicy_ = input.readMessage(org.hyperledger.fabric.protos.common.Policies.SignaturePolicyEnvelope.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(instantiationPolicy_);
instantiationPolicy_ = subBuilder.buildPartial();
}
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.Chaincode.internal_static_protos_ChaincodeData_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.peer.Chaincode.internal_static_protos_ChaincodeData_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeData.class, org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeData.Builder.class);
}
public static final int NAME_FIELD_NUMBER = 1;
private volatile java.lang.Object name_;
/**
*
* Name of the chaincode
*
*
* string name = 1;
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
}
}
/**
*
* Name of the chaincode
*
*
* string name = 1;
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int VERSION_FIELD_NUMBER = 2;
private volatile java.lang.Object version_;
/**
*
* Version of the chaincode
*
*
* string version = 2;
*/
public java.lang.String getVersion() {
java.lang.Object ref = version_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
version_ = s;
return s;
}
}
/**
*
* Version of the chaincode
*
*
* string version = 2;
*/
public com.google.protobuf.ByteString
getVersionBytes() {
java.lang.Object ref = version_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
version_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ESCC_FIELD_NUMBER = 3;
private volatile java.lang.Object escc_;
/**
*
* Escc for the chaincode instance
*
*
* string escc = 3;
*/
public java.lang.String getEscc() {
java.lang.Object ref = escc_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
escc_ = s;
return s;
}
}
/**
*
* Escc for the chaincode instance
*
*
* string escc = 3;
*/
public com.google.protobuf.ByteString
getEsccBytes() {
java.lang.Object ref = escc_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
escc_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int VSCC_FIELD_NUMBER = 4;
private volatile java.lang.Object vscc_;
/**
*
* Vscc for the chaincode instance
*
*
* string vscc = 4;
*/
public java.lang.String getVscc() {
java.lang.Object ref = vscc_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
vscc_ = s;
return s;
}
}
/**
*
* Vscc for the chaincode instance
*
*
* string vscc = 4;
*/
public com.google.protobuf.ByteString
getVsccBytes() {
java.lang.Object ref = vscc_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
vscc_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int POLICY_FIELD_NUMBER = 5;
private org.hyperledger.fabric.protos.common.Policies.SignaturePolicyEnvelope policy_;
/**
*
* Policy endorsement policy for the chaincode instance
*
*
* .common.SignaturePolicyEnvelope policy = 5;
*/
public boolean hasPolicy() {
return policy_ != null;
}
/**
*
* Policy endorsement policy for the chaincode instance
*
*
* .common.SignaturePolicyEnvelope policy = 5;
*/
public org.hyperledger.fabric.protos.common.Policies.SignaturePolicyEnvelope getPolicy() {
return policy_ == null ? org.hyperledger.fabric.protos.common.Policies.SignaturePolicyEnvelope.getDefaultInstance() : policy_;
}
/**
*
* Policy endorsement policy for the chaincode instance
*
*
* .common.SignaturePolicyEnvelope policy = 5;
*/
public org.hyperledger.fabric.protos.common.Policies.SignaturePolicyEnvelopeOrBuilder getPolicyOrBuilder() {
return getPolicy();
}
public static final int DATA_FIELD_NUMBER = 6;
private com.google.protobuf.ByteString data_;
/**
*
* Data data specific to the package
*
*
* bytes data = 6;
*/
public com.google.protobuf.ByteString getData() {
return data_;
}
public static final int ID_FIELD_NUMBER = 7;
private com.google.protobuf.ByteString id_;
/**
*
* Id of the chaincode that's the unique fingerprint for the CC This is not
* currently used anywhere but serves as a good eyecatcher
*
*
* bytes id = 7;
*/
public com.google.protobuf.ByteString getId() {
return id_;
}
public static final int INSTANTIATION_POLICY_FIELD_NUMBER = 8;
private org.hyperledger.fabric.protos.common.Policies.SignaturePolicyEnvelope instantiationPolicy_;
/**
*
* InstantiationPolicy for the chaincode
*
*
* .common.SignaturePolicyEnvelope instantiation_policy = 8;
*/
public boolean hasInstantiationPolicy() {
return instantiationPolicy_ != null;
}
/**
*
* InstantiationPolicy for the chaincode
*
*
* .common.SignaturePolicyEnvelope instantiation_policy = 8;
*/
public org.hyperledger.fabric.protos.common.Policies.SignaturePolicyEnvelope getInstantiationPolicy() {
return instantiationPolicy_ == null ? org.hyperledger.fabric.protos.common.Policies.SignaturePolicyEnvelope.getDefaultInstance() : instantiationPolicy_;
}
/**
*
* InstantiationPolicy for the chaincode
*
*
* .common.SignaturePolicyEnvelope instantiation_policy = 8;
*/
public org.hyperledger.fabric.protos.common.Policies.SignaturePolicyEnvelopeOrBuilder getInstantiationPolicyOrBuilder() {
return getInstantiationPolicy();
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getNameBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
if (!getVersionBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, version_);
}
if (!getEsccBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, escc_);
}
if (!getVsccBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, vscc_);
}
if (policy_ != null) {
output.writeMessage(5, getPolicy());
}
if (!data_.isEmpty()) {
output.writeBytes(6, data_);
}
if (!id_.isEmpty()) {
output.writeBytes(7, id_);
}
if (instantiationPolicy_ != null) {
output.writeMessage(8, getInstantiationPolicy());
}
unknownFields.writeTo(output);
}
@java.lang.Override
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 (!getVersionBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, version_);
}
if (!getEsccBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, escc_);
}
if (!getVsccBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, vscc_);
}
if (policy_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, getPolicy());
}
if (!data_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(6, data_);
}
if (!id_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(7, id_);
}
if (instantiationPolicy_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(8, getInstantiationPolicy());
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeData)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeData other = (org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeData) obj;
if (!getName()
.equals(other.getName())) return false;
if (!getVersion()
.equals(other.getVersion())) return false;
if (!getEscc()
.equals(other.getEscc())) return false;
if (!getVscc()
.equals(other.getVscc())) return false;
if (hasPolicy() != other.hasPolicy()) return false;
if (hasPolicy()) {
if (!getPolicy()
.equals(other.getPolicy())) return false;
}
if (!getData()
.equals(other.getData())) return false;
if (!getId()
.equals(other.getId())) return false;
if (hasInstantiationPolicy() != other.hasInstantiationPolicy()) return false;
if (hasInstantiationPolicy()) {
if (!getInstantiationPolicy()
.equals(other.getInstantiationPolicy())) return false;
}
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
hash = (37 * hash) + VERSION_FIELD_NUMBER;
hash = (53 * hash) + getVersion().hashCode();
hash = (37 * hash) + ESCC_FIELD_NUMBER;
hash = (53 * hash) + getEscc().hashCode();
hash = (37 * hash) + VSCC_FIELD_NUMBER;
hash = (53 * hash) + getVscc().hashCode();
if (hasPolicy()) {
hash = (37 * hash) + POLICY_FIELD_NUMBER;
hash = (53 * hash) + getPolicy().hashCode();
}
hash = (37 * hash) + DATA_FIELD_NUMBER;
hash = (53 * hash) + getData().hashCode();
hash = (37 * hash) + ID_FIELD_NUMBER;
hash = (53 * hash) + getId().hashCode();
if (hasInstantiationPolicy()) {
hash = (37 * hash) + INSTANTIATION_POLICY_FIELD_NUMBER;
hash = (53 * hash) + getInstantiationPolicy().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeData parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeData parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeData parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeData 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.peer.Chaincode.ChaincodeData parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeData parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeData parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeData 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.peer.Chaincode.ChaincodeData parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeData 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.peer.Chaincode.ChaincodeData parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeData parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeData 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;
}
/**
*
* ChaincodeData defines the datastructure for chaincodes to be serialized by proto
* Type provides an additional check by directing to use a specific package after instantiation
* Data is Type specific (see CDSPackage and SignedCDSPackage)
*
*
* Protobuf type {@code protos.ChaincodeData}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:protos.ChaincodeData)
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDataOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.Chaincode.internal_static_protos_ChaincodeData_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.peer.Chaincode.internal_static_protos_ChaincodeData_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeData.class, org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeData.Builder.class);
}
// Construct using org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeData.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();
name_ = "";
version_ = "";
escc_ = "";
vscc_ = "";
if (policyBuilder_ == null) {
policy_ = null;
} else {
policy_ = null;
policyBuilder_ = null;
}
data_ = com.google.protobuf.ByteString.EMPTY;
id_ = com.google.protobuf.ByteString.EMPTY;
if (instantiationPolicyBuilder_ == null) {
instantiationPolicy_ = null;
} else {
instantiationPolicy_ = null;
instantiationPolicyBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.peer.Chaincode.internal_static_protos_ChaincodeData_descriptor;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeData getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeData.getDefaultInstance();
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeData build() {
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeData result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeData buildPartial() {
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeData result = new org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeData(this);
result.name_ = name_;
result.version_ = version_;
result.escc_ = escc_;
result.vscc_ = vscc_;
if (policyBuilder_ == null) {
result.policy_ = policy_;
} else {
result.policy_ = policyBuilder_.build();
}
result.data_ = data_;
result.id_ = id_;
if (instantiationPolicyBuilder_ == null) {
result.instantiationPolicy_ = instantiationPolicy_;
} else {
result.instantiationPolicy_ = instantiationPolicyBuilder_.build();
}
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeData) {
return mergeFrom((org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeData)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeData other) {
if (other == org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeData.getDefaultInstance()) return this;
if (!other.getName().isEmpty()) {
name_ = other.name_;
onChanged();
}
if (!other.getVersion().isEmpty()) {
version_ = other.version_;
onChanged();
}
if (!other.getEscc().isEmpty()) {
escc_ = other.escc_;
onChanged();
}
if (!other.getVscc().isEmpty()) {
vscc_ = other.vscc_;
onChanged();
}
if (other.hasPolicy()) {
mergePolicy(other.getPolicy());
}
if (other.getData() != com.google.protobuf.ByteString.EMPTY) {
setData(other.getData());
}
if (other.getId() != com.google.protobuf.ByteString.EMPTY) {
setId(other.getId());
}
if (other.hasInstantiationPolicy()) {
mergeInstantiationPolicy(other.getInstantiationPolicy());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeData parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeData) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object name_ = "";
/**
*
* Name of the chaincode
*
*
* string name = 1;
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Name of the chaincode
*
*
* string name = 1;
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Name of the chaincode
*
*
* string name = 1;
*/
public Builder setName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
name_ = value;
onChanged();
return this;
}
/**
*
* Name of the chaincode
*
*
* string name = 1;
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
onChanged();
return this;
}
/**
*
* Name of the chaincode
*
*
* string name = 1;
*/
public Builder setNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
name_ = value;
onChanged();
return this;
}
private java.lang.Object version_ = "";
/**
*
* Version of the chaincode
*
*
* string version = 2;
*/
public java.lang.String getVersion() {
java.lang.Object ref = version_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
version_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Version of the chaincode
*
*
* string version = 2;
*/
public com.google.protobuf.ByteString
getVersionBytes() {
java.lang.Object ref = version_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
version_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Version of the chaincode
*
*
* string version = 2;
*/
public Builder setVersion(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
version_ = value;
onChanged();
return this;
}
/**
*
* Version of the chaincode
*
*
* string version = 2;
*/
public Builder clearVersion() {
version_ = getDefaultInstance().getVersion();
onChanged();
return this;
}
/**
*
* Version of the chaincode
*
*
* string version = 2;
*/
public Builder setVersionBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
version_ = value;
onChanged();
return this;
}
private java.lang.Object escc_ = "";
/**
*
* Escc for the chaincode instance
*
*
* string escc = 3;
*/
public java.lang.String getEscc() {
java.lang.Object ref = escc_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
escc_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Escc for the chaincode instance
*
*
* string escc = 3;
*/
public com.google.protobuf.ByteString
getEsccBytes() {
java.lang.Object ref = escc_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
escc_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Escc for the chaincode instance
*
*
* string escc = 3;
*/
public Builder setEscc(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
escc_ = value;
onChanged();
return this;
}
/**
*
* Escc for the chaincode instance
*
*
* string escc = 3;
*/
public Builder clearEscc() {
escc_ = getDefaultInstance().getEscc();
onChanged();
return this;
}
/**
*
* Escc for the chaincode instance
*
*
* string escc = 3;
*/
public Builder setEsccBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
escc_ = value;
onChanged();
return this;
}
private java.lang.Object vscc_ = "";
/**
*
* Vscc for the chaincode instance
*
*
* string vscc = 4;
*/
public java.lang.String getVscc() {
java.lang.Object ref = vscc_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
vscc_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Vscc for the chaincode instance
*
*
* string vscc = 4;
*/
public com.google.protobuf.ByteString
getVsccBytes() {
java.lang.Object ref = vscc_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
vscc_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Vscc for the chaincode instance
*
*
* string vscc = 4;
*/
public Builder setVscc(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
vscc_ = value;
onChanged();
return this;
}
/**
*
* Vscc for the chaincode instance
*
*
* string vscc = 4;
*/
public Builder clearVscc() {
vscc_ = getDefaultInstance().getVscc();
onChanged();
return this;
}
/**
*
* Vscc for the chaincode instance
*
*
* string vscc = 4;
*/
public Builder setVsccBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
vscc_ = value;
onChanged();
return this;
}
private org.hyperledger.fabric.protos.common.Policies.SignaturePolicyEnvelope policy_;
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> policyBuilder_;
/**
*
* Policy endorsement policy for the chaincode instance
*
*
* .common.SignaturePolicyEnvelope policy = 5;
*/
public boolean hasPolicy() {
return policyBuilder_ != null || policy_ != null;
}
/**
*
* Policy endorsement policy for the chaincode instance
*
*
* .common.SignaturePolicyEnvelope policy = 5;
*/
public org.hyperledger.fabric.protos.common.Policies.SignaturePolicyEnvelope getPolicy() {
if (policyBuilder_ == null) {
return policy_ == null ? org.hyperledger.fabric.protos.common.Policies.SignaturePolicyEnvelope.getDefaultInstance() : policy_;
} else {
return policyBuilder_.getMessage();
}
}
/**
*
* Policy endorsement policy for the chaincode instance
*
*
* .common.SignaturePolicyEnvelope policy = 5;
*/
public Builder setPolicy(org.hyperledger.fabric.protos.common.Policies.SignaturePolicyEnvelope value) {
if (policyBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
policy_ = value;
onChanged();
} else {
policyBuilder_.setMessage(value);
}
return this;
}
/**
*
* Policy endorsement policy for the chaincode instance
*
*
* .common.SignaturePolicyEnvelope policy = 5;
*/
public Builder setPolicy(
org.hyperledger.fabric.protos.common.Policies.SignaturePolicyEnvelope.Builder builderForValue) {
if (policyBuilder_ == null) {
policy_ = builderForValue.build();
onChanged();
} else {
policyBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Policy endorsement policy for the chaincode instance
*
*
* .common.SignaturePolicyEnvelope policy = 5;
*/
public Builder mergePolicy(org.hyperledger.fabric.protos.common.Policies.SignaturePolicyEnvelope value) {
if (policyBuilder_ == null) {
if (policy_ != null) {
policy_ =
org.hyperledger.fabric.protos.common.Policies.SignaturePolicyEnvelope.newBuilder(policy_).mergeFrom(value).buildPartial();
} else {
policy_ = value;
}
onChanged();
} else {
policyBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Policy endorsement policy for the chaincode instance
*
*
* .common.SignaturePolicyEnvelope policy = 5;
*/
public Builder clearPolicy() {
if (policyBuilder_ == null) {
policy_ = null;
onChanged();
} else {
policy_ = null;
policyBuilder_ = null;
}
return this;
}
/**
*
* Policy endorsement policy for the chaincode instance
*
*
* .common.SignaturePolicyEnvelope policy = 5;
*/
public org.hyperledger.fabric.protos.common.Policies.SignaturePolicyEnvelope.Builder getPolicyBuilder() {
onChanged();
return getPolicyFieldBuilder().getBuilder();
}
/**
*
* Policy endorsement policy for the chaincode instance
*
*
* .common.SignaturePolicyEnvelope policy = 5;
*/
public org.hyperledger.fabric.protos.common.Policies.SignaturePolicyEnvelopeOrBuilder getPolicyOrBuilder() {
if (policyBuilder_ != null) {
return policyBuilder_.getMessageOrBuilder();
} else {
return policy_ == null ?
org.hyperledger.fabric.protos.common.Policies.SignaturePolicyEnvelope.getDefaultInstance() : policy_;
}
}
/**
*
* Policy endorsement policy for the chaincode instance
*
*
* .common.SignaturePolicyEnvelope policy = 5;
*/
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>
getPolicyFieldBuilder() {
if (policyBuilder_ == null) {
policyBuilder_ = new 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>(
getPolicy(),
getParentForChildren(),
isClean());
policy_ = null;
}
return policyBuilder_;
}
private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY;
/**
*
* Data data specific to the package
*
*
* bytes data = 6;
*/
public com.google.protobuf.ByteString getData() {
return data_;
}
/**
*
* Data data specific to the package
*
*
* bytes data = 6;
*/
public Builder setData(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
data_ = value;
onChanged();
return this;
}
/**
*
* Data data specific to the package
*
*
* bytes data = 6;
*/
public Builder clearData() {
data_ = getDefaultInstance().getData();
onChanged();
return this;
}
private com.google.protobuf.ByteString id_ = com.google.protobuf.ByteString.EMPTY;
/**
*
* Id of the chaincode that's the unique fingerprint for the CC This is not
* currently used anywhere but serves as a good eyecatcher
*
*
* bytes id = 7;
*/
public com.google.protobuf.ByteString getId() {
return id_;
}
/**
*
* Id of the chaincode that's the unique fingerprint for the CC This is not
* currently used anywhere but serves as a good eyecatcher
*
*
* bytes id = 7;
*/
public Builder setId(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
id_ = value;
onChanged();
return this;
}
/**
*
* Id of the chaincode that's the unique fingerprint for the CC This is not
* currently used anywhere but serves as a good eyecatcher
*
*
* bytes id = 7;
*/
public Builder clearId() {
id_ = getDefaultInstance().getId();
onChanged();
return this;
}
private org.hyperledger.fabric.protos.common.Policies.SignaturePolicyEnvelope instantiationPolicy_;
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> instantiationPolicyBuilder_;
/**
*
* InstantiationPolicy for the chaincode
*
*
* .common.SignaturePolicyEnvelope instantiation_policy = 8;
*/
public boolean hasInstantiationPolicy() {
return instantiationPolicyBuilder_ != null || instantiationPolicy_ != null;
}
/**
*
* InstantiationPolicy for the chaincode
*
*
* .common.SignaturePolicyEnvelope instantiation_policy = 8;
*/
public org.hyperledger.fabric.protos.common.Policies.SignaturePolicyEnvelope getInstantiationPolicy() {
if (instantiationPolicyBuilder_ == null) {
return instantiationPolicy_ == null ? org.hyperledger.fabric.protos.common.Policies.SignaturePolicyEnvelope.getDefaultInstance() : instantiationPolicy_;
} else {
return instantiationPolicyBuilder_.getMessage();
}
}
/**
*
* InstantiationPolicy for the chaincode
*
*
* .common.SignaturePolicyEnvelope instantiation_policy = 8;
*/
public Builder setInstantiationPolicy(org.hyperledger.fabric.protos.common.Policies.SignaturePolicyEnvelope value) {
if (instantiationPolicyBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
instantiationPolicy_ = value;
onChanged();
} else {
instantiationPolicyBuilder_.setMessage(value);
}
return this;
}
/**
*
* InstantiationPolicy for the chaincode
*
*
* .common.SignaturePolicyEnvelope instantiation_policy = 8;
*/
public Builder setInstantiationPolicy(
org.hyperledger.fabric.protos.common.Policies.SignaturePolicyEnvelope.Builder builderForValue) {
if (instantiationPolicyBuilder_ == null) {
instantiationPolicy_ = builderForValue.build();
onChanged();
} else {
instantiationPolicyBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* InstantiationPolicy for the chaincode
*
*
* .common.SignaturePolicyEnvelope instantiation_policy = 8;
*/
public Builder mergeInstantiationPolicy(org.hyperledger.fabric.protos.common.Policies.SignaturePolicyEnvelope value) {
if (instantiationPolicyBuilder_ == null) {
if (instantiationPolicy_ != null) {
instantiationPolicy_ =
org.hyperledger.fabric.protos.common.Policies.SignaturePolicyEnvelope.newBuilder(instantiationPolicy_).mergeFrom(value).buildPartial();
} else {
instantiationPolicy_ = value;
}
onChanged();
} else {
instantiationPolicyBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* InstantiationPolicy for the chaincode
*
*
* .common.SignaturePolicyEnvelope instantiation_policy = 8;
*/
public Builder clearInstantiationPolicy() {
if (instantiationPolicyBuilder_ == null) {
instantiationPolicy_ = null;
onChanged();
} else {
instantiationPolicy_ = null;
instantiationPolicyBuilder_ = null;
}
return this;
}
/**
*
* InstantiationPolicy for the chaincode
*
*
* .common.SignaturePolicyEnvelope instantiation_policy = 8;
*/
public org.hyperledger.fabric.protos.common.Policies.SignaturePolicyEnvelope.Builder getInstantiationPolicyBuilder() {
onChanged();
return getInstantiationPolicyFieldBuilder().getBuilder();
}
/**
*
* InstantiationPolicy for the chaincode
*
*
* .common.SignaturePolicyEnvelope instantiation_policy = 8;
*/
public org.hyperledger.fabric.protos.common.Policies.SignaturePolicyEnvelopeOrBuilder getInstantiationPolicyOrBuilder() {
if (instantiationPolicyBuilder_ != null) {
return instantiationPolicyBuilder_.getMessageOrBuilder();
} else {
return instantiationPolicy_ == null ?
org.hyperledger.fabric.protos.common.Policies.SignaturePolicyEnvelope.getDefaultInstance() : instantiationPolicy_;
}
}
/**
*
* InstantiationPolicy for the chaincode
*
*
* .common.SignaturePolicyEnvelope instantiation_policy = 8;
*/
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>
getInstantiationPolicyFieldBuilder() {
if (instantiationPolicyBuilder_ == null) {
instantiationPolicyBuilder_ = new 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>(
getInstantiationPolicy(),
getParentForChildren(),
isClean());
instantiationPolicy_ = null;
}
return instantiationPolicyBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:protos.ChaincodeData)
}
// @@protoc_insertion_point(class_scope:protos.ChaincodeData)
private static final org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeData DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeData();
}
public static org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeData getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ChaincodeData parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ChaincodeData(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeData getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_protos_ChaincodeID_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_protos_ChaincodeID_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_protos_ChaincodeInput_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_protos_ChaincodeInput_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_protos_ChaincodeInput_DecorationsEntry_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_protos_ChaincodeInput_DecorationsEntry_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_protos_ChaincodeSpec_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_protos_ChaincodeSpec_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_protos_ChaincodeDeploymentSpec_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_protos_ChaincodeDeploymentSpec_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_protos_ChaincodeInvocationSpec_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_protos_ChaincodeInvocationSpec_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_protos_LifecycleEvent_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_protos_LifecycleEvent_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_protos_CDSData_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_protos_CDSData_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_protos_ChaincodeData_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_protos_ChaincodeData_fieldAccessorTable;
public static com.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {
return descriptor;
}
private static com.google.protobuf.Descriptors.FileDescriptor
descriptor;
static {
java.lang.String[] descriptorData = {
"\n\024peer/chaincode.proto\022\006protos\032\025common/p" +
"olicies.proto\":\n\013ChaincodeID\022\014\n\004path\030\001 \001" +
"(\t\022\014\n\004name\030\002 \001(\t\022\017\n\007version\030\003 \001(\t\"\241\001\n\016Ch" +
"aincodeInput\022\014\n\004args\030\001 \003(\014\022<\n\013decoration" +
"s\030\002 \003(\0132\'.protos.ChaincodeInput.Decorati" +
"onsEntry\022\017\n\007is_init\030\003 \001(\010\0322\n\020Decorations" +
"Entry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\014:\0028\001\"\334\001" +
"\n\rChaincodeSpec\022(\n\004type\030\001 \001(\0162\032.protos.C" +
"haincodeSpec.Type\022)\n\014chaincode_id\030\002 \001(\0132" +
"\023.protos.ChaincodeID\022%\n\005input\030\003 \001(\0132\026.pr" +
"otos.ChaincodeInput\022\017\n\007timeout\030\004 \001(\005\">\n\004" +
"Type\022\r\n\tUNDEFINED\020\000\022\n\n\006GOLANG\020\001\022\010\n\004NODE\020" +
"\002\022\007\n\003CAR\020\003\022\010\n\004JAVA\020\004\"\204\001\n\027ChaincodeDeploy" +
"mentSpec\022-\n\016chaincode_spec\030\001 \001(\0132\025.proto" +
"s.ChaincodeSpec\022\024\n\014code_package\030\003 \001(\014J\004\010" +
"\002\020\003J\004\010\004\020\005R\016effective_dateR\010exec_env\"a\n\027C" +
"haincodeInvocationSpec\022-\n\016chaincode_spec" +
"\030\001 \001(\0132\025.protos.ChaincodeSpecJ\004\010\002\020\003R\021id_" +
"generation_alg\"(\n\016LifecycleEvent\022\026\n\016chai" +
"ncode_name\030\001 \001(\t\"-\n\007CDSData\022\014\n\004hash\030\001 \001(" +
"\014\022\024\n\014metadatahash\030\002 \001(\014\"\324\001\n\rChaincodeDat" +
"a\022\014\n\004name\030\001 \001(\t\022\017\n\007version\030\002 \001(\t\022\014\n\004escc" +
"\030\003 \001(\t\022\014\n\004vscc\030\004 \001(\t\022/\n\006policy\030\005 \001(\0132\037.c" +
"ommon.SignaturePolicyEnvelope\022\014\n\004data\030\006 " +
"\001(\014\022\n\n\002id\030\007 \001(\014\022=\n\024instantiation_policy\030" +
"\010 \001(\0132\037.common.SignaturePolicyEnvelopeBR" +
"\n\"org.hyperledger.fabric.protos.peerZ,gi" +
"thub.com/hyperledger/fabric-protos-go/pe" +
"erb\006proto3"
};
descriptor = com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
org.hyperledger.fabric.protos.common.Policies.getDescriptor(),
});
internal_static_protos_ChaincodeID_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_protos_ChaincodeID_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_protos_ChaincodeID_descriptor,
new java.lang.String[] { "Path", "Name", "Version", });
internal_static_protos_ChaincodeInput_descriptor =
getDescriptor().getMessageTypes().get(1);
internal_static_protos_ChaincodeInput_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_protos_ChaincodeInput_descriptor,
new java.lang.String[] { "Args", "Decorations", "IsInit", });
internal_static_protos_ChaincodeInput_DecorationsEntry_descriptor =
internal_static_protos_ChaincodeInput_descriptor.getNestedTypes().get(0);
internal_static_protos_ChaincodeInput_DecorationsEntry_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_protos_ChaincodeInput_DecorationsEntry_descriptor,
new java.lang.String[] { "Key", "Value", });
internal_static_protos_ChaincodeSpec_descriptor =
getDescriptor().getMessageTypes().get(2);
internal_static_protos_ChaincodeSpec_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_protos_ChaincodeSpec_descriptor,
new java.lang.String[] { "Type", "ChaincodeId", "Input", "Timeout", });
internal_static_protos_ChaincodeDeploymentSpec_descriptor =
getDescriptor().getMessageTypes().get(3);
internal_static_protos_ChaincodeDeploymentSpec_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_protos_ChaincodeDeploymentSpec_descriptor,
new java.lang.String[] { "ChaincodeSpec", "CodePackage", });
internal_static_protos_ChaincodeInvocationSpec_descriptor =
getDescriptor().getMessageTypes().get(4);
internal_static_protos_ChaincodeInvocationSpec_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_protos_ChaincodeInvocationSpec_descriptor,
new java.lang.String[] { "ChaincodeSpec", });
internal_static_protos_LifecycleEvent_descriptor =
getDescriptor().getMessageTypes().get(5);
internal_static_protos_LifecycleEvent_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_protos_LifecycleEvent_descriptor,
new java.lang.String[] { "ChaincodeName", });
internal_static_protos_CDSData_descriptor =
getDescriptor().getMessageTypes().get(6);
internal_static_protos_CDSData_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_protos_CDSData_descriptor,
new java.lang.String[] { "Hash", "Metadatahash", });
internal_static_protos_ChaincodeData_descriptor =
getDescriptor().getMessageTypes().get(7);
internal_static_protos_ChaincodeData_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_protos_ChaincodeData_descriptor,
new java.lang.String[] { "Name", "Version", "Escc", "Vscc", "Policy", "Data", "Id", "InstantiationPolicy", });
org.hyperledger.fabric.protos.common.Policies.getDescriptor();
}
// @@protoc_insertion_point(outer_class_scope)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy