Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: 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);
}
/**
*
* Confidentiality Levels
*
*
* Protobuf enum {@code protos.ConfidentialityLevel}
*/
public enum ConfidentialityLevel
implements com.google.protobuf.ProtocolMessageEnum {
/**
* PUBLIC = 0;
*/
PUBLIC(0),
/**
* CONFIDENTIAL = 1;
*/
CONFIDENTIAL(1),
UNRECOGNIZED(-1),
;
/**
* PUBLIC = 0;
*/
public static final int PUBLIC_VALUE = 0;
/**
* CONFIDENTIAL = 1;
*/
public static final int CONFIDENTIAL_VALUE = 1;
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 ConfidentialityLevel valueOf(int value) {
return forNumber(value);
}
public static ConfidentialityLevel forNumber(int value) {
switch (value) {
case 0: return PUBLIC;
case 1: return CONFIDENTIAL;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
ConfidentialityLevel> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public ConfidentialityLevel findValueByNumber(int number) {
return ConfidentialityLevel.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.getDescriptor().getEnumTypes().get(0);
}
private static final ConfidentialityLevel[] VALUES = values();
public static ConfidentialityLevel 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 ConfidentialityLevel(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:protos.ConfidentialityLevel)
}
public interface ChaincodeIDOrBuilder extends
// @@protoc_insertion_point(interface_extends:protos.ChaincodeID)
com.google.protobuf.MessageOrBuilder {
/**
*
*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 {
// Use ChaincodeID.newBuilder() to construct.
private ChaincodeID(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private ChaincodeID() {
path_ = "";
name_ = "";
version_ = "";
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
private ChaincodeID(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
int mutable_bitField0_ = 0;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!input.skipField(tag)) {
done = true;
}
break;
}
case 10: {
java.lang.String s = input.readStringRequireUtf8();
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;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.Chaincode.internal_static_protos_ChaincodeID_descriptor;
}
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_;
/**
*
*
* optional 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;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!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_);
}
}
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_);
}
memoizedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID other = (org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID) obj;
boolean result = true;
result = result && getPath()
.equals(other.getPath());
result = result && getName()
.equals(other.getName());
result = result && getVersion()
.equals(other.getVersion());
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptorForType().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(
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);
}
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);
}
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;
}
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) {
}
}
public Builder clear() {
super.clear();
path_ = "";
name_ = "";
version_ = "";
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.peer.Chaincode.internal_static_protos_ChaincodeID_descriptor;
}
public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID.getDefaultInstance();
}
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;
}
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;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.fabric.protos.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();
}
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.hyperledger.fabric.protos.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_ = "";
/**
*
*
* optional string version = 3;
*/
public Builder setVersionBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
version_ = value;
onChanged();
return this;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
// @@protoc_insertion_point(builder_scope: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() {
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;
}
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);
}
/**
*
* 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 {
// 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
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
private ChaincodeInput(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
int mutable_bitField0_ = 0;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!input.skipField(tag)) {
done = true;
}
break;
}
case 10: {
if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
args_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
args_.add(input.readBytes());
break;
}
case 18: {
if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
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;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
args_ = java.util.Collections.unmodifiableList(args_);
}
makeExtensionsImmutable();
}
}
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);
}
}
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);
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
for (int i = 0; i < args_.size(); i++) {
output.writeBytes(1, args_.get(i));
}
for (java.util.Map.Entry entry
: internalGetDecorations().getMap().entrySet()) {
com.google.protobuf.MapEntry
decorations = DecorationsDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
output.writeMessage(2, decorations);
}
}
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);
}
memoizedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput other = (org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput) obj;
boolean result = true;
result = result && getArgsList()
.equals(other.getArgsList());
result = result && internalGetDecorations().equals(
other.internalGetDecorations());
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptorForType().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 = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
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);
}
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);
}
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);
}
}
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) {
}
}
public Builder clear() {
super.clear();
args_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
internalGetMutableDecorations().clear();
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.peer.Chaincode.internal_static_protos_ChaincodeInput_descriptor;
}
public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput.getDefaultInstance();
}
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;
}
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) == 0x00000001)) {
args_ = java.util.Collections.unmodifiableList(args_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.args_ = args_;
result.decorations_ = internalGetDecorations();
result.decorations_.makeImmutable();
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.fabric.protos.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());
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.hyperledger.fabric.protos.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) == 0x00000001)) {
args_ = new java.util.ArrayList(args_);
bitField0_ |= 0x00000001;
}
}
/**
* repeated bytes args = 1;
*/
public java.util.List
getArgsList() {
return java.util.Collections.unmodifiableList(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 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() {
getMutableDecorations().clear();
return this;
}
/**
* map<string, bytes> decorations = 2;
*/
public Builder removeDecorations(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
getMutableDecorations().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(); }
getMutableDecorations().put(key, value);
return this;
}
/**
* map<string, bytes> decorations = 2;
*/
public Builder putAllDecorations(
java.util.Map values) {
getMutableDecorations().putAll(values);
return this;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
// @@protoc_insertion_point(builder_scope: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() {
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;
}
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 {
/**
* optional .protos.ChaincodeSpec.Type type = 1;
*/
int getTypeValue();
/**
* optional .protos.ChaincodeSpec.Type type = 1;
*/
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.Type getType();
/**
* optional .protos.ChaincodeID chaincode_id = 2;
*/
boolean hasChaincodeId();
/**
* optional .protos.ChaincodeID chaincode_id = 2;
*/
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID getChaincodeId();
/**
* optional .protos.ChaincodeID chaincode_id = 2;
*/
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeIDOrBuilder getChaincodeIdOrBuilder();
/**
* optional .protos.ChaincodeInput input = 3;
*/
boolean hasInput();
/**
* optional .protos.ChaincodeInput input = 3;
*/
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput getInput();
/**
* optional .protos.ChaincodeInput input = 3;
*/
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInputOrBuilder getInputOrBuilder();
/**
* optional 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 {
// Use ChaincodeSpec.newBuilder() to construct.
private ChaincodeSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private ChaincodeSpec() {
type_ = 0;
timeout_ = 0;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
private ChaincodeSpec(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
int mutable_bitField0_ = 0;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!input.skipField(tag)) {
done = true;
}
break;
}
case 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;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.Chaincode.internal_static_protos_ChaincodeSpec_descriptor;
}
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_;
/**
* optional .protos.ChaincodeSpec.Type type = 1;
*/
public int getTypeValue() {
return type_;
}
/**
* optional .protos.ChaincodeSpec.Type type = 1;
*/
public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.Type getType() {
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_;
/**
* optional .protos.ChaincodeID chaincode_id = 2;
*/
public boolean hasChaincodeId() {
return chaincodeId_ != null;
}
/**
* optional .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_;
}
/**
* optional .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_;
/**
* optional .protos.ChaincodeInput input = 3;
*/
public boolean hasInput() {
return input_ != null;
}
/**
* optional .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_;
}
/**
* optional .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_;
/**
* optional int32 timeout = 4;
*/
public int getTimeout() {
return timeout_;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (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_);
}
}
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_);
}
memoizedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec other = (org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec) obj;
boolean result = true;
result = result && type_ == other.type_;
result = result && (hasChaincodeId() == other.hasChaincodeId());
if (hasChaincodeId()) {
result = result && getChaincodeId()
.equals(other.getChaincodeId());
}
result = result && (hasInput() == other.hasInput());
if (hasInput()) {
result = result && getInput()
.equals(other.getInput());
}
result = result && (getTimeout()
== other.getTimeout());
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptorForType().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(
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);
}
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);
}
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.
*