org.hyperledger.fabric.protos.common.SignaturePolicyEnvelope Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: common/policies.proto
// Protobuf Java Version: 4.28.2
package org.hyperledger.fabric.protos.common;
/**
*
* SignaturePolicyEnvelope wraps a SignaturePolicy and includes a version for future enhancements
*
*
* Protobuf type {@code common.SignaturePolicyEnvelope}
*/
public final class SignaturePolicyEnvelope extends
com.google.protobuf.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:common.SignaturePolicyEnvelope)
SignaturePolicyEnvelopeOrBuilder {
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= */ "",
SignaturePolicyEnvelope.class.getName());
}
// Use SignaturePolicyEnvelope.newBuilder() to construct.
private SignaturePolicyEnvelope(com.google.protobuf.GeneratedMessage.Builder> builder) {
super(builder);
}
private SignaturePolicyEnvelope() {
identities_ = java.util.Collections.emptyList();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.common.PoliciesProto.internal_static_common_SignaturePolicyEnvelope_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.common.PoliciesProto.internal_static_common_SignaturePolicyEnvelope_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.common.SignaturePolicyEnvelope.class, org.hyperledger.fabric.protos.common.SignaturePolicyEnvelope.Builder.class);
}
private int bitField0_;
public static final int VERSION_FIELD_NUMBER = 1;
private int version_ = 0;
/**
* int32 version = 1 [json_name = "version"];
* @return The version.
*/
@java.lang.Override
public int getVersion() {
return version_;
}
public static final int RULE_FIELD_NUMBER = 2;
private org.hyperledger.fabric.protos.common.SignaturePolicy rule_;
/**
* .common.SignaturePolicy rule = 2 [json_name = "rule"];
* @return Whether the rule field is set.
*/
@java.lang.Override
public boolean hasRule() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
* .common.SignaturePolicy rule = 2 [json_name = "rule"];
* @return The rule.
*/
@java.lang.Override
public org.hyperledger.fabric.protos.common.SignaturePolicy getRule() {
return rule_ == null ? org.hyperledger.fabric.protos.common.SignaturePolicy.getDefaultInstance() : rule_;
}
/**
* .common.SignaturePolicy rule = 2 [json_name = "rule"];
*/
@java.lang.Override
public org.hyperledger.fabric.protos.common.SignaturePolicyOrBuilder getRuleOrBuilder() {
return rule_ == null ? org.hyperledger.fabric.protos.common.SignaturePolicy.getDefaultInstance() : rule_;
}
public static final int IDENTITIES_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private java.util.List identities_;
/**
* repeated .common.MSPPrincipal identities = 3 [json_name = "identities"];
*/
@java.lang.Override
public java.util.List getIdentitiesList() {
return identities_;
}
/**
* repeated .common.MSPPrincipal identities = 3 [json_name = "identities"];
*/
@java.lang.Override
public java.util.List extends org.hyperledger.fabric.protos.common.MSPPrincipalOrBuilder>
getIdentitiesOrBuilderList() {
return identities_;
}
/**
* repeated .common.MSPPrincipal identities = 3 [json_name = "identities"];
*/
@java.lang.Override
public int getIdentitiesCount() {
return identities_.size();
}
/**
* repeated .common.MSPPrincipal identities = 3 [json_name = "identities"];
*/
@java.lang.Override
public org.hyperledger.fabric.protos.common.MSPPrincipal getIdentities(int index) {
return identities_.get(index);
}
/**
* repeated .common.MSPPrincipal identities = 3 [json_name = "identities"];
*/
@java.lang.Override
public org.hyperledger.fabric.protos.common.MSPPrincipalOrBuilder getIdentitiesOrBuilder(
int index) {
return identities_.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 {
if (version_ != 0) {
output.writeInt32(1, version_);
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(2, getRule());
}
for (int i = 0; i < identities_.size(); i++) {
output.writeMessage(3, identities_.get(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (version_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(1, version_);
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getRule());
}
for (int i = 0; i < identities_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, identities_.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.common.SignaturePolicyEnvelope)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.common.SignaturePolicyEnvelope other = (org.hyperledger.fabric.protos.common.SignaturePolicyEnvelope) obj;
if (getVersion()
!= other.getVersion()) return false;
if (hasRule() != other.hasRule()) return false;
if (hasRule()) {
if (!getRule()
.equals(other.getRule())) return false;
}
if (!getIdentitiesList()
.equals(other.getIdentitiesList())) 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) + VERSION_FIELD_NUMBER;
hash = (53 * hash) + getVersion();
if (hasRule()) {
hash = (37 * hash) + RULE_FIELD_NUMBER;
hash = (53 * hash) + getRule().hashCode();
}
if (getIdentitiesCount() > 0) {
hash = (37 * hash) + IDENTITIES_FIELD_NUMBER;
hash = (53 * hash) + getIdentitiesList().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.common.SignaturePolicyEnvelope parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.common.SignaturePolicyEnvelope 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.common.SignaturePolicyEnvelope parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.common.SignaturePolicyEnvelope 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.common.SignaturePolicyEnvelope parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.common.SignaturePolicyEnvelope parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.common.SignaturePolicyEnvelope parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.common.SignaturePolicyEnvelope 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.common.SignaturePolicyEnvelope parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.common.SignaturePolicyEnvelope 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.common.SignaturePolicyEnvelope parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.common.SignaturePolicyEnvelope 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.common.SignaturePolicyEnvelope 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;
}
/**
*
* SignaturePolicyEnvelope wraps a SignaturePolicy and includes a version for future enhancements
*
*
* Protobuf type {@code common.SignaturePolicyEnvelope}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder implements
// @@protoc_insertion_point(builder_implements:common.SignaturePolicyEnvelope)
org.hyperledger.fabric.protos.common.SignaturePolicyEnvelopeOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.common.PoliciesProto.internal_static_common_SignaturePolicyEnvelope_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.common.PoliciesProto.internal_static_common_SignaturePolicyEnvelope_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.common.SignaturePolicyEnvelope.class, org.hyperledger.fabric.protos.common.SignaturePolicyEnvelope.Builder.class);
}
// Construct using org.hyperledger.fabric.protos.common.SignaturePolicyEnvelope.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessage
.alwaysUseFieldBuilders) {
getRuleFieldBuilder();
getIdentitiesFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
version_ = 0;
rule_ = null;
if (ruleBuilder_ != null) {
ruleBuilder_.dispose();
ruleBuilder_ = null;
}
if (identitiesBuilder_ == null) {
identities_ = java.util.Collections.emptyList();
} else {
identities_ = null;
identitiesBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000004);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.common.PoliciesProto.internal_static_common_SignaturePolicyEnvelope_descriptor;
}
@java.lang.Override
public org.hyperledger.fabric.protos.common.SignaturePolicyEnvelope getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.common.SignaturePolicyEnvelope.getDefaultInstance();
}
@java.lang.Override
public org.hyperledger.fabric.protos.common.SignaturePolicyEnvelope build() {
org.hyperledger.fabric.protos.common.SignaturePolicyEnvelope result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.hyperledger.fabric.protos.common.SignaturePolicyEnvelope buildPartial() {
org.hyperledger.fabric.protos.common.SignaturePolicyEnvelope result = new org.hyperledger.fabric.protos.common.SignaturePolicyEnvelope(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartialRepeatedFields(org.hyperledger.fabric.protos.common.SignaturePolicyEnvelope result) {
if (identitiesBuilder_ == null) {
if (((bitField0_ & 0x00000004) != 0)) {
identities_ = java.util.Collections.unmodifiableList(identities_);
bitField0_ = (bitField0_ & ~0x00000004);
}
result.identities_ = identities_;
} else {
result.identities_ = identitiesBuilder_.build();
}
}
private void buildPartial0(org.hyperledger.fabric.protos.common.SignaturePolicyEnvelope result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.version_ = version_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000002) != 0)) {
result.rule_ = ruleBuilder_ == null
? rule_
: ruleBuilder_.build();
to_bitField0_ |= 0x00000001;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.fabric.protos.common.SignaturePolicyEnvelope) {
return mergeFrom((org.hyperledger.fabric.protos.common.SignaturePolicyEnvelope)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.fabric.protos.common.SignaturePolicyEnvelope other) {
if (other == org.hyperledger.fabric.protos.common.SignaturePolicyEnvelope.getDefaultInstance()) return this;
if (other.getVersion() != 0) {
setVersion(other.getVersion());
}
if (other.hasRule()) {
mergeRule(other.getRule());
}
if (identitiesBuilder_ == null) {
if (!other.identities_.isEmpty()) {
if (identities_.isEmpty()) {
identities_ = other.identities_;
bitField0_ = (bitField0_ & ~0x00000004);
} else {
ensureIdentitiesIsMutable();
identities_.addAll(other.identities_);
}
onChanged();
}
} else {
if (!other.identities_.isEmpty()) {
if (identitiesBuilder_.isEmpty()) {
identitiesBuilder_.dispose();
identitiesBuilder_ = null;
identities_ = other.identities_;
bitField0_ = (bitField0_ & ~0x00000004);
identitiesBuilder_ =
com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
getIdentitiesFieldBuilder() : null;
} else {
identitiesBuilder_.addAllMessages(other.identities_);
}
}
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
version_ = input.readInt32();
bitField0_ |= 0x00000001;
break;
} // case 8
case 18: {
input.readMessage(
getRuleFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000002;
break;
} // case 18
case 26: {
org.hyperledger.fabric.protos.common.MSPPrincipal m =
input.readMessage(
org.hyperledger.fabric.protos.common.MSPPrincipal.parser(),
extensionRegistry);
if (identitiesBuilder_ == null) {
ensureIdentitiesIsMutable();
identities_.add(m);
} else {
identitiesBuilder_.addMessage(m);
}
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 int version_ ;
/**
* int32 version = 1 [json_name = "version"];
* @return The version.
*/
@java.lang.Override
public int getVersion() {
return version_;
}
/**
* int32 version = 1 [json_name = "version"];
* @param value The version to set.
* @return This builder for chaining.
*/
public Builder setVersion(int value) {
version_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* int32 version = 1 [json_name = "version"];
* @return This builder for chaining.
*/
public Builder clearVersion() {
bitField0_ = (bitField0_ & ~0x00000001);
version_ = 0;
onChanged();
return this;
}
private org.hyperledger.fabric.protos.common.SignaturePolicy rule_;
private com.google.protobuf.SingleFieldBuilder<
org.hyperledger.fabric.protos.common.SignaturePolicy, org.hyperledger.fabric.protos.common.SignaturePolicy.Builder, org.hyperledger.fabric.protos.common.SignaturePolicyOrBuilder> ruleBuilder_;
/**
* .common.SignaturePolicy rule = 2 [json_name = "rule"];
* @return Whether the rule field is set.
*/
public boolean hasRule() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
* .common.SignaturePolicy rule = 2 [json_name = "rule"];
* @return The rule.
*/
public org.hyperledger.fabric.protos.common.SignaturePolicy getRule() {
if (ruleBuilder_ == null) {
return rule_ == null ? org.hyperledger.fabric.protos.common.SignaturePolicy.getDefaultInstance() : rule_;
} else {
return ruleBuilder_.getMessage();
}
}
/**
* .common.SignaturePolicy rule = 2 [json_name = "rule"];
*/
public Builder setRule(org.hyperledger.fabric.protos.common.SignaturePolicy value) {
if (ruleBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
rule_ = value;
} else {
ruleBuilder_.setMessage(value);
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* .common.SignaturePolicy rule = 2 [json_name = "rule"];
*/
public Builder setRule(
org.hyperledger.fabric.protos.common.SignaturePolicy.Builder builderForValue) {
if (ruleBuilder_ == null) {
rule_ = builderForValue.build();
} else {
ruleBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* .common.SignaturePolicy rule = 2 [json_name = "rule"];
*/
public Builder mergeRule(org.hyperledger.fabric.protos.common.SignaturePolicy value) {
if (ruleBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0) &&
rule_ != null &&
rule_ != org.hyperledger.fabric.protos.common.SignaturePolicy.getDefaultInstance()) {
getRuleBuilder().mergeFrom(value);
} else {
rule_ = value;
}
} else {
ruleBuilder_.mergeFrom(value);
}
if (rule_ != null) {
bitField0_ |= 0x00000002;
onChanged();
}
return this;
}
/**
* .common.SignaturePolicy rule = 2 [json_name = "rule"];
*/
public Builder clearRule() {
bitField0_ = (bitField0_ & ~0x00000002);
rule_ = null;
if (ruleBuilder_ != null) {
ruleBuilder_.dispose();
ruleBuilder_ = null;
}
onChanged();
return this;
}
/**
* .common.SignaturePolicy rule = 2 [json_name = "rule"];
*/
public org.hyperledger.fabric.protos.common.SignaturePolicy.Builder getRuleBuilder() {
bitField0_ |= 0x00000002;
onChanged();
return getRuleFieldBuilder().getBuilder();
}
/**
* .common.SignaturePolicy rule = 2 [json_name = "rule"];
*/
public org.hyperledger.fabric.protos.common.SignaturePolicyOrBuilder getRuleOrBuilder() {
if (ruleBuilder_ != null) {
return ruleBuilder_.getMessageOrBuilder();
} else {
return rule_ == null ?
org.hyperledger.fabric.protos.common.SignaturePolicy.getDefaultInstance() : rule_;
}
}
/**
* .common.SignaturePolicy rule = 2 [json_name = "rule"];
*/
private com.google.protobuf.SingleFieldBuilder<
org.hyperledger.fabric.protos.common.SignaturePolicy, org.hyperledger.fabric.protos.common.SignaturePolicy.Builder, org.hyperledger.fabric.protos.common.SignaturePolicyOrBuilder>
getRuleFieldBuilder() {
if (ruleBuilder_ == null) {
ruleBuilder_ = new com.google.protobuf.SingleFieldBuilder<
org.hyperledger.fabric.protos.common.SignaturePolicy, org.hyperledger.fabric.protos.common.SignaturePolicy.Builder, org.hyperledger.fabric.protos.common.SignaturePolicyOrBuilder>(
getRule(),
getParentForChildren(),
isClean());
rule_ = null;
}
return ruleBuilder_;
}
private java.util.List identities_ =
java.util.Collections.emptyList();
private void ensureIdentitiesIsMutable() {
if (!((bitField0_ & 0x00000004) != 0)) {
identities_ = new java.util.ArrayList(identities_);
bitField0_ |= 0x00000004;
}
}
private com.google.protobuf.RepeatedFieldBuilder<
org.hyperledger.fabric.protos.common.MSPPrincipal, org.hyperledger.fabric.protos.common.MSPPrincipal.Builder, org.hyperledger.fabric.protos.common.MSPPrincipalOrBuilder> identitiesBuilder_;
/**
* repeated .common.MSPPrincipal identities = 3 [json_name = "identities"];
*/
public java.util.List getIdentitiesList() {
if (identitiesBuilder_ == null) {
return java.util.Collections.unmodifiableList(identities_);
} else {
return identitiesBuilder_.getMessageList();
}
}
/**
* repeated .common.MSPPrincipal identities = 3 [json_name = "identities"];
*/
public int getIdentitiesCount() {
if (identitiesBuilder_ == null) {
return identities_.size();
} else {
return identitiesBuilder_.getCount();
}
}
/**
* repeated .common.MSPPrincipal identities = 3 [json_name = "identities"];
*/
public org.hyperledger.fabric.protos.common.MSPPrincipal getIdentities(int index) {
if (identitiesBuilder_ == null) {
return identities_.get(index);
} else {
return identitiesBuilder_.getMessage(index);
}
}
/**
* repeated .common.MSPPrincipal identities = 3 [json_name = "identities"];
*/
public Builder setIdentities(
int index, org.hyperledger.fabric.protos.common.MSPPrincipal value) {
if (identitiesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureIdentitiesIsMutable();
identities_.set(index, value);
onChanged();
} else {
identitiesBuilder_.setMessage(index, value);
}
return this;
}
/**
* repeated .common.MSPPrincipal identities = 3 [json_name = "identities"];
*/
public Builder setIdentities(
int index, org.hyperledger.fabric.protos.common.MSPPrincipal.Builder builderForValue) {
if (identitiesBuilder_ == null) {
ensureIdentitiesIsMutable();
identities_.set(index, builderForValue.build());
onChanged();
} else {
identitiesBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .common.MSPPrincipal identities = 3 [json_name = "identities"];
*/
public Builder addIdentities(org.hyperledger.fabric.protos.common.MSPPrincipal value) {
if (identitiesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureIdentitiesIsMutable();
identities_.add(value);
onChanged();
} else {
identitiesBuilder_.addMessage(value);
}
return this;
}
/**
* repeated .common.MSPPrincipal identities = 3 [json_name = "identities"];
*/
public Builder addIdentities(
int index, org.hyperledger.fabric.protos.common.MSPPrincipal value) {
if (identitiesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureIdentitiesIsMutable();
identities_.add(index, value);
onChanged();
} else {
identitiesBuilder_.addMessage(index, value);
}
return this;
}
/**
* repeated .common.MSPPrincipal identities = 3 [json_name = "identities"];
*/
public Builder addIdentities(
org.hyperledger.fabric.protos.common.MSPPrincipal.Builder builderForValue) {
if (identitiesBuilder_ == null) {
ensureIdentitiesIsMutable();
identities_.add(builderForValue.build());
onChanged();
} else {
identitiesBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* repeated .common.MSPPrincipal identities = 3 [json_name = "identities"];
*/
public Builder addIdentities(
int index, org.hyperledger.fabric.protos.common.MSPPrincipal.Builder builderForValue) {
if (identitiesBuilder_ == null) {
ensureIdentitiesIsMutable();
identities_.add(index, builderForValue.build());
onChanged();
} else {
identitiesBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .common.MSPPrincipal identities = 3 [json_name = "identities"];
*/
public Builder addAllIdentities(
java.lang.Iterable extends org.hyperledger.fabric.protos.common.MSPPrincipal> values) {
if (identitiesBuilder_ == null) {
ensureIdentitiesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, identities_);
onChanged();
} else {
identitiesBuilder_.addAllMessages(values);
}
return this;
}
/**
* repeated .common.MSPPrincipal identities = 3 [json_name = "identities"];
*/
public Builder clearIdentities() {
if (identitiesBuilder_ == null) {
identities_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
} else {
identitiesBuilder_.clear();
}
return this;
}
/**
* repeated .common.MSPPrincipal identities = 3 [json_name = "identities"];
*/
public Builder removeIdentities(int index) {
if (identitiesBuilder_ == null) {
ensureIdentitiesIsMutable();
identities_.remove(index);
onChanged();
} else {
identitiesBuilder_.remove(index);
}
return this;
}
/**
* repeated .common.MSPPrincipal identities = 3 [json_name = "identities"];
*/
public org.hyperledger.fabric.protos.common.MSPPrincipal.Builder getIdentitiesBuilder(
int index) {
return getIdentitiesFieldBuilder().getBuilder(index);
}
/**
* repeated .common.MSPPrincipal identities = 3 [json_name = "identities"];
*/
public org.hyperledger.fabric.protos.common.MSPPrincipalOrBuilder getIdentitiesOrBuilder(
int index) {
if (identitiesBuilder_ == null) {
return identities_.get(index); } else {
return identitiesBuilder_.getMessageOrBuilder(index);
}
}
/**
* repeated .common.MSPPrincipal identities = 3 [json_name = "identities"];
*/
public java.util.List extends org.hyperledger.fabric.protos.common.MSPPrincipalOrBuilder>
getIdentitiesOrBuilderList() {
if (identitiesBuilder_ != null) {
return identitiesBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(identities_);
}
}
/**
* repeated .common.MSPPrincipal identities = 3 [json_name = "identities"];
*/
public org.hyperledger.fabric.protos.common.MSPPrincipal.Builder addIdentitiesBuilder() {
return getIdentitiesFieldBuilder().addBuilder(
org.hyperledger.fabric.protos.common.MSPPrincipal.getDefaultInstance());
}
/**
* repeated .common.MSPPrincipal identities = 3 [json_name = "identities"];
*/
public org.hyperledger.fabric.protos.common.MSPPrincipal.Builder addIdentitiesBuilder(
int index) {
return getIdentitiesFieldBuilder().addBuilder(
index, org.hyperledger.fabric.protos.common.MSPPrincipal.getDefaultInstance());
}
/**
* repeated .common.MSPPrincipal identities = 3 [json_name = "identities"];
*/
public java.util.List
getIdentitiesBuilderList() {
return getIdentitiesFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilder<
org.hyperledger.fabric.protos.common.MSPPrincipal, org.hyperledger.fabric.protos.common.MSPPrincipal.Builder, org.hyperledger.fabric.protos.common.MSPPrincipalOrBuilder>
getIdentitiesFieldBuilder() {
if (identitiesBuilder_ == null) {
identitiesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
org.hyperledger.fabric.protos.common.MSPPrincipal, org.hyperledger.fabric.protos.common.MSPPrincipal.Builder, org.hyperledger.fabric.protos.common.MSPPrincipalOrBuilder>(
identities_,
((bitField0_ & 0x00000004) != 0),
getParentForChildren(),
isClean());
identities_ = null;
}
return identitiesBuilder_;
}
// @@protoc_insertion_point(builder_scope:common.SignaturePolicyEnvelope)
}
// @@protoc_insertion_point(class_scope:common.SignaturePolicyEnvelope)
private static final org.hyperledger.fabric.protos.common.SignaturePolicyEnvelope DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.common.SignaturePolicyEnvelope();
}
public static org.hyperledger.fabric.protos.common.SignaturePolicyEnvelope getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public SignaturePolicyEnvelope 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.common.SignaturePolicyEnvelope getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy