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-sdk-java Show documentation
Show all versions of fabric-sdk-java Show documentation
Java SDK for Hyperledger fabric project
// 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 {
/**
*
*deploy transaction will use the path
*
*
* optional string path = 1;
*/
java.lang.String getPath();
/**
*
*deploy transaction will use the path
*
*
* optional string path = 1;
*/
com.google.protobuf.ByteString
getPathBytes();
/**
*
*all other requests will use the name (really a hashcode) generated by
*the deploy transaction
*
*
* optional string name = 2;
*/
java.lang.String getName();
/**
*
*all other requests will use the name (really a hashcode) generated by
*the deploy transaction
*
*
* optional string name = 2;
*/
com.google.protobuf.ByteString
getNameBytes();
/**
*
*user friendly version name for the chaincode
*
*
* optional string version = 3;
*/
java.lang.String getVersion();
/**
*
*user friendly version name for the chaincode
*
*
* optional 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 {
// 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_;
/**
*
*deploy transaction will use the path
*
*
* optional 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
*
*
* optional 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
*
*
* optional 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
*
*
* optional 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
*
*
* optional 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
*
*
* 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_ = "";
/**
*
*deploy transaction will use the path
*
*
* optional 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
*
*
* optional 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
*
*
* optional 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
*
*
* optional string path = 1;
*/
public Builder clearPath() {
path_ = getDefaultInstance().getPath();
onChanged();
return this;
}
/**
*
*deploy transaction will use the path
*
*
* optional 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
*
*
* optional 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
*
*
* optional 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
*
*
* optional 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
*
*
* optional 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
*
*
* optional 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
*
*
* optional 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
*
*
* optional 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
*
*
* optional 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
*
*
* optional string version = 3;
*/
public Builder clearVersion() {
version_ = getDefaultInstance().getVersion();
onChanged();
return this;
}
/**
*
*user friendly version name for the chaincode
*
*
* 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.
*
*
* 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;
}
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) {
}
}
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;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.peer.Chaincode.internal_static_protos_ChaincodeSpec_descriptor;
}
public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.getDefaultInstance();
}
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;
}
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;
}
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.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());
}
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.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;
/**
* optional .protos.ChaincodeSpec.Type type = 1;
*/
public int getTypeValue() {
return type_;
}
/**
* optional .protos.ChaincodeSpec.Type type = 1;
*/
public Builder setTypeValue(int value) {
type_ = value;
onChanged();
return this;
}
/**
* 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;
}
/**
* optional .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;
}
/**
* optional .protos.ChaincodeSpec.Type type = 1;
*/
public Builder clearType() {
type_ = 0;
onChanged();
return this;
}
private org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID chaincodeId_ = null;
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_;
/**
* optional .protos.ChaincodeID chaincode_id = 2;
*/
public boolean hasChaincodeId() {
return chaincodeIdBuilder_ != null || chaincodeId_ != null;
}
/**
* optional .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();
}
}
/**
* optional .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;
}
/**
* optional .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;
}
/**
* optional .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;
}
/**
* optional .protos.ChaincodeID chaincode_id = 2;
*/
public Builder clearChaincodeId() {
if (chaincodeIdBuilder_ == null) {
chaincodeId_ = null;
onChanged();
} else {
chaincodeId_ = null;
chaincodeIdBuilder_ = null;
}
return this;
}
/**
* optional .protos.ChaincodeID chaincode_id = 2;
*/
public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID.Builder getChaincodeIdBuilder() {
onChanged();
return getChaincodeIdFieldBuilder().getBuilder();
}
/**
* optional .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_;
}
}
/**
* optional .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_ = null;
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_;
/**
* optional .protos.ChaincodeInput input = 3;
*/
public boolean hasInput() {
return inputBuilder_ != null || input_ != null;
}
/**
* optional .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();
}
}
/**
* optional .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;
}
/**
* optional .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;
}
/**
* optional .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;
}
/**
* optional .protos.ChaincodeInput input = 3;
*/
public Builder clearInput() {
if (inputBuilder_ == null) {
input_ = null;
onChanged();
} else {
input_ = null;
inputBuilder_ = null;
}
return this;
}
/**
* optional .protos.ChaincodeInput input = 3;
*/
public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInput.Builder getInputBuilder() {
onChanged();
return getInputFieldBuilder().getBuilder();
}
/**
* optional .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_;
}
}
/**
* optional .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_ ;
/**
* optional int32 timeout = 4;
*/
public int getTimeout() {
return timeout_;
}
/**
* optional int32 timeout = 4;
*/
public Builder setTimeout(int value) {
timeout_ = value;
onChanged();
return this;
}
/**
* optional int32 timeout = 4;
*/
public Builder clearTimeout() {
timeout_ = 0;
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.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() {
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;
}
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 {
/**
* optional .protos.ChaincodeSpec chaincode_spec = 1;
*/
boolean hasChaincodeSpec();
/**
* optional .protos.ChaincodeSpec chaincode_spec = 1;
*/
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec getChaincodeSpec();
/**
* optional .protos.ChaincodeSpec chaincode_spec = 1;
*/
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpecOrBuilder getChaincodeSpecOrBuilder();
/**
*
* Controls when the chaincode becomes executable.
*
*
* optional .google.protobuf.Timestamp effective_date = 2;
*/
boolean hasEffectiveDate();
/**
*
* Controls when the chaincode becomes executable.
*
*
* optional .google.protobuf.Timestamp effective_date = 2;
*/
com.google.protobuf.Timestamp getEffectiveDate();
/**
*
* Controls when the chaincode becomes executable.
*
*
* optional .google.protobuf.Timestamp effective_date = 2;
*/
com.google.protobuf.TimestampOrBuilder getEffectiveDateOrBuilder();
/**
* optional bytes code_package = 3;
*/
com.google.protobuf.ByteString getCodePackage();
/**
* optional .protos.ChaincodeDeploymentSpec.ExecutionEnvironment exec_env = 4;
*/
int getExecEnvValue();
/**
* optional .protos.ChaincodeDeploymentSpec.ExecutionEnvironment exec_env = 4;
*/
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec.ExecutionEnvironment getExecEnv();
}
/**
*
* 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 {
// Use ChaincodeDeploymentSpec.newBuilder() to construct.
private ChaincodeDeploymentSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private ChaincodeDeploymentSpec() {
codePackage_ = com.google.protobuf.ByteString.EMPTY;
execEnv_ = 0;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
private ChaincodeDeploymentSpec(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
int mutable_bitField0_ = 0;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!input.skipField(tag)) {
done = true;
}
break;
}
case 10: {
org.hyperledger.fabric.protos.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 18: {
com.google.protobuf.Timestamp.Builder subBuilder = null;
if (effectiveDate_ != null) {
subBuilder = effectiveDate_.toBuilder();
}
effectiveDate_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(effectiveDate_);
effectiveDate_ = subBuilder.buildPartial();
}
break;
}
case 26: {
codePackage_ = input.readBytes();
break;
}
case 32: {
int rawValue = input.readEnum();
execEnv_ = rawValue;
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_ChaincodeDeploymentSpec_descriptor;
}
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);
}
/**
* Protobuf enum {@code protos.ChaincodeDeploymentSpec.ExecutionEnvironment}
*/
public enum ExecutionEnvironment
implements com.google.protobuf.ProtocolMessageEnum {
/**
* DOCKER = 0;
*/
DOCKER(0),
/**
* SYSTEM = 1;
*/
SYSTEM(1),
UNRECOGNIZED(-1),
;
/**
* DOCKER = 0;
*/
public static final int DOCKER_VALUE = 0;
/**
* SYSTEM = 1;
*/
public static final int SYSTEM_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 ExecutionEnvironment valueOf(int value) {
return forNumber(value);
}
public static ExecutionEnvironment forNumber(int value) {
switch (value) {
case 0: return DOCKER;
case 1: return SYSTEM;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
ExecutionEnvironment> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public ExecutionEnvironment findValueByNumber(int number) {
return ExecutionEnvironment.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.ChaincodeDeploymentSpec.getDescriptor().getEnumTypes().get(0);
}
private static final ExecutionEnvironment[] VALUES = values();
public static ExecutionEnvironment 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 ExecutionEnvironment(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:protos.ChaincodeDeploymentSpec.ExecutionEnvironment)
}
public static final int CHAINCODE_SPEC_FIELD_NUMBER = 1;
private org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec chaincodeSpec_;
/**
* optional .protos.ChaincodeSpec chaincode_spec = 1;
*/
public boolean hasChaincodeSpec() {
return chaincodeSpec_ != null;
}
/**
* optional .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_;
}
/**
* optional .protos.ChaincodeSpec chaincode_spec = 1;
*/
public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpecOrBuilder getChaincodeSpecOrBuilder() {
return getChaincodeSpec();
}
public static final int EFFECTIVE_DATE_FIELD_NUMBER = 2;
private com.google.protobuf.Timestamp effectiveDate_;
/**
*
* Controls when the chaincode becomes executable.
*
*
* optional .google.protobuf.Timestamp effective_date = 2;
*/
public boolean hasEffectiveDate() {
return effectiveDate_ != null;
}
/**
*
* Controls when the chaincode becomes executable.
*
*
* optional .google.protobuf.Timestamp effective_date = 2;
*/
public com.google.protobuf.Timestamp getEffectiveDate() {
return effectiveDate_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : effectiveDate_;
}
/**
*
* Controls when the chaincode becomes executable.
*
*
* optional .google.protobuf.Timestamp effective_date = 2;
*/
public com.google.protobuf.TimestampOrBuilder getEffectiveDateOrBuilder() {
return getEffectiveDate();
}
public static final int CODE_PACKAGE_FIELD_NUMBER = 3;
private com.google.protobuf.ByteString codePackage_;
/**
* optional bytes code_package = 3;
*/
public com.google.protobuf.ByteString getCodePackage() {
return codePackage_;
}
public static final int EXEC_ENV_FIELD_NUMBER = 4;
private int execEnv_;
/**
* optional .protos.ChaincodeDeploymentSpec.ExecutionEnvironment exec_env = 4;
*/
public int getExecEnvValue() {
return execEnv_;
}
/**
* optional .protos.ChaincodeDeploymentSpec.ExecutionEnvironment exec_env = 4;
*/
public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec.ExecutionEnvironment getExecEnv() {
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec.ExecutionEnvironment result = org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec.ExecutionEnvironment.valueOf(execEnv_);
return result == null ? org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec.ExecutionEnvironment.UNRECOGNIZED : result;
}
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 (chaincodeSpec_ != null) {
output.writeMessage(1, getChaincodeSpec());
}
if (effectiveDate_ != null) {
output.writeMessage(2, getEffectiveDate());
}
if (!codePackage_.isEmpty()) {
output.writeBytes(3, codePackage_);
}
if (execEnv_ != org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec.ExecutionEnvironment.DOCKER.getNumber()) {
output.writeEnum(4, execEnv_);
}
}
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 (effectiveDate_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getEffectiveDate());
}
if (!codePackage_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(3, codePackage_);
}
if (execEnv_ != org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec.ExecutionEnvironment.DOCKER.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(4, execEnv_);
}
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.ChaincodeDeploymentSpec)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec other = (org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec) obj;
boolean result = true;
result = result && (hasChaincodeSpec() == other.hasChaincodeSpec());
if (hasChaincodeSpec()) {
result = result && getChaincodeSpec()
.equals(other.getChaincodeSpec());
}
result = result && (hasEffectiveDate() == other.hasEffectiveDate());
if (hasEffectiveDate()) {
result = result && getEffectiveDate()
.equals(other.getEffectiveDate());
}
result = result && getCodePackage()
.equals(other.getCodePackage());
result = result && execEnv_ == other.execEnv_;
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptorForType().hashCode();
if (hasChaincodeSpec()) {
hash = (37 * hash) + CHAINCODE_SPEC_FIELD_NUMBER;
hash = (53 * hash) + getChaincodeSpec().hashCode();
}
if (hasEffectiveDate()) {
hash = (37 * hash) + EFFECTIVE_DATE_FIELD_NUMBER;
hash = (53 * hash) + getEffectiveDate().hashCode();
}
hash = (37 * hash) + CODE_PACKAGE_FIELD_NUMBER;
hash = (53 * hash) + getCodePackage().hashCode();
hash = (37 * hash) + EXEC_ENV_FIELD_NUMBER;
hash = (53 * hash) + execEnv_;
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
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);
}
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);
}
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;
}
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) {
}
}
public Builder clear() {
super.clear();
if (chaincodeSpecBuilder_ == null) {
chaincodeSpec_ = null;
} else {
chaincodeSpec_ = null;
chaincodeSpecBuilder_ = null;
}
if (effectiveDateBuilder_ == null) {
effectiveDate_ = null;
} else {
effectiveDate_ = null;
effectiveDateBuilder_ = null;
}
codePackage_ = com.google.protobuf.ByteString.EMPTY;
execEnv_ = 0;
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.peer.Chaincode.internal_static_protos_ChaincodeDeploymentSpec_descriptor;
}
public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec.getDefaultInstance();
}
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;
}
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();
}
if (effectiveDateBuilder_ == null) {
result.effectiveDate_ = effectiveDate_;
} else {
result.effectiveDate_ = effectiveDateBuilder_.build();
}
result.codePackage_ = codePackage_;
result.execEnv_ = execEnv_;
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.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.hasEffectiveDate()) {
mergeEffectiveDate(other.getEffectiveDate());
}
if (other.getCodePackage() != com.google.protobuf.ByteString.EMPTY) {
setCodePackage(other.getCodePackage());
}
if (other.execEnv_ != 0) {
setExecEnvValue(other.getExecEnvValue());
}
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.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_ = null;
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_;
/**
* optional .protos.ChaincodeSpec chaincode_spec = 1;
*/
public boolean hasChaincodeSpec() {
return chaincodeSpecBuilder_ != null || chaincodeSpec_ != null;
}
/**
* optional .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();
}
}
/**
* optional .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;
}
/**
* optional .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;
}
/**
* optional .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;
}
/**
* optional .protos.ChaincodeSpec chaincode_spec = 1;
*/
public Builder clearChaincodeSpec() {
if (chaincodeSpecBuilder_ == null) {
chaincodeSpec_ = null;
onChanged();
} else {
chaincodeSpec_ = null;
chaincodeSpecBuilder_ = null;
}
return this;
}
/**
* optional .protos.ChaincodeSpec chaincode_spec = 1;
*/
public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.Builder getChaincodeSpecBuilder() {
onChanged();
return getChaincodeSpecFieldBuilder().getBuilder();
}
/**
* optional .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_;
}
}
/**
* optional .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.Timestamp effectiveDate_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> effectiveDateBuilder_;
/**
*
* Controls when the chaincode becomes executable.
*
*
* optional .google.protobuf.Timestamp effective_date = 2;
*/
public boolean hasEffectiveDate() {
return effectiveDateBuilder_ != null || effectiveDate_ != null;
}
/**
*
* Controls when the chaincode becomes executable.
*
*
* optional .google.protobuf.Timestamp effective_date = 2;
*/
public com.google.protobuf.Timestamp getEffectiveDate() {
if (effectiveDateBuilder_ == null) {
return effectiveDate_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : effectiveDate_;
} else {
return effectiveDateBuilder_.getMessage();
}
}
/**
*
* Controls when the chaincode becomes executable.
*
*
* optional .google.protobuf.Timestamp effective_date = 2;
*/
public Builder setEffectiveDate(com.google.protobuf.Timestamp value) {
if (effectiveDateBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
effectiveDate_ = value;
onChanged();
} else {
effectiveDateBuilder_.setMessage(value);
}
return this;
}
/**
*
* Controls when the chaincode becomes executable.
*
*
* optional .google.protobuf.Timestamp effective_date = 2;
*/
public Builder setEffectiveDate(
com.google.protobuf.Timestamp.Builder builderForValue) {
if (effectiveDateBuilder_ == null) {
effectiveDate_ = builderForValue.build();
onChanged();
} else {
effectiveDateBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Controls when the chaincode becomes executable.
*
*
* optional .google.protobuf.Timestamp effective_date = 2;
*/
public Builder mergeEffectiveDate(com.google.protobuf.Timestamp value) {
if (effectiveDateBuilder_ == null) {
if (effectiveDate_ != null) {
effectiveDate_ =
com.google.protobuf.Timestamp.newBuilder(effectiveDate_).mergeFrom(value).buildPartial();
} else {
effectiveDate_ = value;
}
onChanged();
} else {
effectiveDateBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Controls when the chaincode becomes executable.
*
*
* optional .google.protobuf.Timestamp effective_date = 2;
*/
public Builder clearEffectiveDate() {
if (effectiveDateBuilder_ == null) {
effectiveDate_ = null;
onChanged();
} else {
effectiveDate_ = null;
effectiveDateBuilder_ = null;
}
return this;
}
/**
*
* Controls when the chaincode becomes executable.
*
*
* optional .google.protobuf.Timestamp effective_date = 2;
*/
public com.google.protobuf.Timestamp.Builder getEffectiveDateBuilder() {
onChanged();
return getEffectiveDateFieldBuilder().getBuilder();
}
/**
*
* Controls when the chaincode becomes executable.
*
*
* optional .google.protobuf.Timestamp effective_date = 2;
*/
public com.google.protobuf.TimestampOrBuilder getEffectiveDateOrBuilder() {
if (effectiveDateBuilder_ != null) {
return effectiveDateBuilder_.getMessageOrBuilder();
} else {
return effectiveDate_ == null ?
com.google.protobuf.Timestamp.getDefaultInstance() : effectiveDate_;
}
}
/**
*
* Controls when the chaincode becomes executable.
*
*
* optional .google.protobuf.Timestamp effective_date = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>
getEffectiveDateFieldBuilder() {
if (effectiveDateBuilder_ == null) {
effectiveDateBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>(
getEffectiveDate(),
getParentForChildren(),
isClean());
effectiveDate_ = null;
}
return effectiveDateBuilder_;
}
private com.google.protobuf.ByteString codePackage_ = com.google.protobuf.ByteString.EMPTY;
/**
* optional bytes code_package = 3;
*/
public com.google.protobuf.ByteString getCodePackage() {
return codePackage_;
}
/**
* optional bytes code_package = 3;
*/
public Builder setCodePackage(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
codePackage_ = value;
onChanged();
return this;
}
/**
* optional bytes code_package = 3;
*/
public Builder clearCodePackage() {
codePackage_ = getDefaultInstance().getCodePackage();
onChanged();
return this;
}
private int execEnv_ = 0;
/**
* optional .protos.ChaincodeDeploymentSpec.ExecutionEnvironment exec_env = 4;
*/
public int getExecEnvValue() {
return execEnv_;
}
/**
* optional .protos.ChaincodeDeploymentSpec.ExecutionEnvironment exec_env = 4;
*/
public Builder setExecEnvValue(int value) {
execEnv_ = value;
onChanged();
return this;
}
/**
* optional .protos.ChaincodeDeploymentSpec.ExecutionEnvironment exec_env = 4;
*/
public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec.ExecutionEnvironment getExecEnv() {
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec.ExecutionEnvironment result = org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec.ExecutionEnvironment.valueOf(execEnv_);
return result == null ? org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec.ExecutionEnvironment.UNRECOGNIZED : result;
}
/**
* optional .protos.ChaincodeDeploymentSpec.ExecutionEnvironment exec_env = 4;
*/
public Builder setExecEnv(org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec.ExecutionEnvironment value) {
if (value == null) {
throw new NullPointerException();
}
execEnv_ = value.getNumber();
onChanged();
return this;
}
/**
* optional .protos.ChaincodeDeploymentSpec.ExecutionEnvironment exec_env = 4;
*/
public Builder clearExecEnv() {
execEnv_ = 0;
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.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() {
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;
}
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 {
/**
* optional .protos.ChaincodeSpec chaincode_spec = 1;
*/
boolean hasChaincodeSpec();
/**
* optional .protos.ChaincodeSpec chaincode_spec = 1;
*/
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec getChaincodeSpec();
/**
* optional .protos.ChaincodeSpec chaincode_spec = 1;
*/
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpecOrBuilder getChaincodeSpecOrBuilder();
/**
*
* This field can contain a user-specified ID generation algorithm
* If supplied, this will be used to generate a ID
* If not supplied (left empty), sha256base64 will be used
* The algorithm consists of two parts:
* 1, a hash function
* 2, a decoding used to decode user (string) input to bytes
* Currently, SHA256 with BASE64 is supported (e.g. idGenerationAlg='sha256base64')
*
*
* optional string id_generation_alg = 2;
*/
java.lang.String getIdGenerationAlg();
/**
*
* This field can contain a user-specified ID generation algorithm
* If supplied, this will be used to generate a ID
* If not supplied (left empty), sha256base64 will be used
* The algorithm consists of two parts:
* 1, a hash function
* 2, a decoding used to decode user (string) input to bytes
* Currently, SHA256 with BASE64 is supported (e.g. idGenerationAlg='sha256base64')
*
*
* optional string id_generation_alg = 2;
*/
com.google.protobuf.ByteString
getIdGenerationAlgBytes();
}
/**
*
* 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 {
// Use ChaincodeInvocationSpec.newBuilder() to construct.
private ChaincodeInvocationSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private ChaincodeInvocationSpec() {
idGenerationAlg_ = "";
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
private ChaincodeInvocationSpec(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
int mutable_bitField0_ = 0;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!input.skipField(tag)) {
done = true;
}
break;
}
case 10: {
org.hyperledger.fabric.protos.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 18: {
java.lang.String s = input.readStringRequireUtf8();
idGenerationAlg_ = 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_ChaincodeInvocationSpec_descriptor;
}
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_;
/**
* optional .protos.ChaincodeSpec chaincode_spec = 1;
*/
public boolean hasChaincodeSpec() {
return chaincodeSpec_ != null;
}
/**
* optional .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_;
}
/**
* optional .protos.ChaincodeSpec chaincode_spec = 1;
*/
public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpecOrBuilder getChaincodeSpecOrBuilder() {
return getChaincodeSpec();
}
public static final int ID_GENERATION_ALG_FIELD_NUMBER = 2;
private volatile java.lang.Object idGenerationAlg_;
/**
*
* This field can contain a user-specified ID generation algorithm
* If supplied, this will be used to generate a ID
* If not supplied (left empty), sha256base64 will be used
* The algorithm consists of two parts:
* 1, a hash function
* 2, a decoding used to decode user (string) input to bytes
* Currently, SHA256 with BASE64 is supported (e.g. idGenerationAlg='sha256base64')
*
*
* optional string id_generation_alg = 2;
*/
public java.lang.String getIdGenerationAlg() {
java.lang.Object ref = idGenerationAlg_;
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();
idGenerationAlg_ = s;
return s;
}
}
/**
*
* This field can contain a user-specified ID generation algorithm
* If supplied, this will be used to generate a ID
* If not supplied (left empty), sha256base64 will be used
* The algorithm consists of two parts:
* 1, a hash function
* 2, a decoding used to decode user (string) input to bytes
* Currently, SHA256 with BASE64 is supported (e.g. idGenerationAlg='sha256base64')
*
*
* optional string id_generation_alg = 2;
*/
public com.google.protobuf.ByteString
getIdGenerationAlgBytes() {
java.lang.Object ref = idGenerationAlg_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
idGenerationAlg_ = 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 (chaincodeSpec_ != null) {
output.writeMessage(1, getChaincodeSpec());
}
if (!getIdGenerationAlgBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, idGenerationAlg_);
}
}
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 (!getIdGenerationAlgBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, idGenerationAlg_);
}
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.ChaincodeInvocationSpec)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInvocationSpec other = (org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInvocationSpec) obj;
boolean result = true;
result = result && (hasChaincodeSpec() == other.hasChaincodeSpec());
if (hasChaincodeSpec()) {
result = result && getChaincodeSpec()
.equals(other.getChaincodeSpec());
}
result = result && getIdGenerationAlg()
.equals(other.getIdGenerationAlg());
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptorForType().hashCode();
if (hasChaincodeSpec()) {
hash = (37 * hash) + CHAINCODE_SPEC_FIELD_NUMBER;
hash = (53 * hash) + getChaincodeSpec().hashCode();
}
hash = (37 * hash) + ID_GENERATION_ALG_FIELD_NUMBER;
hash = (53 * hash) + getIdGenerationAlg().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
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);
}
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);
}
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;
}
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) {
}
}
public Builder clear() {
super.clear();
if (chaincodeSpecBuilder_ == null) {
chaincodeSpec_ = null;
} else {
chaincodeSpec_ = null;
chaincodeSpecBuilder_ = null;
}
idGenerationAlg_ = "";
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.peer.Chaincode.internal_static_protos_ChaincodeInvocationSpec_descriptor;
}
public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInvocationSpec getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInvocationSpec.getDefaultInstance();
}
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;
}
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();
}
result.idGenerationAlg_ = idGenerationAlg_;
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.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());
}
if (!other.getIdGenerationAlg().isEmpty()) {
idGenerationAlg_ = other.idGenerationAlg_;
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.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_ = null;
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_;
/**
* optional .protos.ChaincodeSpec chaincode_spec = 1;
*/
public boolean hasChaincodeSpec() {
return chaincodeSpecBuilder_ != null || chaincodeSpec_ != null;
}
/**
* optional .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();
}
}
/**
* optional .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;
}
/**
* optional .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;
}
/**
* optional .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;
}
/**
* optional .protos.ChaincodeSpec chaincode_spec = 1;
*/
public Builder clearChaincodeSpec() {
if (chaincodeSpecBuilder_ == null) {
chaincodeSpec_ = null;
onChanged();
} else {
chaincodeSpec_ = null;
chaincodeSpecBuilder_ = null;
}
return this;
}
/**
* optional .protos.ChaincodeSpec chaincode_spec = 1;
*/
public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec.Builder getChaincodeSpecBuilder() {
onChanged();
return getChaincodeSpecFieldBuilder().getBuilder();
}
/**
* optional .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_;
}
}
/**
* optional .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 java.lang.Object idGenerationAlg_ = "";
/**
*
* This field can contain a user-specified ID generation algorithm
* If supplied, this will be used to generate a ID
* If not supplied (left empty), sha256base64 will be used
* The algorithm consists of two parts:
* 1, a hash function
* 2, a decoding used to decode user (string) input to bytes
* Currently, SHA256 with BASE64 is supported (e.g. idGenerationAlg='sha256base64')
*
*
* optional string id_generation_alg = 2;
*/
public java.lang.String getIdGenerationAlg() {
java.lang.Object ref = idGenerationAlg_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
idGenerationAlg_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* This field can contain a user-specified ID generation algorithm
* If supplied, this will be used to generate a ID
* If not supplied (left empty), sha256base64 will be used
* The algorithm consists of two parts:
* 1, a hash function
* 2, a decoding used to decode user (string) input to bytes
* Currently, SHA256 with BASE64 is supported (e.g. idGenerationAlg='sha256base64')
*
*
* optional string id_generation_alg = 2;
*/
public com.google.protobuf.ByteString
getIdGenerationAlgBytes() {
java.lang.Object ref = idGenerationAlg_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
idGenerationAlg_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* This field can contain a user-specified ID generation algorithm
* If supplied, this will be used to generate a ID
* If not supplied (left empty), sha256base64 will be used
* The algorithm consists of two parts:
* 1, a hash function
* 2, a decoding used to decode user (string) input to bytes
* Currently, SHA256 with BASE64 is supported (e.g. idGenerationAlg='sha256base64')
*
*
* optional string id_generation_alg = 2;
*/
public Builder setIdGenerationAlg(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
idGenerationAlg_ = value;
onChanged();
return this;
}
/**
*
* This field can contain a user-specified ID generation algorithm
* If supplied, this will be used to generate a ID
* If not supplied (left empty), sha256base64 will be used
* The algorithm consists of two parts:
* 1, a hash function
* 2, a decoding used to decode user (string) input to bytes
* Currently, SHA256 with BASE64 is supported (e.g. idGenerationAlg='sha256base64')
*
*
* optional string id_generation_alg = 2;
*/
public Builder clearIdGenerationAlg() {
idGenerationAlg_ = getDefaultInstance().getIdGenerationAlg();
onChanged();
return this;
}
/**
*
* This field can contain a user-specified ID generation algorithm
* If supplied, this will be used to generate a ID
* If not supplied (left empty), sha256base64 will be used
* The algorithm consists of two parts:
* 1, a hash function
* 2, a decoding used to decode user (string) input to bytes
* Currently, SHA256 with BASE64 is supported (e.g. idGenerationAlg='sha256base64')
*
*
* optional string id_generation_alg = 2;
*/
public Builder setIdGenerationAlgBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
idGenerationAlg_ = 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.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() {
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;
}
public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeInvocationSpec 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;
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\037google/p" +
"rotobuf/timestamp.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\"\220\001\n\016ChaincodeInput\022\014\n\004args\030\001 \003(\014\022<\n\013" +
"decorations\030\002 \003(\0132\'.protos.ChaincodeInpu" +
"t.DecorationsEntry\0322\n\020DecorationsEntry\022\013" +
"\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\014:\0028\001\"\334\001\n\rChain" +
"codeSpec\022(\n\004type\030\001 \001(\0162\032.protos.Chaincod" +
"eSpec.Type\022)\n\014chaincode_id\030\002 \001(\0132\023.proto" +
"s.ChaincodeID\022%\n\005input\030\003 \001(\0132\026.protos.Ch",
"aincodeInput\022\017\n\007timeout\030\004 \001(\005\">\n\004Type\022\r\n" +
"\tUNDEFINED\020\000\022\n\n\006GOLANG\020\001\022\010\n\004NODE\020\002\022\007\n\003CA" +
"R\020\003\022\010\n\004JAVA\020\004\"\212\002\n\027ChaincodeDeploymentSpe" +
"c\022-\n\016chaincode_spec\030\001 \001(\0132\025.protos.Chain" +
"codeSpec\0222\n\016effective_date\030\002 \001(\0132\032.googl" +
"e.protobuf.Timestamp\022\024\n\014code_package\030\003 \001" +
"(\014\022F\n\010exec_env\030\004 \001(\01624.protos.ChaincodeD" +
"eploymentSpec.ExecutionEnvironment\".\n\024Ex" +
"ecutionEnvironment\022\n\n\006DOCKER\020\000\022\n\n\006SYSTEM" +
"\020\001\"c\n\027ChaincodeInvocationSpec\022-\n\016chainco",
"de_spec\030\001 \001(\0132\025.protos.ChaincodeSpec\022\031\n\021" +
"id_generation_alg\030\002 \001(\t*4\n\024Confidentiali" +
"tyLevel\022\n\n\006PUBLIC\020\000\022\020\n\014CONFIDENTIAL\020\001BO\n" +
"\"org.hyperledger.fabric.protos.peerZ)git" +
"hub.com/hyperledger/fabric/protos/peerb\006" +
"proto3"
};
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() {
public com.google.protobuf.ExtensionRegistry assignDescriptors(
com.google.protobuf.Descriptors.FileDescriptor root) {
descriptor = root;
return null;
}
};
com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
com.google.protobuf.TimestampProto.getDescriptor(),
}, assigner);
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", });
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", "EffectiveDate", "CodePackage", "ExecEnv", });
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", "IdGenerationAlg", });
com.google.protobuf.TimestampProto.getDescriptor();
}
// @@protoc_insertion_point(outer_class_scope)
}