org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: peer/lifecycle/lifecycle.proto
// Protobuf Java Version: 4.28.2
package org.hyperledger.fabric.protos.peer.lifecycle;
/**
*
* QueryInstalledChaincodesResult is the message returned by
* '_lifecycle.QueryInstalledChaincodes'. It returns a list of installed
* chaincodes, including a map of channel name to chaincode name and version
* pairs of chaincode definitions that reference this chaincode package.
*
*
* Protobuf type {@code lifecycle.QueryInstalledChaincodesResult}
*/
public final class QueryInstalledChaincodesResult extends
com.google.protobuf.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:lifecycle.QueryInstalledChaincodesResult)
QueryInstalledChaincodesResultOrBuilder {
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= */ "",
QueryInstalledChaincodesResult.class.getName());
}
// Use QueryInstalledChaincodesResult.newBuilder() to construct.
private QueryInstalledChaincodesResult(com.google.protobuf.GeneratedMessage.Builder> builder) {
super(builder);
}
private QueryInstalledChaincodesResult() {
installedChaincodes_ = java.util.Collections.emptyList();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.lifecycle.LifecycleProto.internal_static_lifecycle_QueryInstalledChaincodesResult_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.peer.lifecycle.LifecycleProto.internal_static_lifecycle_QueryInstalledChaincodesResult_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.class, org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.Builder.class);
}
public interface InstalledChaincodeOrBuilder extends
// @@protoc_insertion_point(interface_extends:lifecycle.QueryInstalledChaincodesResult.InstalledChaincode)
com.google.protobuf.MessageOrBuilder {
/**
* string package_id = 1 [json_name = "packageId"];
* @return The packageId.
*/
java.lang.String getPackageId();
/**
* string package_id = 1 [json_name = "packageId"];
* @return The bytes for packageId.
*/
com.google.protobuf.ByteString
getPackageIdBytes();
/**
* string label = 2 [json_name = "label"];
* @return The label.
*/
java.lang.String getLabel();
/**
* string label = 2 [json_name = "label"];
* @return The bytes for label.
*/
com.google.protobuf.ByteString
getLabelBytes();
/**
* map<string, .lifecycle.QueryInstalledChaincodesResult.References> references = 3 [json_name = "references"];
*/
int getReferencesCount();
/**
* map<string, .lifecycle.QueryInstalledChaincodesResult.References> references = 3 [json_name = "references"];
*/
boolean containsReferences(
java.lang.String key);
/**
* Use {@link #getReferencesMap()} instead.
*/
@java.lang.Deprecated
java.util.Map
getReferences();
/**
* map<string, .lifecycle.QueryInstalledChaincodesResult.References> references = 3 [json_name = "references"];
*/
java.util.Map
getReferencesMap();
/**
* map<string, .lifecycle.QueryInstalledChaincodesResult.References> references = 3 [json_name = "references"];
*/
/* nullable */
org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.References getReferencesOrDefault(
java.lang.String key,
/* nullable */
org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.References defaultValue);
/**
* map<string, .lifecycle.QueryInstalledChaincodesResult.References> references = 3 [json_name = "references"];
*/
org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.References getReferencesOrThrow(
java.lang.String key);
}
/**
* Protobuf type {@code lifecycle.QueryInstalledChaincodesResult.InstalledChaincode}
*/
public static final class InstalledChaincode extends
com.google.protobuf.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:lifecycle.QueryInstalledChaincodesResult.InstalledChaincode)
InstalledChaincodeOrBuilder {
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= */ "",
InstalledChaincode.class.getName());
}
// Use InstalledChaincode.newBuilder() to construct.
private InstalledChaincode(com.google.protobuf.GeneratedMessage.Builder> builder) {
super(builder);
}
private InstalledChaincode() {
packageId_ = "";
label_ = "";
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.lifecycle.LifecycleProto.internal_static_lifecycle_QueryInstalledChaincodesResult_InstalledChaincode_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
int number) {
switch (number) {
case 3:
return internalGetReferences();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.peer.lifecycle.LifecycleProto.internal_static_lifecycle_QueryInstalledChaincodesResult_InstalledChaincode_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.InstalledChaincode.class, org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.InstalledChaincode.Builder.class);
}
public static final int PACKAGE_ID_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object packageId_ = "";
/**
* string package_id = 1 [json_name = "packageId"];
* @return The packageId.
*/
@java.lang.Override
public java.lang.String getPackageId() {
java.lang.Object ref = packageId_;
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();
packageId_ = s;
return s;
}
}
/**
* string package_id = 1 [json_name = "packageId"];
* @return The bytes for packageId.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getPackageIdBytes() {
java.lang.Object ref = packageId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
packageId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int LABEL_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object label_ = "";
/**
* string label = 2 [json_name = "label"];
* @return The label.
*/
@java.lang.Override
public java.lang.String getLabel() {
java.lang.Object ref = label_;
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();
label_ = s;
return s;
}
}
/**
* string label = 2 [json_name = "label"];
* @return The bytes for label.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getLabelBytes() {
java.lang.Object ref = label_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
label_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int REFERENCES_FIELD_NUMBER = 3;
private static final class ReferencesDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.String, org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.References> defaultEntry =
com.google.protobuf.MapEntry
.newDefaultInstance(
org.hyperledger.fabric.protos.peer.lifecycle.LifecycleProto.internal_static_lifecycle_QueryInstalledChaincodesResult_InstalledChaincode_ReferencesEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.MESSAGE,
org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.References.getDefaultInstance());
}
@SuppressWarnings("serial")
private com.google.protobuf.MapField<
java.lang.String, org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.References> references_;
private com.google.protobuf.MapField
internalGetReferences() {
if (references_ == null) {
return com.google.protobuf.MapField.emptyMapField(
ReferencesDefaultEntryHolder.defaultEntry);
}
return references_;
}
public int getReferencesCount() {
return internalGetReferences().getMap().size();
}
/**
* map<string, .lifecycle.QueryInstalledChaincodesResult.References> references = 3 [json_name = "references"];
*/
@java.lang.Override
public boolean containsReferences(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetReferences().getMap().containsKey(key);
}
/**
* Use {@link #getReferencesMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getReferences() {
return getReferencesMap();
}
/**
* map<string, .lifecycle.QueryInstalledChaincodesResult.References> references = 3 [json_name = "references"];
*/
@java.lang.Override
public java.util.Map getReferencesMap() {
return internalGetReferences().getMap();
}
/**
* map<string, .lifecycle.QueryInstalledChaincodesResult.References> references = 3 [json_name = "references"];
*/
@java.lang.Override
public /* nullable */
org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.References getReferencesOrDefault(
java.lang.String key,
/* nullable */
org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.References defaultValue) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetReferences().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
* map<string, .lifecycle.QueryInstalledChaincodesResult.References> references = 3 [json_name = "references"];
*/
@java.lang.Override
public org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.References getReferencesOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetReferences().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(packageId_)) {
com.google.protobuf.GeneratedMessage.writeString(output, 1, packageId_);
}
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(label_)) {
com.google.protobuf.GeneratedMessage.writeString(output, 2, label_);
}
com.google.protobuf.GeneratedMessage
.serializeStringMapTo(
output,
internalGetReferences(),
ReferencesDefaultEntryHolder.defaultEntry,
3);
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(packageId_)) {
size += com.google.protobuf.GeneratedMessage.computeStringSize(1, packageId_);
}
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(label_)) {
size += com.google.protobuf.GeneratedMessage.computeStringSize(2, label_);
}
for (java.util.Map.Entry entry
: internalGetReferences().getMap().entrySet()) {
com.google.protobuf.MapEntry
references__ = ReferencesDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, references__);
}
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.lifecycle.QueryInstalledChaincodesResult.InstalledChaincode)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.InstalledChaincode other = (org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.InstalledChaincode) obj;
if (!getPackageId()
.equals(other.getPackageId())) return false;
if (!getLabel()
.equals(other.getLabel())) return false;
if (!internalGetReferences().equals(
other.internalGetReferences())) 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) + PACKAGE_ID_FIELD_NUMBER;
hash = (53 * hash) + getPackageId().hashCode();
hash = (37 * hash) + LABEL_FIELD_NUMBER;
hash = (53 * hash) + getLabel().hashCode();
if (!internalGetReferences().getMap().isEmpty()) {
hash = (37 * hash) + REFERENCES_FIELD_NUMBER;
hash = (53 * hash) + internalGetReferences().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.InstalledChaincode parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.InstalledChaincode 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.lifecycle.QueryInstalledChaincodesResult.InstalledChaincode parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.InstalledChaincode 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.lifecycle.QueryInstalledChaincodesResult.InstalledChaincode parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.InstalledChaincode 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.lifecycle.QueryInstalledChaincodesResult.InstalledChaincode parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.InstalledChaincode 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.lifecycle.QueryInstalledChaincodesResult.InstalledChaincode parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.InstalledChaincode 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.lifecycle.QueryInstalledChaincodesResult.InstalledChaincode 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.lifecycle.QueryInstalledChaincodesResult.InstalledChaincode 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.lifecycle.QueryInstalledChaincodesResult.InstalledChaincode 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;
}
/**
* Protobuf type {@code lifecycle.QueryInstalledChaincodesResult.InstalledChaincode}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder implements
// @@protoc_insertion_point(builder_implements:lifecycle.QueryInstalledChaincodesResult.InstalledChaincode)
org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.InstalledChaincodeOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.lifecycle.LifecycleProto.internal_static_lifecycle_QueryInstalledChaincodesResult_InstalledChaincode_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
int number) {
switch (number) {
case 3:
return internalGetReferences();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(
int number) {
switch (number) {
case 3:
return internalGetMutableReferences();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.peer.lifecycle.LifecycleProto.internal_static_lifecycle_QueryInstalledChaincodesResult_InstalledChaincode_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.InstalledChaincode.class, org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.InstalledChaincode.Builder.class);
}
// Construct using org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.InstalledChaincode.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
packageId_ = "";
label_ = "";
internalGetMutableReferences().clear();
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.peer.lifecycle.LifecycleProto.internal_static_lifecycle_QueryInstalledChaincodesResult_InstalledChaincode_descriptor;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.InstalledChaincode getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.InstalledChaincode.getDefaultInstance();
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.InstalledChaincode build() {
org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.InstalledChaincode result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.InstalledChaincode buildPartial() {
org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.InstalledChaincode result = new org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.InstalledChaincode(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.InstalledChaincode result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.packageId_ = packageId_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.label_ = label_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.references_ = internalGetReferences().build(ReferencesDefaultEntryHolder.defaultEntry);
}
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.InstalledChaincode) {
return mergeFrom((org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.InstalledChaincode)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.InstalledChaincode other) {
if (other == org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.InstalledChaincode.getDefaultInstance()) return this;
if (!other.getPackageId().isEmpty()) {
packageId_ = other.packageId_;
bitField0_ |= 0x00000001;
onChanged();
}
if (!other.getLabel().isEmpty()) {
label_ = other.label_;
bitField0_ |= 0x00000002;
onChanged();
}
internalGetMutableReferences().mergeFrom(
other.internalGetReferences());
bitField0_ |= 0x00000004;
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 10: {
packageId_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
label_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
case 26: {
com.google.protobuf.MapEntry
references__ = input.readMessage(
ReferencesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
internalGetMutableReferences().ensureBuilderMap().put(
references__.getKey(), references__.getValue());
bitField0_ |= 0x00000004;
break;
} // case 26
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 java.lang.Object packageId_ = "";
/**
* string package_id = 1 [json_name = "packageId"];
* @return The packageId.
*/
public java.lang.String getPackageId() {
java.lang.Object ref = packageId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
packageId_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string package_id = 1 [json_name = "packageId"];
* @return The bytes for packageId.
*/
public com.google.protobuf.ByteString
getPackageIdBytes() {
java.lang.Object ref = packageId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
packageId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string package_id = 1 [json_name = "packageId"];
* @param value The packageId to set.
* @return This builder for chaining.
*/
public Builder setPackageId(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
packageId_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* string package_id = 1 [json_name = "packageId"];
* @return This builder for chaining.
*/
public Builder clearPackageId() {
packageId_ = getDefaultInstance().getPackageId();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
* string package_id = 1 [json_name = "packageId"];
* @param value The bytes for packageId to set.
* @return This builder for chaining.
*/
public Builder setPackageIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
packageId_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.lang.Object label_ = "";
/**
* string label = 2 [json_name = "label"];
* @return The label.
*/
public java.lang.String getLabel() {
java.lang.Object ref = label_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
label_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string label = 2 [json_name = "label"];
* @return The bytes for label.
*/
public com.google.protobuf.ByteString
getLabelBytes() {
java.lang.Object ref = label_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
label_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string label = 2 [json_name = "label"];
* @param value The label to set.
* @return This builder for chaining.
*/
public Builder setLabel(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
label_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* string label = 2 [json_name = "label"];
* @return This builder for chaining.
*/
public Builder clearLabel() {
label_ = getDefaultInstance().getLabel();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
* string label = 2 [json_name = "label"];
* @param value The bytes for label to set.
* @return This builder for chaining.
*/
public Builder setLabelBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
label_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private static final class ReferencesConverter implements com.google.protobuf.MapFieldBuilder.Converter {
@java.lang.Override
public org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.References build(org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.ReferencesOrBuilder val) {
if (val instanceof org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.References) { return (org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.References) val; }
return ((org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.References.Builder) val).build();
}
@java.lang.Override
public com.google.protobuf.MapEntry defaultEntry() {
return ReferencesDefaultEntryHolder.defaultEntry;
}
};
private static final ReferencesConverter referencesConverter = new ReferencesConverter();
private com.google.protobuf.MapFieldBuilder<
java.lang.String, org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.ReferencesOrBuilder, org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.References, org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.References.Builder> references_;
private com.google.protobuf.MapFieldBuilder
internalGetReferences() {
if (references_ == null) {
return new com.google.protobuf.MapFieldBuilder<>(referencesConverter);
}
return references_;
}
private com.google.protobuf.MapFieldBuilder
internalGetMutableReferences() {
if (references_ == null) {
references_ = new com.google.protobuf.MapFieldBuilder<>(referencesConverter);
}
bitField0_ |= 0x00000004;
onChanged();
return references_;
}
public int getReferencesCount() {
return internalGetReferences().ensureBuilderMap().size();
}
/**
* map<string, .lifecycle.QueryInstalledChaincodesResult.References> references = 3 [json_name = "references"];
*/
@java.lang.Override
public boolean containsReferences(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetReferences().ensureBuilderMap().containsKey(key);
}
/**
* Use {@link #getReferencesMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getReferences() {
return getReferencesMap();
}
/**
* map<string, .lifecycle.QueryInstalledChaincodesResult.References> references = 3 [json_name = "references"];
*/
@java.lang.Override
public java.util.Map getReferencesMap() {
return internalGetReferences().getImmutableMap();
}
/**
* map<string, .lifecycle.QueryInstalledChaincodesResult.References> references = 3 [json_name = "references"];
*/
@java.lang.Override
public /* nullable */
org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.References getReferencesOrDefault(
java.lang.String key,
/* nullable */
org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.References defaultValue) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map = internalGetMutableReferences().ensureBuilderMap();
return map.containsKey(key) ? referencesConverter.build(map.get(key)) : defaultValue;
}
/**
* map<string, .lifecycle.QueryInstalledChaincodesResult.References> references = 3 [json_name = "references"];
*/
@java.lang.Override
public org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.References getReferencesOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map = internalGetMutableReferences().ensureBuilderMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return referencesConverter.build(map.get(key));
}
public Builder clearReferences() {
bitField0_ = (bitField0_ & ~0x00000004);
internalGetMutableReferences().clear();
return this;
}
/**
* map<string, .lifecycle.QueryInstalledChaincodesResult.References> references = 3 [json_name = "references"];
*/
public Builder removeReferences(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
internalGetMutableReferences().ensureBuilderMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutableReferences() {
bitField0_ |= 0x00000004;
return internalGetMutableReferences().ensureMessageMap();
}
/**
* map<string, .lifecycle.QueryInstalledChaincodesResult.References> references = 3 [json_name = "references"];
*/
public Builder putReferences(
java.lang.String key,
org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.References value) {
if (key == null) { throw new NullPointerException("map key"); }
if (value == null) { throw new NullPointerException("map value"); }
internalGetMutableReferences().ensureBuilderMap()
.put(key, value);
bitField0_ |= 0x00000004;
return this;
}
/**
* map<string, .lifecycle.QueryInstalledChaincodesResult.References> references = 3 [json_name = "references"];
*/
public Builder putAllReferences(
java.util.Map values) {
for (java.util.Map.Entry e : values.entrySet()) {
if (e.getKey() == null || e.getValue() == null) {
throw new NullPointerException();
}
}
internalGetMutableReferences().ensureBuilderMap()
.putAll(values);
bitField0_ |= 0x00000004;
return this;
}
/**
* map<string, .lifecycle.QueryInstalledChaincodesResult.References> references = 3 [json_name = "references"];
*/
public org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.References.Builder putReferencesBuilderIfAbsent(
java.lang.String key) {
java.util.Map builderMap = internalGetMutableReferences().ensureBuilderMap();
org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.ReferencesOrBuilder entry = builderMap.get(key);
if (entry == null) {
entry = org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.References.newBuilder();
builderMap.put(key, entry);
}
if (entry instanceof org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.References) {
entry = ((org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.References) entry).toBuilder();
builderMap.put(key, entry);
}
return (org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.References.Builder) entry;
}
// @@protoc_insertion_point(builder_scope:lifecycle.QueryInstalledChaincodesResult.InstalledChaincode)
}
// @@protoc_insertion_point(class_scope:lifecycle.QueryInstalledChaincodesResult.InstalledChaincode)
private static final org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.InstalledChaincode DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.InstalledChaincode();
}
public static org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.InstalledChaincode getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public InstalledChaincode 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.lifecycle.QueryInstalledChaincodesResult.InstalledChaincode getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ReferencesOrBuilder extends
// @@protoc_insertion_point(interface_extends:lifecycle.QueryInstalledChaincodesResult.References)
com.google.protobuf.MessageOrBuilder {
/**
* repeated .lifecycle.QueryInstalledChaincodesResult.Chaincode chaincodes = 1 [json_name = "chaincodes"];
*/
java.util.List
getChaincodesList();
/**
* repeated .lifecycle.QueryInstalledChaincodesResult.Chaincode chaincodes = 1 [json_name = "chaincodes"];
*/
org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.Chaincode getChaincodes(int index);
/**
* repeated .lifecycle.QueryInstalledChaincodesResult.Chaincode chaincodes = 1 [json_name = "chaincodes"];
*/
int getChaincodesCount();
/**
* repeated .lifecycle.QueryInstalledChaincodesResult.Chaincode chaincodes = 1 [json_name = "chaincodes"];
*/
java.util.List extends org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.ChaincodeOrBuilder>
getChaincodesOrBuilderList();
/**
* repeated .lifecycle.QueryInstalledChaincodesResult.Chaincode chaincodes = 1 [json_name = "chaincodes"];
*/
org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.ChaincodeOrBuilder getChaincodesOrBuilder(
int index);
}
/**
* Protobuf type {@code lifecycle.QueryInstalledChaincodesResult.References}
*/
public static final class References extends
com.google.protobuf.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:lifecycle.QueryInstalledChaincodesResult.References)
ReferencesOrBuilder {
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= */ "",
References.class.getName());
}
// Use References.newBuilder() to construct.
private References(com.google.protobuf.GeneratedMessage.Builder> builder) {
super(builder);
}
private References() {
chaincodes_ = java.util.Collections.emptyList();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.lifecycle.LifecycleProto.internal_static_lifecycle_QueryInstalledChaincodesResult_References_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.peer.lifecycle.LifecycleProto.internal_static_lifecycle_QueryInstalledChaincodesResult_References_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.References.class, org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.References.Builder.class);
}
public static final int CHAINCODES_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private java.util.List chaincodes_;
/**
* repeated .lifecycle.QueryInstalledChaincodesResult.Chaincode chaincodes = 1 [json_name = "chaincodes"];
*/
@java.lang.Override
public java.util.List getChaincodesList() {
return chaincodes_;
}
/**
* repeated .lifecycle.QueryInstalledChaincodesResult.Chaincode chaincodes = 1 [json_name = "chaincodes"];
*/
@java.lang.Override
public java.util.List extends org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.ChaincodeOrBuilder>
getChaincodesOrBuilderList() {
return chaincodes_;
}
/**
* repeated .lifecycle.QueryInstalledChaincodesResult.Chaincode chaincodes = 1 [json_name = "chaincodes"];
*/
@java.lang.Override
public int getChaincodesCount() {
return chaincodes_.size();
}
/**
* repeated .lifecycle.QueryInstalledChaincodesResult.Chaincode chaincodes = 1 [json_name = "chaincodes"];
*/
@java.lang.Override
public org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.Chaincode getChaincodes(int index) {
return chaincodes_.get(index);
}
/**
* repeated .lifecycle.QueryInstalledChaincodesResult.Chaincode chaincodes = 1 [json_name = "chaincodes"];
*/
@java.lang.Override
public org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.ChaincodeOrBuilder getChaincodesOrBuilder(
int index) {
return chaincodes_.get(index);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
for (int i = 0; i < chaincodes_.size(); i++) {
output.writeMessage(1, chaincodes_.get(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < chaincodes_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, chaincodes_.get(i));
}
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.lifecycle.QueryInstalledChaincodesResult.References)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.References other = (org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.References) obj;
if (!getChaincodesList()
.equals(other.getChaincodesList())) 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();
if (getChaincodesCount() > 0) {
hash = (37 * hash) + CHAINCODES_FIELD_NUMBER;
hash = (53 * hash) + getChaincodesList().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.References parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.References 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.lifecycle.QueryInstalledChaincodesResult.References parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.References 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.lifecycle.QueryInstalledChaincodesResult.References parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.References 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.lifecycle.QueryInstalledChaincodesResult.References parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.References 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.lifecycle.QueryInstalledChaincodesResult.References parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.References 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.lifecycle.QueryInstalledChaincodesResult.References 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.lifecycle.QueryInstalledChaincodesResult.References 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.lifecycle.QueryInstalledChaincodesResult.References 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;
}
/**
* Protobuf type {@code lifecycle.QueryInstalledChaincodesResult.References}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder implements
// @@protoc_insertion_point(builder_implements:lifecycle.QueryInstalledChaincodesResult.References)
org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.ReferencesOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.lifecycle.LifecycleProto.internal_static_lifecycle_QueryInstalledChaincodesResult_References_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.peer.lifecycle.LifecycleProto.internal_static_lifecycle_QueryInstalledChaincodesResult_References_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.References.class, org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.References.Builder.class);
}
// Construct using org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.References.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
if (chaincodesBuilder_ == null) {
chaincodes_ = java.util.Collections.emptyList();
} else {
chaincodes_ = null;
chaincodesBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.peer.lifecycle.LifecycleProto.internal_static_lifecycle_QueryInstalledChaincodesResult_References_descriptor;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.References getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.References.getDefaultInstance();
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.References build() {
org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.References result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.References buildPartial() {
org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.References result = new org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.References(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartialRepeatedFields(org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.References result) {
if (chaincodesBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
chaincodes_ = java.util.Collections.unmodifiableList(chaincodes_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.chaincodes_ = chaincodes_;
} else {
result.chaincodes_ = chaincodesBuilder_.build();
}
}
private void buildPartial0(org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.References result) {
int from_bitField0_ = bitField0_;
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.References) {
return mergeFrom((org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.References)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.References other) {
if (other == org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.References.getDefaultInstance()) return this;
if (chaincodesBuilder_ == null) {
if (!other.chaincodes_.isEmpty()) {
if (chaincodes_.isEmpty()) {
chaincodes_ = other.chaincodes_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureChaincodesIsMutable();
chaincodes_.addAll(other.chaincodes_);
}
onChanged();
}
} else {
if (!other.chaincodes_.isEmpty()) {
if (chaincodesBuilder_.isEmpty()) {
chaincodesBuilder_.dispose();
chaincodesBuilder_ = null;
chaincodes_ = other.chaincodes_;
bitField0_ = (bitField0_ & ~0x00000001);
chaincodesBuilder_ =
com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
getChaincodesFieldBuilder() : null;
} else {
chaincodesBuilder_.addAllMessages(other.chaincodes_);
}
}
}
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 10: {
org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.Chaincode m =
input.readMessage(
org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.Chaincode.parser(),
extensionRegistry);
if (chaincodesBuilder_ == null) {
ensureChaincodesIsMutable();
chaincodes_.add(m);
} else {
chaincodesBuilder_.addMessage(m);
}
break;
} // case 10
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 java.util.List chaincodes_ =
java.util.Collections.emptyList();
private void ensureChaincodesIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
chaincodes_ = new java.util.ArrayList(chaincodes_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilder<
org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.Chaincode, org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.Chaincode.Builder, org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.ChaincodeOrBuilder> chaincodesBuilder_;
/**
* repeated .lifecycle.QueryInstalledChaincodesResult.Chaincode chaincodes = 1 [json_name = "chaincodes"];
*/
public java.util.List getChaincodesList() {
if (chaincodesBuilder_ == null) {
return java.util.Collections.unmodifiableList(chaincodes_);
} else {
return chaincodesBuilder_.getMessageList();
}
}
/**
* repeated .lifecycle.QueryInstalledChaincodesResult.Chaincode chaincodes = 1 [json_name = "chaincodes"];
*/
public int getChaincodesCount() {
if (chaincodesBuilder_ == null) {
return chaincodes_.size();
} else {
return chaincodesBuilder_.getCount();
}
}
/**
* repeated .lifecycle.QueryInstalledChaincodesResult.Chaincode chaincodes = 1 [json_name = "chaincodes"];
*/
public org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.Chaincode getChaincodes(int index) {
if (chaincodesBuilder_ == null) {
return chaincodes_.get(index);
} else {
return chaincodesBuilder_.getMessage(index);
}
}
/**
* repeated .lifecycle.QueryInstalledChaincodesResult.Chaincode chaincodes = 1 [json_name = "chaincodes"];
*/
public Builder setChaincodes(
int index, org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.Chaincode value) {
if (chaincodesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureChaincodesIsMutable();
chaincodes_.set(index, value);
onChanged();
} else {
chaincodesBuilder_.setMessage(index, value);
}
return this;
}
/**
* repeated .lifecycle.QueryInstalledChaincodesResult.Chaincode chaincodes = 1 [json_name = "chaincodes"];
*/
public Builder setChaincodes(
int index, org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.Chaincode.Builder builderForValue) {
if (chaincodesBuilder_ == null) {
ensureChaincodesIsMutable();
chaincodes_.set(index, builderForValue.build());
onChanged();
} else {
chaincodesBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .lifecycle.QueryInstalledChaincodesResult.Chaincode chaincodes = 1 [json_name = "chaincodes"];
*/
public Builder addChaincodes(org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.Chaincode value) {
if (chaincodesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureChaincodesIsMutable();
chaincodes_.add(value);
onChanged();
} else {
chaincodesBuilder_.addMessage(value);
}
return this;
}
/**
* repeated .lifecycle.QueryInstalledChaincodesResult.Chaincode chaincodes = 1 [json_name = "chaincodes"];
*/
public Builder addChaincodes(
int index, org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.Chaincode value) {
if (chaincodesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureChaincodesIsMutable();
chaincodes_.add(index, value);
onChanged();
} else {
chaincodesBuilder_.addMessage(index, value);
}
return this;
}
/**
* repeated .lifecycle.QueryInstalledChaincodesResult.Chaincode chaincodes = 1 [json_name = "chaincodes"];
*/
public Builder addChaincodes(
org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.Chaincode.Builder builderForValue) {
if (chaincodesBuilder_ == null) {
ensureChaincodesIsMutable();
chaincodes_.add(builderForValue.build());
onChanged();
} else {
chaincodesBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* repeated .lifecycle.QueryInstalledChaincodesResult.Chaincode chaincodes = 1 [json_name = "chaincodes"];
*/
public Builder addChaincodes(
int index, org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.Chaincode.Builder builderForValue) {
if (chaincodesBuilder_ == null) {
ensureChaincodesIsMutable();
chaincodes_.add(index, builderForValue.build());
onChanged();
} else {
chaincodesBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .lifecycle.QueryInstalledChaincodesResult.Chaincode chaincodes = 1 [json_name = "chaincodes"];
*/
public Builder addAllChaincodes(
java.lang.Iterable extends org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.Chaincode> values) {
if (chaincodesBuilder_ == null) {
ensureChaincodesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, chaincodes_);
onChanged();
} else {
chaincodesBuilder_.addAllMessages(values);
}
return this;
}
/**
* repeated .lifecycle.QueryInstalledChaincodesResult.Chaincode chaincodes = 1 [json_name = "chaincodes"];
*/
public Builder clearChaincodes() {
if (chaincodesBuilder_ == null) {
chaincodes_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
chaincodesBuilder_.clear();
}
return this;
}
/**
* repeated .lifecycle.QueryInstalledChaincodesResult.Chaincode chaincodes = 1 [json_name = "chaincodes"];
*/
public Builder removeChaincodes(int index) {
if (chaincodesBuilder_ == null) {
ensureChaincodesIsMutable();
chaincodes_.remove(index);
onChanged();
} else {
chaincodesBuilder_.remove(index);
}
return this;
}
/**
* repeated .lifecycle.QueryInstalledChaincodesResult.Chaincode chaincodes = 1 [json_name = "chaincodes"];
*/
public org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.Chaincode.Builder getChaincodesBuilder(
int index) {
return getChaincodesFieldBuilder().getBuilder(index);
}
/**
* repeated .lifecycle.QueryInstalledChaincodesResult.Chaincode chaincodes = 1 [json_name = "chaincodes"];
*/
public org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.ChaincodeOrBuilder getChaincodesOrBuilder(
int index) {
if (chaincodesBuilder_ == null) {
return chaincodes_.get(index); } else {
return chaincodesBuilder_.getMessageOrBuilder(index);
}
}
/**
* repeated .lifecycle.QueryInstalledChaincodesResult.Chaincode chaincodes = 1 [json_name = "chaincodes"];
*/
public java.util.List extends org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.ChaincodeOrBuilder>
getChaincodesOrBuilderList() {
if (chaincodesBuilder_ != null) {
return chaincodesBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(chaincodes_);
}
}
/**
* repeated .lifecycle.QueryInstalledChaincodesResult.Chaincode chaincodes = 1 [json_name = "chaincodes"];
*/
public org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.Chaincode.Builder addChaincodesBuilder() {
return getChaincodesFieldBuilder().addBuilder(
org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.Chaincode.getDefaultInstance());
}
/**
* repeated .lifecycle.QueryInstalledChaincodesResult.Chaincode chaincodes = 1 [json_name = "chaincodes"];
*/
public org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.Chaincode.Builder addChaincodesBuilder(
int index) {
return getChaincodesFieldBuilder().addBuilder(
index, org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.Chaincode.getDefaultInstance());
}
/**
* repeated .lifecycle.QueryInstalledChaincodesResult.Chaincode chaincodes = 1 [json_name = "chaincodes"];
*/
public java.util.List
getChaincodesBuilderList() {
return getChaincodesFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilder<
org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.Chaincode, org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.Chaincode.Builder, org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.ChaincodeOrBuilder>
getChaincodesFieldBuilder() {
if (chaincodesBuilder_ == null) {
chaincodesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.Chaincode, org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.Chaincode.Builder, org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.ChaincodeOrBuilder>(
chaincodes_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
chaincodes_ = null;
}
return chaincodesBuilder_;
}
// @@protoc_insertion_point(builder_scope:lifecycle.QueryInstalledChaincodesResult.References)
}
// @@protoc_insertion_point(class_scope:lifecycle.QueryInstalledChaincodesResult.References)
private static final org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.References DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.References();
}
public static org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.References getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public References 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.lifecycle.QueryInstalledChaincodesResult.References getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ChaincodeOrBuilder extends
// @@protoc_insertion_point(interface_extends:lifecycle.QueryInstalledChaincodesResult.Chaincode)
com.google.protobuf.MessageOrBuilder {
/**
* string name = 1 [json_name = "name"];
* @return The name.
*/
java.lang.String getName();
/**
* string name = 1 [json_name = "name"];
* @return The bytes for name.
*/
com.google.protobuf.ByteString
getNameBytes();
/**
* string version = 2 [json_name = "version"];
* @return The version.
*/
java.lang.String getVersion();
/**
* string version = 2 [json_name = "version"];
* @return The bytes for version.
*/
com.google.protobuf.ByteString
getVersionBytes();
}
/**
* Protobuf type {@code lifecycle.QueryInstalledChaincodesResult.Chaincode}
*/
public static final class Chaincode extends
com.google.protobuf.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:lifecycle.QueryInstalledChaincodesResult.Chaincode)
ChaincodeOrBuilder {
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= */ "",
Chaincode.class.getName());
}
// Use Chaincode.newBuilder() to construct.
private Chaincode(com.google.protobuf.GeneratedMessage.Builder> builder) {
super(builder);
}
private Chaincode() {
name_ = "";
version_ = "";
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.lifecycle.LifecycleProto.internal_static_lifecycle_QueryInstalledChaincodesResult_Chaincode_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.peer.lifecycle.LifecycleProto.internal_static_lifecycle_QueryInstalledChaincodesResult_Chaincode_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.Chaincode.class, org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.Chaincode.Builder.class);
}
public static final int NAME_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object name_ = "";
/**
* string name = 1 [json_name = "name"];
* @return The name.
*/
@java.lang.Override
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;
}
}
/**
* string name = 1 [json_name = "name"];
* @return The bytes for name.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int VERSION_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object version_ = "";
/**
* string version = 2 [json_name = "version"];
* @return The version.
*/
@java.lang.Override
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;
}
}
/**
* string version = 2 [json_name = "version"];
* @return The bytes for version.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getVersionBytes() {
java.lang.Object ref = version_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
version_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
com.google.protobuf.GeneratedMessage.writeString(output, 1, name_);
}
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(version_)) {
com.google.protobuf.GeneratedMessage.writeString(output, 2, version_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_);
}
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(version_)) {
size += com.google.protobuf.GeneratedMessage.computeStringSize(2, version_);
}
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.lifecycle.QueryInstalledChaincodesResult.Chaincode)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.Chaincode other = (org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.Chaincode) obj;
if (!getName()
.equals(other.getName())) return false;
if (!getVersion()
.equals(other.getVersion())) 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) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
hash = (37 * hash) + VERSION_FIELD_NUMBER;
hash = (53 * hash) + getVersion().hashCode();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.Chaincode parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.Chaincode 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.lifecycle.QueryInstalledChaincodesResult.Chaincode parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.Chaincode 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.lifecycle.QueryInstalledChaincodesResult.Chaincode parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.Chaincode 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.lifecycle.QueryInstalledChaincodesResult.Chaincode parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.Chaincode 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.lifecycle.QueryInstalledChaincodesResult.Chaincode parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.Chaincode 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.lifecycle.QueryInstalledChaincodesResult.Chaincode 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.lifecycle.QueryInstalledChaincodesResult.Chaincode 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.lifecycle.QueryInstalledChaincodesResult.Chaincode 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;
}
/**
* Protobuf type {@code lifecycle.QueryInstalledChaincodesResult.Chaincode}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder implements
// @@protoc_insertion_point(builder_implements:lifecycle.QueryInstalledChaincodesResult.Chaincode)
org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.ChaincodeOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.lifecycle.LifecycleProto.internal_static_lifecycle_QueryInstalledChaincodesResult_Chaincode_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.peer.lifecycle.LifecycleProto.internal_static_lifecycle_QueryInstalledChaincodesResult_Chaincode_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.Chaincode.class, org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.Chaincode.Builder.class);
}
// Construct using org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.Chaincode.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
name_ = "";
version_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.peer.lifecycle.LifecycleProto.internal_static_lifecycle_QueryInstalledChaincodesResult_Chaincode_descriptor;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.Chaincode getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.Chaincode.getDefaultInstance();
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.Chaincode build() {
org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.Chaincode result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.Chaincode buildPartial() {
org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.Chaincode result = new org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.Chaincode(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.Chaincode result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.name_ = name_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.version_ = version_;
}
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.Chaincode) {
return mergeFrom((org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.Chaincode)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.Chaincode other) {
if (other == org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.Chaincode.getDefaultInstance()) return this;
if (!other.getName().isEmpty()) {
name_ = other.name_;
bitField0_ |= 0x00000001;
onChanged();
}
if (!other.getVersion().isEmpty()) {
version_ = other.version_;
bitField0_ |= 0x00000002;
onChanged();
}
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 10: {
name_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
version_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
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 java.lang.Object name_ = "";
/**
* string name = 1 [json_name = "name"];
* @return The name.
*/
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;
}
}
/**
* string name = 1 [json_name = "name"];
* @return The bytes for name.
*/
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;
}
}
/**
* string name = 1 [json_name = "name"];
* @param value The name to set.
* @return This builder for chaining.
*/
public Builder setName(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
name_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* string name = 1 [json_name = "name"];
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
* string name = 1 [json_name = "name"];
* @param value The bytes for name to set.
* @return This builder for chaining.
*/
public Builder setNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
name_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.lang.Object version_ = "";
/**
* string version = 2 [json_name = "version"];
* @return The version.
*/
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;
}
}
/**
* string version = 2 [json_name = "version"];
* @return The bytes for version.
*/
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;
}
}
/**
* string version = 2 [json_name = "version"];
* @param value The version to set.
* @return This builder for chaining.
*/
public Builder setVersion(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
version_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* string version = 2 [json_name = "version"];
* @return This builder for chaining.
*/
public Builder clearVersion() {
version_ = getDefaultInstance().getVersion();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
* string version = 2 [json_name = "version"];
* @param value The bytes for version to set.
* @return This builder for chaining.
*/
public Builder setVersionBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
version_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
// @@protoc_insertion_point(builder_scope:lifecycle.QueryInstalledChaincodesResult.Chaincode)
}
// @@protoc_insertion_point(class_scope:lifecycle.QueryInstalledChaincodesResult.Chaincode)
private static final org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.Chaincode DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.Chaincode();
}
public static org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.Chaincode getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Chaincode 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.lifecycle.QueryInstalledChaincodesResult.Chaincode getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public static final int INSTALLED_CHAINCODES_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private java.util.List installedChaincodes_;
/**
* repeated .lifecycle.QueryInstalledChaincodesResult.InstalledChaincode installed_chaincodes = 1 [json_name = "installedChaincodes"];
*/
@java.lang.Override
public java.util.List getInstalledChaincodesList() {
return installedChaincodes_;
}
/**
* repeated .lifecycle.QueryInstalledChaincodesResult.InstalledChaincode installed_chaincodes = 1 [json_name = "installedChaincodes"];
*/
@java.lang.Override
public java.util.List extends org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.InstalledChaincodeOrBuilder>
getInstalledChaincodesOrBuilderList() {
return installedChaincodes_;
}
/**
* repeated .lifecycle.QueryInstalledChaincodesResult.InstalledChaincode installed_chaincodes = 1 [json_name = "installedChaincodes"];
*/
@java.lang.Override
public int getInstalledChaincodesCount() {
return installedChaincodes_.size();
}
/**
* repeated .lifecycle.QueryInstalledChaincodesResult.InstalledChaincode installed_chaincodes = 1 [json_name = "installedChaincodes"];
*/
@java.lang.Override
public org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.InstalledChaincode getInstalledChaincodes(int index) {
return installedChaincodes_.get(index);
}
/**
* repeated .lifecycle.QueryInstalledChaincodesResult.InstalledChaincode installed_chaincodes = 1 [json_name = "installedChaincodes"];
*/
@java.lang.Override
public org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.InstalledChaincodeOrBuilder getInstalledChaincodesOrBuilder(
int index) {
return installedChaincodes_.get(index);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
for (int i = 0; i < installedChaincodes_.size(); i++) {
output.writeMessage(1, installedChaincodes_.get(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < installedChaincodes_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, installedChaincodes_.get(i));
}
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.lifecycle.QueryInstalledChaincodesResult)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult other = (org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult) obj;
if (!getInstalledChaincodesList()
.equals(other.getInstalledChaincodesList())) 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();
if (getInstalledChaincodesCount() > 0) {
hash = (37 * hash) + INSTALLED_CHAINCODES_FIELD_NUMBER;
hash = (53 * hash) + getInstalledChaincodesList().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult 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.lifecycle.QueryInstalledChaincodesResult parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult 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.lifecycle.QueryInstalledChaincodesResult parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult 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.lifecycle.QueryInstalledChaincodesResult parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult 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.lifecycle.QueryInstalledChaincodesResult parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult 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.lifecycle.QueryInstalledChaincodesResult 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.lifecycle.QueryInstalledChaincodesResult 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.lifecycle.QueryInstalledChaincodesResult 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;
}
/**
*
* QueryInstalledChaincodesResult is the message returned by
* '_lifecycle.QueryInstalledChaincodes'. It returns a list of installed
* chaincodes, including a map of channel name to chaincode name and version
* pairs of chaincode definitions that reference this chaincode package.
*
*
* Protobuf type {@code lifecycle.QueryInstalledChaincodesResult}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder implements
// @@protoc_insertion_point(builder_implements:lifecycle.QueryInstalledChaincodesResult)
org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResultOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.peer.lifecycle.LifecycleProto.internal_static_lifecycle_QueryInstalledChaincodesResult_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.peer.lifecycle.LifecycleProto.internal_static_lifecycle_QueryInstalledChaincodesResult_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.class, org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.Builder.class);
}
// Construct using org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
if (installedChaincodesBuilder_ == null) {
installedChaincodes_ = java.util.Collections.emptyList();
} else {
installedChaincodes_ = null;
installedChaincodesBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.peer.lifecycle.LifecycleProto.internal_static_lifecycle_QueryInstalledChaincodesResult_descriptor;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.getDefaultInstance();
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult build() {
org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult buildPartial() {
org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult result = new org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartialRepeatedFields(org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult result) {
if (installedChaincodesBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
installedChaincodes_ = java.util.Collections.unmodifiableList(installedChaincodes_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.installedChaincodes_ = installedChaincodes_;
} else {
result.installedChaincodes_ = installedChaincodesBuilder_.build();
}
}
private void buildPartial0(org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult result) {
int from_bitField0_ = bitField0_;
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult) {
return mergeFrom((org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult other) {
if (other == org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.getDefaultInstance()) return this;
if (installedChaincodesBuilder_ == null) {
if (!other.installedChaincodes_.isEmpty()) {
if (installedChaincodes_.isEmpty()) {
installedChaincodes_ = other.installedChaincodes_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureInstalledChaincodesIsMutable();
installedChaincodes_.addAll(other.installedChaincodes_);
}
onChanged();
}
} else {
if (!other.installedChaincodes_.isEmpty()) {
if (installedChaincodesBuilder_.isEmpty()) {
installedChaincodesBuilder_.dispose();
installedChaincodesBuilder_ = null;
installedChaincodes_ = other.installedChaincodes_;
bitField0_ = (bitField0_ & ~0x00000001);
installedChaincodesBuilder_ =
com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
getInstalledChaincodesFieldBuilder() : null;
} else {
installedChaincodesBuilder_.addAllMessages(other.installedChaincodes_);
}
}
}
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 10: {
org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.InstalledChaincode m =
input.readMessage(
org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.InstalledChaincode.parser(),
extensionRegistry);
if (installedChaincodesBuilder_ == null) {
ensureInstalledChaincodesIsMutable();
installedChaincodes_.add(m);
} else {
installedChaincodesBuilder_.addMessage(m);
}
break;
} // case 10
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 java.util.List installedChaincodes_ =
java.util.Collections.emptyList();
private void ensureInstalledChaincodesIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
installedChaincodes_ = new java.util.ArrayList(installedChaincodes_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilder<
org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.InstalledChaincode, org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.InstalledChaincode.Builder, org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.InstalledChaincodeOrBuilder> installedChaincodesBuilder_;
/**
* repeated .lifecycle.QueryInstalledChaincodesResult.InstalledChaincode installed_chaincodes = 1 [json_name = "installedChaincodes"];
*/
public java.util.List getInstalledChaincodesList() {
if (installedChaincodesBuilder_ == null) {
return java.util.Collections.unmodifiableList(installedChaincodes_);
} else {
return installedChaincodesBuilder_.getMessageList();
}
}
/**
* repeated .lifecycle.QueryInstalledChaincodesResult.InstalledChaincode installed_chaincodes = 1 [json_name = "installedChaincodes"];
*/
public int getInstalledChaincodesCount() {
if (installedChaincodesBuilder_ == null) {
return installedChaincodes_.size();
} else {
return installedChaincodesBuilder_.getCount();
}
}
/**
* repeated .lifecycle.QueryInstalledChaincodesResult.InstalledChaincode installed_chaincodes = 1 [json_name = "installedChaincodes"];
*/
public org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.InstalledChaincode getInstalledChaincodes(int index) {
if (installedChaincodesBuilder_ == null) {
return installedChaincodes_.get(index);
} else {
return installedChaincodesBuilder_.getMessage(index);
}
}
/**
* repeated .lifecycle.QueryInstalledChaincodesResult.InstalledChaincode installed_chaincodes = 1 [json_name = "installedChaincodes"];
*/
public Builder setInstalledChaincodes(
int index, org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.InstalledChaincode value) {
if (installedChaincodesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureInstalledChaincodesIsMutable();
installedChaincodes_.set(index, value);
onChanged();
} else {
installedChaincodesBuilder_.setMessage(index, value);
}
return this;
}
/**
* repeated .lifecycle.QueryInstalledChaincodesResult.InstalledChaincode installed_chaincodes = 1 [json_name = "installedChaincodes"];
*/
public Builder setInstalledChaincodes(
int index, org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.InstalledChaincode.Builder builderForValue) {
if (installedChaincodesBuilder_ == null) {
ensureInstalledChaincodesIsMutable();
installedChaincodes_.set(index, builderForValue.build());
onChanged();
} else {
installedChaincodesBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .lifecycle.QueryInstalledChaincodesResult.InstalledChaincode installed_chaincodes = 1 [json_name = "installedChaincodes"];
*/
public Builder addInstalledChaincodes(org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.InstalledChaincode value) {
if (installedChaincodesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureInstalledChaincodesIsMutable();
installedChaincodes_.add(value);
onChanged();
} else {
installedChaincodesBuilder_.addMessage(value);
}
return this;
}
/**
* repeated .lifecycle.QueryInstalledChaincodesResult.InstalledChaincode installed_chaincodes = 1 [json_name = "installedChaincodes"];
*/
public Builder addInstalledChaincodes(
int index, org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.InstalledChaincode value) {
if (installedChaincodesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureInstalledChaincodesIsMutable();
installedChaincodes_.add(index, value);
onChanged();
} else {
installedChaincodesBuilder_.addMessage(index, value);
}
return this;
}
/**
* repeated .lifecycle.QueryInstalledChaincodesResult.InstalledChaincode installed_chaincodes = 1 [json_name = "installedChaincodes"];
*/
public Builder addInstalledChaincodes(
org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.InstalledChaincode.Builder builderForValue) {
if (installedChaincodesBuilder_ == null) {
ensureInstalledChaincodesIsMutable();
installedChaincodes_.add(builderForValue.build());
onChanged();
} else {
installedChaincodesBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* repeated .lifecycle.QueryInstalledChaincodesResult.InstalledChaincode installed_chaincodes = 1 [json_name = "installedChaincodes"];
*/
public Builder addInstalledChaincodes(
int index, org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.InstalledChaincode.Builder builderForValue) {
if (installedChaincodesBuilder_ == null) {
ensureInstalledChaincodesIsMutable();
installedChaincodes_.add(index, builderForValue.build());
onChanged();
} else {
installedChaincodesBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .lifecycle.QueryInstalledChaincodesResult.InstalledChaincode installed_chaincodes = 1 [json_name = "installedChaincodes"];
*/
public Builder addAllInstalledChaincodes(
java.lang.Iterable extends org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.InstalledChaincode> values) {
if (installedChaincodesBuilder_ == null) {
ensureInstalledChaincodesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, installedChaincodes_);
onChanged();
} else {
installedChaincodesBuilder_.addAllMessages(values);
}
return this;
}
/**
* repeated .lifecycle.QueryInstalledChaincodesResult.InstalledChaincode installed_chaincodes = 1 [json_name = "installedChaincodes"];
*/
public Builder clearInstalledChaincodes() {
if (installedChaincodesBuilder_ == null) {
installedChaincodes_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
installedChaincodesBuilder_.clear();
}
return this;
}
/**
* repeated .lifecycle.QueryInstalledChaincodesResult.InstalledChaincode installed_chaincodes = 1 [json_name = "installedChaincodes"];
*/
public Builder removeInstalledChaincodes(int index) {
if (installedChaincodesBuilder_ == null) {
ensureInstalledChaincodesIsMutable();
installedChaincodes_.remove(index);
onChanged();
} else {
installedChaincodesBuilder_.remove(index);
}
return this;
}
/**
* repeated .lifecycle.QueryInstalledChaincodesResult.InstalledChaincode installed_chaincodes = 1 [json_name = "installedChaincodes"];
*/
public org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.InstalledChaincode.Builder getInstalledChaincodesBuilder(
int index) {
return getInstalledChaincodesFieldBuilder().getBuilder(index);
}
/**
* repeated .lifecycle.QueryInstalledChaincodesResult.InstalledChaincode installed_chaincodes = 1 [json_name = "installedChaincodes"];
*/
public org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.InstalledChaincodeOrBuilder getInstalledChaincodesOrBuilder(
int index) {
if (installedChaincodesBuilder_ == null) {
return installedChaincodes_.get(index); } else {
return installedChaincodesBuilder_.getMessageOrBuilder(index);
}
}
/**
* repeated .lifecycle.QueryInstalledChaincodesResult.InstalledChaincode installed_chaincodes = 1 [json_name = "installedChaincodes"];
*/
public java.util.List extends org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.InstalledChaincodeOrBuilder>
getInstalledChaincodesOrBuilderList() {
if (installedChaincodesBuilder_ != null) {
return installedChaincodesBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(installedChaincodes_);
}
}
/**
* repeated .lifecycle.QueryInstalledChaincodesResult.InstalledChaincode installed_chaincodes = 1 [json_name = "installedChaincodes"];
*/
public org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.InstalledChaincode.Builder addInstalledChaincodesBuilder() {
return getInstalledChaincodesFieldBuilder().addBuilder(
org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.InstalledChaincode.getDefaultInstance());
}
/**
* repeated .lifecycle.QueryInstalledChaincodesResult.InstalledChaincode installed_chaincodes = 1 [json_name = "installedChaincodes"];
*/
public org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.InstalledChaincode.Builder addInstalledChaincodesBuilder(
int index) {
return getInstalledChaincodesFieldBuilder().addBuilder(
index, org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.InstalledChaincode.getDefaultInstance());
}
/**
* repeated .lifecycle.QueryInstalledChaincodesResult.InstalledChaincode installed_chaincodes = 1 [json_name = "installedChaincodes"];
*/
public java.util.List
getInstalledChaincodesBuilderList() {
return getInstalledChaincodesFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilder<
org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.InstalledChaincode, org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.InstalledChaincode.Builder, org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.InstalledChaincodeOrBuilder>
getInstalledChaincodesFieldBuilder() {
if (installedChaincodesBuilder_ == null) {
installedChaincodesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.InstalledChaincode, org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.InstalledChaincode.Builder, org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult.InstalledChaincodeOrBuilder>(
installedChaincodes_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
installedChaincodes_ = null;
}
return installedChaincodesBuilder_;
}
// @@protoc_insertion_point(builder_scope:lifecycle.QueryInstalledChaincodesResult)
}
// @@protoc_insertion_point(class_scope:lifecycle.QueryInstalledChaincodesResult)
private static final org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult();
}
public static org.hyperledger.fabric.protos.peer.lifecycle.QueryInstalledChaincodesResult getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public QueryInstalledChaincodesResult 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.lifecycle.QueryInstalledChaincodesResult getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy