All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.hyperledger.fabric.protos.peer.ChaincodeSpec Maven / Gradle / Ivy

// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: peer/chaincode.proto

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.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:protos.ChaincodeSpec) ChaincodeSpecOrBuilder { private static final long serialVersionUID = 0L; // Use ChaincodeSpec.newBuilder() to construct. private ChaincodeSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private ChaincodeSpec() { type_ = 0; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new ChaincodeSpec(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private ChaincodeSpec( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 8: { int rawValue = input.readEnum(); type_ = rawValue; break; } case 18: { org.hyperledger.fabric.protos.peer.ChaincodeID.Builder subBuilder = null; if (chaincodeId_ != null) { subBuilder = chaincodeId_.toBuilder(); } chaincodeId_ = input.readMessage(org.hyperledger.fabric.protos.peer.ChaincodeID.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(chaincodeId_); chaincodeId_ = subBuilder.buildPartial(); } break; } case 26: { org.hyperledger.fabric.protos.peer.ChaincodeInput.Builder subBuilder = null; if (input_ != null) { subBuilder = input_.toBuilder(); } input_ = input.readMessage(org.hyperledger.fabric.protos.peer.ChaincodeInput.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(input_); input_ = subBuilder.buildPartial(); } break; } case 32: { timeout_ = input.readInt32(); break; } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.hyperledger.fabric.protos.peer.ChaincodeProto.internal_static_protos_ChaincodeSpec_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.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), ; /** * 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) } public static final int TYPE_FIELD_NUMBER = 1; private int type_; /** * .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() { @SuppressWarnings("deprecation") org.hyperledger.fabric.protos.peer.ChaincodeSpec.Type result = org.hyperledger.fabric.protos.peer.ChaincodeSpec.Type.valueOf(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 chaincodeId_ != null; } /** * .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 getChaincodeId(); } 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 input_ != null; } /** * .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 getInput(); } public static final int TIMEOUT_FIELD_NUMBER = 4; private int timeout_; /** * 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 (chaincodeId_ != null) { output.writeMessage(2, getChaincodeId()); } if (input_ != null) { output.writeMessage(3, getInput()); } if (timeout_ != 0) { output.writeInt32(4, timeout_); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (type_ != org.hyperledger.fabric.protos.peer.ChaincodeSpec.Type.UNDEFINED.getNumber()) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(1, type_); } if (chaincodeId_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, getChaincodeId()); } if (input_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, getInput()); } if (timeout_ != 0) { size += com.google.protobuf.CodedOutputStream .computeInt32Size(4, timeout_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof org.hyperledger.fabric.protos.peer.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 (!unknownFields.equals(other.unknownFields)) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + TYPE_FIELD_NUMBER; hash = (53 * hash) + type_; if (hasChaincodeId()) { hash = (37 * hash) + CHAINCODE_ID_FIELD_NUMBER; hash = (53 * hash) + getChaincodeId().hashCode(); } if (hasInput()) { hash = (37 * hash) + INPUT_FIELD_NUMBER; hash = (53 * hash) + getInput().hashCode(); } hash = (37 * hash) + TIMEOUT_FIELD_NUMBER; hash = (53 * hash) + getTimeout(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static org.hyperledger.fabric.protos.peer.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.GeneratedMessageV3 .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.GeneratedMessageV3 .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.GeneratedMessageV3 .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.GeneratedMessageV3 .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.GeneratedMessageV3 .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.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(org.hyperledger.fabric.protos.peer.ChaincodeSpec prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** *
   * Carries the chaincode specification. This is the actual metadata required for
   * defining a chaincode.
   * 
* * Protobuf type {@code protos.ChaincodeSpec} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:protos.ChaincodeSpec) org.hyperledger.fabric.protos.peer.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.GeneratedMessageV3.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.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } @java.lang.Override public Builder clear() { super.clear(); type_ = 0; if (chaincodeIdBuilder_ == null) { chaincodeId_ = null; } else { chaincodeId_ = null; chaincodeIdBuilder_ = null; } if (inputBuilder_ == null) { input_ = null; } else { input_ = null; inputBuilder_ = null; } timeout_ = 0; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.hyperledger.fabric.protos.peer.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); result.type_ = type_; if (chaincodeIdBuilder_ == null) { result.chaincodeId_ = chaincodeId_; } else { result.chaincodeId_ = chaincodeIdBuilder_.build(); } if (inputBuilder_ == null) { result.input_ = input_; } else { result.input_ = inputBuilder_.build(); } result.timeout_ = timeout_; onBuilt(); return result; } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.hyperledger.fabric.protos.peer.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.unknownFields); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { org.hyperledger.fabric.protos.peer.ChaincodeSpec parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (org.hyperledger.fabric.protos.peer.ChaincodeSpec) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } 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; 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() { @SuppressWarnings("deprecation") org.hyperledger.fabric.protos.peer.ChaincodeSpec.Type result = org.hyperledger.fabric.protos.peer.ChaincodeSpec.Type.valueOf(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(); } type_ = value.getNumber(); onChanged(); return this; } /** * .protos.ChaincodeSpec.Type type = 1 [json_name = "type"]; * @return This builder for chaining. */ public Builder clearType() { type_ = 0; onChanged(); return this; } private org.hyperledger.fabric.protos.peer.ChaincodeID chaincodeId_; private com.google.protobuf.SingleFieldBuilderV3< 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 chaincodeIdBuilder_ != null || chaincodeId_ != null; } /** * .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; onChanged(); } else { chaincodeIdBuilder_.setMessage(value); } 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(); onChanged(); } else { chaincodeIdBuilder_.setMessage(builderForValue.build()); } return this; } /** * .protos.ChaincodeID chaincode_id = 2 [json_name = "chaincodeId"]; */ public Builder mergeChaincodeId(org.hyperledger.fabric.protos.peer.ChaincodeID value) { if (chaincodeIdBuilder_ == null) { if (chaincodeId_ != null) { chaincodeId_ = org.hyperledger.fabric.protos.peer.ChaincodeID.newBuilder(chaincodeId_).mergeFrom(value).buildPartial(); } else { chaincodeId_ = value; } onChanged(); } else { chaincodeIdBuilder_.mergeFrom(value); } return this; } /** * .protos.ChaincodeID chaincode_id = 2 [json_name = "chaincodeId"]; */ public Builder clearChaincodeId() { if (chaincodeIdBuilder_ == null) { chaincodeId_ = null; onChanged(); } else { chaincodeId_ = null; chaincodeIdBuilder_ = null; } return this; } /** * .protos.ChaincodeID chaincode_id = 2 [json_name = "chaincodeId"]; */ public org.hyperledger.fabric.protos.peer.ChaincodeID.Builder getChaincodeIdBuilder() { 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.SingleFieldBuilderV3< 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.SingleFieldBuilderV3< 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.SingleFieldBuilderV3< 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 inputBuilder_ != null || input_ != null; } /** * .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; onChanged(); } else { inputBuilder_.setMessage(value); } 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(); onChanged(); } else { inputBuilder_.setMessage(builderForValue.build()); } return this; } /** * .protos.ChaincodeInput input = 3 [json_name = "input"]; */ public Builder mergeInput(org.hyperledger.fabric.protos.peer.ChaincodeInput value) { if (inputBuilder_ == null) { if (input_ != null) { input_ = org.hyperledger.fabric.protos.peer.ChaincodeInput.newBuilder(input_).mergeFrom(value).buildPartial(); } else { input_ = value; } onChanged(); } else { inputBuilder_.mergeFrom(value); } return this; } /** * .protos.ChaincodeInput input = 3 [json_name = "input"]; */ public Builder clearInput() { if (inputBuilder_ == null) { input_ = null; onChanged(); } else { input_ = null; inputBuilder_ = null; } return this; } /** * .protos.ChaincodeInput input = 3 [json_name = "input"]; */ public org.hyperledger.fabric.protos.peer.ChaincodeInput.Builder getInputBuilder() { 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.SingleFieldBuilderV3< 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.SingleFieldBuilderV3< 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; onChanged(); return this; } /** * int32 timeout = 4 [json_name = "timeout"]; * @return This builder for chaining. */ public Builder clearTimeout() { timeout_ = 0; onChanged(); return this; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:protos.ChaincodeSpec) } // @@protoc_insertion_point(class_scope:protos.ChaincodeSpec) private static final org.hyperledger.fabric.protos.peer.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 { return new ChaincodeSpec(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public org.hyperledger.fabric.protos.peer.ChaincodeSpec getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy