org.hyperledger.fabric.protos.peer.ChaincodeSpec Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: peer/chaincode.proto
// Protobuf Java Version: 4.28.2
package org.hyperledger.fabric.protos.peer;
/**
*
* Carries the chaincode specification. This is the actual metadata required for
* defining a chaincode.
*
*
* Protobuf type {@code protos.ChaincodeSpec}
*/
public final class ChaincodeSpec extends
com.google.protobuf.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:protos.ChaincodeSpec)
ChaincodeSpecOrBuilder {
private static final long serialVersionUID = 0L;
static {
com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
/* major= */ 4,
/* minor= */ 28,
/* patch= */ 2,
/* suffix= */ "",
ChaincodeSpec.class.getName());
}
// Use ChaincodeSpec.newBuilder() to construct.
private ChaincodeSpec(com.google.protobuf.GeneratedMessage.Builder> builder) {
super(builder);
}
private ChaincodeSpec() {
type_ = 0;
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.ChaincodeProto.internal_static_protos_ChaincodeSpec_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.peer.ChaincodeProto.internal_static_protos_ChaincodeSpec_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.peer.ChaincodeSpec.class, org.hyperledger.fabric.protos.peer.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),
;
static {
com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
/* major= */ 4,
/* minor= */ 28,
/* patch= */ 2,
/* suffix= */ "",
Type.class.getName());
}
/**
* 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;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static Type valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire 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() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
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.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)
}
private int bitField0_;
public static final int TYPE_FIELD_NUMBER = 1;
private int type_ = 0;
/**
* .protos.ChaincodeSpec.Type type = 1 [json_name = "type"];
* @return The enum numeric value on the wire for type.
*/
@java.lang.Override public int getTypeValue() {
return type_;
}
/**
* .protos.ChaincodeSpec.Type type = 1 [json_name = "type"];
* @return The type.
*/
@java.lang.Override public org.hyperledger.fabric.protos.peer.ChaincodeSpec.Type getType() {
org.hyperledger.fabric.protos.peer.ChaincodeSpec.Type result = org.hyperledger.fabric.protos.peer.ChaincodeSpec.Type.forNumber(type_);
return result == null ? org.hyperledger.fabric.protos.peer.ChaincodeSpec.Type.UNRECOGNIZED : result;
}
public static final int CHAINCODE_ID_FIELD_NUMBER = 2;
private org.hyperledger.fabric.protos.peer.ChaincodeID chaincodeId_;
/**
* .protos.ChaincodeID chaincode_id = 2 [json_name = "chaincodeId"];
* @return Whether the chaincodeId field is set.
*/
@java.lang.Override
public boolean hasChaincodeId() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
* .protos.ChaincodeID chaincode_id = 2 [json_name = "chaincodeId"];
* @return The chaincodeId.
*/
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ChaincodeID getChaincodeId() {
return chaincodeId_ == null ? org.hyperledger.fabric.protos.peer.ChaincodeID.getDefaultInstance() : chaincodeId_;
}
/**
* .protos.ChaincodeID chaincode_id = 2 [json_name = "chaincodeId"];
*/
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ChaincodeIDOrBuilder getChaincodeIdOrBuilder() {
return chaincodeId_ == null ? org.hyperledger.fabric.protos.peer.ChaincodeID.getDefaultInstance() : chaincodeId_;
}
public static final int INPUT_FIELD_NUMBER = 3;
private org.hyperledger.fabric.protos.peer.ChaincodeInput input_;
/**
* .protos.ChaincodeInput input = 3 [json_name = "input"];
* @return Whether the input field is set.
*/
@java.lang.Override
public boolean hasInput() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
* .protos.ChaincodeInput input = 3 [json_name = "input"];
* @return The input.
*/
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ChaincodeInput getInput() {
return input_ == null ? org.hyperledger.fabric.protos.peer.ChaincodeInput.getDefaultInstance() : input_;
}
/**
* .protos.ChaincodeInput input = 3 [json_name = "input"];
*/
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ChaincodeInputOrBuilder getInputOrBuilder() {
return input_ == null ? org.hyperledger.fabric.protos.peer.ChaincodeInput.getDefaultInstance() : input_;
}
public static final int TIMEOUT_FIELD_NUMBER = 4;
private int timeout_ = 0;
/**
* int32 timeout = 4 [json_name = "timeout"];
* @return The timeout.
*/
@java.lang.Override
public int getTimeout() {
return timeout_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (type_ != org.hyperledger.fabric.protos.peer.ChaincodeSpec.Type.UNDEFINED.getNumber()) {
output.writeEnum(1, type_);
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(2, getChaincodeId());
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeMessage(3, getInput());
}
if (timeout_ != 0) {
output.writeInt32(4, timeout_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (type_ != org.hyperledger.fabric.protos.peer.ChaincodeSpec.Type.UNDEFINED.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(1, type_);
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getChaincodeId());
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getInput());
}
if (timeout_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(4, timeout_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.hyperledger.fabric.protos.peer.ChaincodeSpec)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.peer.ChaincodeSpec other = (org.hyperledger.fabric.protos.peer.ChaincodeSpec) obj;
if (type_ != other.type_) return false;
if (hasChaincodeId() != other.hasChaincodeId()) return false;
if (hasChaincodeId()) {
if (!getChaincodeId()
.equals(other.getChaincodeId())) return false;
}
if (hasInput() != other.hasInput()) return false;
if (hasInput()) {
if (!getInput()
.equals(other.getInput())) return false;
}
if (getTimeout()
!= other.getTimeout()) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + TYPE_FIELD_NUMBER;
hash = (53 * hash) + type_;
if (hasChaincodeId()) {
hash = (37 * hash) + CHAINCODE_ID_FIELD_NUMBER;
hash = (53 * hash) + getChaincodeId().hashCode();
}
if (hasInput()) {
hash = (37 * hash) + INPUT_FIELD_NUMBER;
hash = (53 * hash) + getInput().hashCode();
}
hash = (37 * hash) + TIMEOUT_FIELD_NUMBER;
hash = (53 * hash) + getTimeout();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.peer.ChaincodeSpec parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.ChaincodeSpec parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.peer.ChaincodeSpec parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.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.ChaincodeSpec parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.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.ChaincodeSpec parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.peer.ChaincodeSpec parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static org.hyperledger.fabric.protos.peer.ChaincodeSpec parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.peer.ChaincodeSpec parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static org.hyperledger.fabric.protos.peer.ChaincodeSpec parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.peer.ChaincodeSpec parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.hyperledger.fabric.protos.peer.ChaincodeSpec prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.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.GeneratedMessage.Builder implements
// @@protoc_insertion_point(builder_implements:protos.ChaincodeSpec)
org.hyperledger.fabric.protos.peer.ChaincodeSpecOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.ChaincodeProto.internal_static_protos_ChaincodeSpec_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.peer.ChaincodeProto.internal_static_protos_ChaincodeSpec_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.peer.ChaincodeSpec.class, org.hyperledger.fabric.protos.peer.ChaincodeSpec.Builder.class);
}
// Construct using org.hyperledger.fabric.protos.peer.ChaincodeSpec.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessage
.alwaysUseFieldBuilders) {
getChaincodeIdFieldBuilder();
getInputFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
type_ = 0;
chaincodeId_ = null;
if (chaincodeIdBuilder_ != null) {
chaincodeIdBuilder_.dispose();
chaincodeIdBuilder_ = null;
}
input_ = null;
if (inputBuilder_ != null) {
inputBuilder_.dispose();
inputBuilder_ = null;
}
timeout_ = 0;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.peer.ChaincodeProto.internal_static_protos_ChaincodeSpec_descriptor;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ChaincodeSpec getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.peer.ChaincodeSpec.getDefaultInstance();
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ChaincodeSpec build() {
org.hyperledger.fabric.protos.peer.ChaincodeSpec result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ChaincodeSpec buildPartial() {
org.hyperledger.fabric.protos.peer.ChaincodeSpec result = new org.hyperledger.fabric.protos.peer.ChaincodeSpec(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(org.hyperledger.fabric.protos.peer.ChaincodeSpec result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.type_ = type_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000002) != 0)) {
result.chaincodeId_ = chaincodeIdBuilder_ == null
? chaincodeId_
: chaincodeIdBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.input_ = inputBuilder_ == null
? input_
: inputBuilder_.build();
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.timeout_ = timeout_;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.fabric.protos.peer.ChaincodeSpec) {
return mergeFrom((org.hyperledger.fabric.protos.peer.ChaincodeSpec)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.fabric.protos.peer.ChaincodeSpec other) {
if (other == org.hyperledger.fabric.protos.peer.ChaincodeSpec.getDefaultInstance()) return this;
if (other.type_ != 0) {
setTypeValue(other.getTypeValue());
}
if (other.hasChaincodeId()) {
mergeChaincodeId(other.getChaincodeId());
}
if (other.hasInput()) {
mergeInput(other.getInput());
}
if (other.getTimeout() != 0) {
setTimeout(other.getTimeout());
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
type_ = input.readEnum();
bitField0_ |= 0x00000001;
break;
} // case 8
case 18: {
input.readMessage(
getChaincodeIdFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000002;
break;
} // case 18
case 26: {
input.readMessage(
getInputFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000004;
break;
} // case 26
case 32: {
timeout_ = input.readInt32();
bitField0_ |= 0x00000008;
break;
} // case 32
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private int type_ = 0;
/**
* .protos.ChaincodeSpec.Type type = 1 [json_name = "type"];
* @return The enum numeric value on the wire for type.
*/
@java.lang.Override public int getTypeValue() {
return type_;
}
/**
* .protos.ChaincodeSpec.Type type = 1 [json_name = "type"];
* @param value The enum numeric value on the wire for type to set.
* @return This builder for chaining.
*/
public Builder setTypeValue(int value) {
type_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* .protos.ChaincodeSpec.Type type = 1 [json_name = "type"];
* @return The type.
*/
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ChaincodeSpec.Type getType() {
org.hyperledger.fabric.protos.peer.ChaincodeSpec.Type result = org.hyperledger.fabric.protos.peer.ChaincodeSpec.Type.forNumber(type_);
return result == null ? org.hyperledger.fabric.protos.peer.ChaincodeSpec.Type.UNRECOGNIZED : result;
}
/**
* .protos.ChaincodeSpec.Type type = 1 [json_name = "type"];
* @param value The type to set.
* @return This builder for chaining.
*/
public Builder setType(org.hyperledger.fabric.protos.peer.ChaincodeSpec.Type value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
type_ = value.getNumber();
onChanged();
return this;
}
/**
* .protos.ChaincodeSpec.Type type = 1 [json_name = "type"];
* @return This builder for chaining.
*/
public Builder clearType() {
bitField0_ = (bitField0_ & ~0x00000001);
type_ = 0;
onChanged();
return this;
}
private org.hyperledger.fabric.protos.peer.ChaincodeID chaincodeId_;
private com.google.protobuf.SingleFieldBuilder<
org.hyperledger.fabric.protos.peer.ChaincodeID, org.hyperledger.fabric.protos.peer.ChaincodeID.Builder, org.hyperledger.fabric.protos.peer.ChaincodeIDOrBuilder> chaincodeIdBuilder_;
/**
* .protos.ChaincodeID chaincode_id = 2 [json_name = "chaincodeId"];
* @return Whether the chaincodeId field is set.
*/
public boolean hasChaincodeId() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
* .protos.ChaincodeID chaincode_id = 2 [json_name = "chaincodeId"];
* @return The chaincodeId.
*/
public org.hyperledger.fabric.protos.peer.ChaincodeID getChaincodeId() {
if (chaincodeIdBuilder_ == null) {
return chaincodeId_ == null ? org.hyperledger.fabric.protos.peer.ChaincodeID.getDefaultInstance() : chaincodeId_;
} else {
return chaincodeIdBuilder_.getMessage();
}
}
/**
* .protos.ChaincodeID chaincode_id = 2 [json_name = "chaincodeId"];
*/
public Builder setChaincodeId(org.hyperledger.fabric.protos.peer.ChaincodeID value) {
if (chaincodeIdBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
chaincodeId_ = value;
} else {
chaincodeIdBuilder_.setMessage(value);
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* .protos.ChaincodeID chaincode_id = 2 [json_name = "chaincodeId"];
*/
public Builder setChaincodeId(
org.hyperledger.fabric.protos.peer.ChaincodeID.Builder builderForValue) {
if (chaincodeIdBuilder_ == null) {
chaincodeId_ = builderForValue.build();
} else {
chaincodeIdBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* .protos.ChaincodeID chaincode_id = 2 [json_name = "chaincodeId"];
*/
public Builder mergeChaincodeId(org.hyperledger.fabric.protos.peer.ChaincodeID value) {
if (chaincodeIdBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0) &&
chaincodeId_ != null &&
chaincodeId_ != org.hyperledger.fabric.protos.peer.ChaincodeID.getDefaultInstance()) {
getChaincodeIdBuilder().mergeFrom(value);
} else {
chaincodeId_ = value;
}
} else {
chaincodeIdBuilder_.mergeFrom(value);
}
if (chaincodeId_ != null) {
bitField0_ |= 0x00000002;
onChanged();
}
return this;
}
/**
* .protos.ChaincodeID chaincode_id = 2 [json_name = "chaincodeId"];
*/
public Builder clearChaincodeId() {
bitField0_ = (bitField0_ & ~0x00000002);
chaincodeId_ = null;
if (chaincodeIdBuilder_ != null) {
chaincodeIdBuilder_.dispose();
chaincodeIdBuilder_ = null;
}
onChanged();
return this;
}
/**
* .protos.ChaincodeID chaincode_id = 2 [json_name = "chaincodeId"];
*/
public org.hyperledger.fabric.protos.peer.ChaincodeID.Builder getChaincodeIdBuilder() {
bitField0_ |= 0x00000002;
onChanged();
return getChaincodeIdFieldBuilder().getBuilder();
}
/**
* .protos.ChaincodeID chaincode_id = 2 [json_name = "chaincodeId"];
*/
public org.hyperledger.fabric.protos.peer.ChaincodeIDOrBuilder getChaincodeIdOrBuilder() {
if (chaincodeIdBuilder_ != null) {
return chaincodeIdBuilder_.getMessageOrBuilder();
} else {
return chaincodeId_ == null ?
org.hyperledger.fabric.protos.peer.ChaincodeID.getDefaultInstance() : chaincodeId_;
}
}
/**
* .protos.ChaincodeID chaincode_id = 2 [json_name = "chaincodeId"];
*/
private com.google.protobuf.SingleFieldBuilder<
org.hyperledger.fabric.protos.peer.ChaincodeID, org.hyperledger.fabric.protos.peer.ChaincodeID.Builder, org.hyperledger.fabric.protos.peer.ChaincodeIDOrBuilder>
getChaincodeIdFieldBuilder() {
if (chaincodeIdBuilder_ == null) {
chaincodeIdBuilder_ = new com.google.protobuf.SingleFieldBuilder<
org.hyperledger.fabric.protos.peer.ChaincodeID, org.hyperledger.fabric.protos.peer.ChaincodeID.Builder, org.hyperledger.fabric.protos.peer.ChaincodeIDOrBuilder>(
getChaincodeId(),
getParentForChildren(),
isClean());
chaincodeId_ = null;
}
return chaincodeIdBuilder_;
}
private org.hyperledger.fabric.protos.peer.ChaincodeInput input_;
private com.google.protobuf.SingleFieldBuilder<
org.hyperledger.fabric.protos.peer.ChaincodeInput, org.hyperledger.fabric.protos.peer.ChaincodeInput.Builder, org.hyperledger.fabric.protos.peer.ChaincodeInputOrBuilder> inputBuilder_;
/**
* .protos.ChaincodeInput input = 3 [json_name = "input"];
* @return Whether the input field is set.
*/
public boolean hasInput() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
* .protos.ChaincodeInput input = 3 [json_name = "input"];
* @return The input.
*/
public org.hyperledger.fabric.protos.peer.ChaincodeInput getInput() {
if (inputBuilder_ == null) {
return input_ == null ? org.hyperledger.fabric.protos.peer.ChaincodeInput.getDefaultInstance() : input_;
} else {
return inputBuilder_.getMessage();
}
}
/**
* .protos.ChaincodeInput input = 3 [json_name = "input"];
*/
public Builder setInput(org.hyperledger.fabric.protos.peer.ChaincodeInput value) {
if (inputBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
input_ = value;
} else {
inputBuilder_.setMessage(value);
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
* .protos.ChaincodeInput input = 3 [json_name = "input"];
*/
public Builder setInput(
org.hyperledger.fabric.protos.peer.ChaincodeInput.Builder builderForValue) {
if (inputBuilder_ == null) {
input_ = builderForValue.build();
} else {
inputBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
* .protos.ChaincodeInput input = 3 [json_name = "input"];
*/
public Builder mergeInput(org.hyperledger.fabric.protos.peer.ChaincodeInput value) {
if (inputBuilder_ == null) {
if (((bitField0_ & 0x00000004) != 0) &&
input_ != null &&
input_ != org.hyperledger.fabric.protos.peer.ChaincodeInput.getDefaultInstance()) {
getInputBuilder().mergeFrom(value);
} else {
input_ = value;
}
} else {
inputBuilder_.mergeFrom(value);
}
if (input_ != null) {
bitField0_ |= 0x00000004;
onChanged();
}
return this;
}
/**
* .protos.ChaincodeInput input = 3 [json_name = "input"];
*/
public Builder clearInput() {
bitField0_ = (bitField0_ & ~0x00000004);
input_ = null;
if (inputBuilder_ != null) {
inputBuilder_.dispose();
inputBuilder_ = null;
}
onChanged();
return this;
}
/**
* .protos.ChaincodeInput input = 3 [json_name = "input"];
*/
public org.hyperledger.fabric.protos.peer.ChaincodeInput.Builder getInputBuilder() {
bitField0_ |= 0x00000004;
onChanged();
return getInputFieldBuilder().getBuilder();
}
/**
* .protos.ChaincodeInput input = 3 [json_name = "input"];
*/
public org.hyperledger.fabric.protos.peer.ChaincodeInputOrBuilder getInputOrBuilder() {
if (inputBuilder_ != null) {
return inputBuilder_.getMessageOrBuilder();
} else {
return input_ == null ?
org.hyperledger.fabric.protos.peer.ChaincodeInput.getDefaultInstance() : input_;
}
}
/**
* .protos.ChaincodeInput input = 3 [json_name = "input"];
*/
private com.google.protobuf.SingleFieldBuilder<
org.hyperledger.fabric.protos.peer.ChaincodeInput, org.hyperledger.fabric.protos.peer.ChaincodeInput.Builder, org.hyperledger.fabric.protos.peer.ChaincodeInputOrBuilder>
getInputFieldBuilder() {
if (inputBuilder_ == null) {
inputBuilder_ = new com.google.protobuf.SingleFieldBuilder<
org.hyperledger.fabric.protos.peer.ChaincodeInput, org.hyperledger.fabric.protos.peer.ChaincodeInput.Builder, org.hyperledger.fabric.protos.peer.ChaincodeInputOrBuilder>(
getInput(),
getParentForChildren(),
isClean());
input_ = null;
}
return inputBuilder_;
}
private int timeout_ ;
/**
* int32 timeout = 4 [json_name = "timeout"];
* @return The timeout.
*/
@java.lang.Override
public int getTimeout() {
return timeout_;
}
/**
* int32 timeout = 4 [json_name = "timeout"];
* @param value The timeout to set.
* @return This builder for chaining.
*/
public Builder setTimeout(int value) {
timeout_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
* int32 timeout = 4 [json_name = "timeout"];
* @return This builder for chaining.
*/
public Builder clearTimeout() {
bitField0_ = (bitField0_ & ~0x00000008);
timeout_ = 0;
onChanged();
return this;
}
// @@protoc_insertion_point(builder_scope:protos.ChaincodeSpec)
}
// @@protoc_insertion_point(class_scope:protos.ChaincodeSpec)
private static final org.hyperledger.fabric.protos.peer.ChaincodeSpec DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.peer.ChaincodeSpec();
}
public static org.hyperledger.fabric.protos.peer.ChaincodeSpec getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ChaincodeSpec parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.ChaincodeSpec getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy