org.hyperledger.fabric.protos.common.SignaturePolicy 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;
/**
*
* SignaturePolicy is a recursive message structure which defines a featherweight DSL for describing
* policies which are more complicated than 'exactly this signature'. The NOutOf operator is sufficent
* to express AND as well as OR, as well as of course N out of the following M policies
* SignedBy implies that the signature is from a valid certificate which is signed by the trusted
* authority specified in the bytes. This will be the certificate itself for a self-signed certificate
* and will be the CA for more traditional certificates
*
*
* Protobuf type {@code common.SignaturePolicy}
*/
public final class SignaturePolicy extends
com.google.protobuf.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:common.SignaturePolicy)
SignaturePolicyOrBuilder {
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= */ "",
SignaturePolicy.class.getName());
}
// Use SignaturePolicy.newBuilder() to construct.
private SignaturePolicy(com.google.protobuf.GeneratedMessage.Builder> builder) {
super(builder);
}
private SignaturePolicy() {
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.common.PoliciesProto.internal_static_common_SignaturePolicy_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.common.PoliciesProto.internal_static_common_SignaturePolicy_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.common.SignaturePolicy.class, org.hyperledger.fabric.protos.common.SignaturePolicy.Builder.class);
}
public interface NOutOfOrBuilder extends
// @@protoc_insertion_point(interface_extends:common.SignaturePolicy.NOutOf)
com.google.protobuf.MessageOrBuilder {
/**
* int32 n = 1 [json_name = "n"];
* @return The n.
*/
int getN();
/**
* repeated .common.SignaturePolicy rules = 2 [json_name = "rules"];
*/
java.util.List
getRulesList();
/**
* repeated .common.SignaturePolicy rules = 2 [json_name = "rules"];
*/
org.hyperledger.fabric.protos.common.SignaturePolicy getRules(int index);
/**
* repeated .common.SignaturePolicy rules = 2 [json_name = "rules"];
*/
int getRulesCount();
/**
* repeated .common.SignaturePolicy rules = 2 [json_name = "rules"];
*/
java.util.List extends org.hyperledger.fabric.protos.common.SignaturePolicyOrBuilder>
getRulesOrBuilderList();
/**
* repeated .common.SignaturePolicy rules = 2 [json_name = "rules"];
*/
org.hyperledger.fabric.protos.common.SignaturePolicyOrBuilder getRulesOrBuilder(
int index);
}
/**
* Protobuf type {@code common.SignaturePolicy.NOutOf}
*/
public static final class NOutOf extends
com.google.protobuf.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:common.SignaturePolicy.NOutOf)
NOutOfOrBuilder {
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= */ "",
NOutOf.class.getName());
}
// Use NOutOf.newBuilder() to construct.
private NOutOf(com.google.protobuf.GeneratedMessage.Builder> builder) {
super(builder);
}
private NOutOf() {
rules_ = java.util.Collections.emptyList();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.common.PoliciesProto.internal_static_common_SignaturePolicy_NOutOf_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.common.PoliciesProto.internal_static_common_SignaturePolicy_NOutOf_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.common.SignaturePolicy.NOutOf.class, org.hyperledger.fabric.protos.common.SignaturePolicy.NOutOf.Builder.class);
}
public static final int N_FIELD_NUMBER = 1;
private int n_ = 0;
/**
* int32 n = 1 [json_name = "n"];
* @return The n.
*/
@java.lang.Override
public int getN() {
return n_;
}
public static final int RULES_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private java.util.List rules_;
/**
* repeated .common.SignaturePolicy rules = 2 [json_name = "rules"];
*/
@java.lang.Override
public java.util.List getRulesList() {
return rules_;
}
/**
* repeated .common.SignaturePolicy rules = 2 [json_name = "rules"];
*/
@java.lang.Override
public java.util.List extends org.hyperledger.fabric.protos.common.SignaturePolicyOrBuilder>
getRulesOrBuilderList() {
return rules_;
}
/**
* repeated .common.SignaturePolicy rules = 2 [json_name = "rules"];
*/
@java.lang.Override
public int getRulesCount() {
return rules_.size();
}
/**
* repeated .common.SignaturePolicy rules = 2 [json_name = "rules"];
*/
@java.lang.Override
public org.hyperledger.fabric.protos.common.SignaturePolicy getRules(int index) {
return rules_.get(index);
}
/**
* repeated .common.SignaturePolicy rules = 2 [json_name = "rules"];
*/
@java.lang.Override
public org.hyperledger.fabric.protos.common.SignaturePolicyOrBuilder getRulesOrBuilder(
int index) {
return rules_.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 (n_ != 0) {
output.writeInt32(1, n_);
}
for (int i = 0; i < rules_.size(); i++) {
output.writeMessage(2, rules_.get(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (n_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(1, n_);
}
for (int i = 0; i < rules_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, rules_.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.SignaturePolicy.NOutOf)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.common.SignaturePolicy.NOutOf other = (org.hyperledger.fabric.protos.common.SignaturePolicy.NOutOf) obj;
if (getN()
!= other.getN()) return false;
if (!getRulesList()
.equals(other.getRulesList())) 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) + N_FIELD_NUMBER;
hash = (53 * hash) + getN();
if (getRulesCount() > 0) {
hash = (37 * hash) + RULES_FIELD_NUMBER;
hash = (53 * hash) + getRulesList().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.common.SignaturePolicy.NOutOf parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.common.SignaturePolicy.NOutOf 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.SignaturePolicy.NOutOf parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.common.SignaturePolicy.NOutOf 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.SignaturePolicy.NOutOf parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.common.SignaturePolicy.NOutOf 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.SignaturePolicy.NOutOf parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.common.SignaturePolicy.NOutOf 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.SignaturePolicy.NOutOf parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.common.SignaturePolicy.NOutOf 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.SignaturePolicy.NOutOf 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.SignaturePolicy.NOutOf 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.SignaturePolicy.NOutOf 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 common.SignaturePolicy.NOutOf}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder implements
// @@protoc_insertion_point(builder_implements:common.SignaturePolicy.NOutOf)
org.hyperledger.fabric.protos.common.SignaturePolicy.NOutOfOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.common.PoliciesProto.internal_static_common_SignaturePolicy_NOutOf_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.common.PoliciesProto.internal_static_common_SignaturePolicy_NOutOf_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.common.SignaturePolicy.NOutOf.class, org.hyperledger.fabric.protos.common.SignaturePolicy.NOutOf.Builder.class);
}
// Construct using org.hyperledger.fabric.protos.common.SignaturePolicy.NOutOf.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
n_ = 0;
if (rulesBuilder_ == null) {
rules_ = java.util.Collections.emptyList();
} else {
rules_ = null;
rulesBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.common.PoliciesProto.internal_static_common_SignaturePolicy_NOutOf_descriptor;
}
@java.lang.Override
public org.hyperledger.fabric.protos.common.SignaturePolicy.NOutOf getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.common.SignaturePolicy.NOutOf.getDefaultInstance();
}
@java.lang.Override
public org.hyperledger.fabric.protos.common.SignaturePolicy.NOutOf build() {
org.hyperledger.fabric.protos.common.SignaturePolicy.NOutOf result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.hyperledger.fabric.protos.common.SignaturePolicy.NOutOf buildPartial() {
org.hyperledger.fabric.protos.common.SignaturePolicy.NOutOf result = new org.hyperledger.fabric.protos.common.SignaturePolicy.NOutOf(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartialRepeatedFields(org.hyperledger.fabric.protos.common.SignaturePolicy.NOutOf result) {
if (rulesBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)) {
rules_ = java.util.Collections.unmodifiableList(rules_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.rules_ = rules_;
} else {
result.rules_ = rulesBuilder_.build();
}
}
private void buildPartial0(org.hyperledger.fabric.protos.common.SignaturePolicy.NOutOf result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.n_ = n_;
}
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.fabric.protos.common.SignaturePolicy.NOutOf) {
return mergeFrom((org.hyperledger.fabric.protos.common.SignaturePolicy.NOutOf)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.fabric.protos.common.SignaturePolicy.NOutOf other) {
if (other == org.hyperledger.fabric.protos.common.SignaturePolicy.NOutOf.getDefaultInstance()) return this;
if (other.getN() != 0) {
setN(other.getN());
}
if (rulesBuilder_ == null) {
if (!other.rules_.isEmpty()) {
if (rules_.isEmpty()) {
rules_ = other.rules_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureRulesIsMutable();
rules_.addAll(other.rules_);
}
onChanged();
}
} else {
if (!other.rules_.isEmpty()) {
if (rulesBuilder_.isEmpty()) {
rulesBuilder_.dispose();
rulesBuilder_ = null;
rules_ = other.rules_;
bitField0_ = (bitField0_ & ~0x00000002);
rulesBuilder_ =
com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
getRulesFieldBuilder() : null;
} else {
rulesBuilder_.addAllMessages(other.rules_);
}
}
}
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: {
n_ = input.readInt32();
bitField0_ |= 0x00000001;
break;
} // case 8
case 18: {
org.hyperledger.fabric.protos.common.SignaturePolicy m =
input.readMessage(
org.hyperledger.fabric.protos.common.SignaturePolicy.parser(),
extensionRegistry);
if (rulesBuilder_ == null) {
ensureRulesIsMutable();
rules_.add(m);
} else {
rulesBuilder_.addMessage(m);
}
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 int n_ ;
/**
* int32 n = 1 [json_name = "n"];
* @return The n.
*/
@java.lang.Override
public int getN() {
return n_;
}
/**
* int32 n = 1 [json_name = "n"];
* @param value The n to set.
* @return This builder for chaining.
*/
public Builder setN(int value) {
n_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* int32 n = 1 [json_name = "n"];
* @return This builder for chaining.
*/
public Builder clearN() {
bitField0_ = (bitField0_ & ~0x00000001);
n_ = 0;
onChanged();
return this;
}
private java.util.List rules_ =
java.util.Collections.emptyList();
private void ensureRulesIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
rules_ = new java.util.ArrayList(rules_);
bitField0_ |= 0x00000002;
}
}
private com.google.protobuf.RepeatedFieldBuilder<
org.hyperledger.fabric.protos.common.SignaturePolicy, org.hyperledger.fabric.protos.common.SignaturePolicy.Builder, org.hyperledger.fabric.protos.common.SignaturePolicyOrBuilder> rulesBuilder_;
/**
* repeated .common.SignaturePolicy rules = 2 [json_name = "rules"];
*/
public java.util.List getRulesList() {
if (rulesBuilder_ == null) {
return java.util.Collections.unmodifiableList(rules_);
} else {
return rulesBuilder_.getMessageList();
}
}
/**
* repeated .common.SignaturePolicy rules = 2 [json_name = "rules"];
*/
public int getRulesCount() {
if (rulesBuilder_ == null) {
return rules_.size();
} else {
return rulesBuilder_.getCount();
}
}
/**
* repeated .common.SignaturePolicy rules = 2 [json_name = "rules"];
*/
public org.hyperledger.fabric.protos.common.SignaturePolicy getRules(int index) {
if (rulesBuilder_ == null) {
return rules_.get(index);
} else {
return rulesBuilder_.getMessage(index);
}
}
/**
* repeated .common.SignaturePolicy rules = 2 [json_name = "rules"];
*/
public Builder setRules(
int index, org.hyperledger.fabric.protos.common.SignaturePolicy value) {
if (rulesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureRulesIsMutable();
rules_.set(index, value);
onChanged();
} else {
rulesBuilder_.setMessage(index, value);
}
return this;
}
/**
* repeated .common.SignaturePolicy rules = 2 [json_name = "rules"];
*/
public Builder setRules(
int index, org.hyperledger.fabric.protos.common.SignaturePolicy.Builder builderForValue) {
if (rulesBuilder_ == null) {
ensureRulesIsMutable();
rules_.set(index, builderForValue.build());
onChanged();
} else {
rulesBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .common.SignaturePolicy rules = 2 [json_name = "rules"];
*/
public Builder addRules(org.hyperledger.fabric.protos.common.SignaturePolicy value) {
if (rulesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureRulesIsMutable();
rules_.add(value);
onChanged();
} else {
rulesBuilder_.addMessage(value);
}
return this;
}
/**
* repeated .common.SignaturePolicy rules = 2 [json_name = "rules"];
*/
public Builder addRules(
int index, org.hyperledger.fabric.protos.common.SignaturePolicy value) {
if (rulesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureRulesIsMutable();
rules_.add(index, value);
onChanged();
} else {
rulesBuilder_.addMessage(index, value);
}
return this;
}
/**
* repeated .common.SignaturePolicy rules = 2 [json_name = "rules"];
*/
public Builder addRules(
org.hyperledger.fabric.protos.common.SignaturePolicy.Builder builderForValue) {
if (rulesBuilder_ == null) {
ensureRulesIsMutable();
rules_.add(builderForValue.build());
onChanged();
} else {
rulesBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* repeated .common.SignaturePolicy rules = 2 [json_name = "rules"];
*/
public Builder addRules(
int index, org.hyperledger.fabric.protos.common.SignaturePolicy.Builder builderForValue) {
if (rulesBuilder_ == null) {
ensureRulesIsMutable();
rules_.add(index, builderForValue.build());
onChanged();
} else {
rulesBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .common.SignaturePolicy rules = 2 [json_name = "rules"];
*/
public Builder addAllRules(
java.lang.Iterable extends org.hyperledger.fabric.protos.common.SignaturePolicy> values) {
if (rulesBuilder_ == null) {
ensureRulesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, rules_);
onChanged();
} else {
rulesBuilder_.addAllMessages(values);
}
return this;
}
/**
* repeated .common.SignaturePolicy rules = 2 [json_name = "rules"];
*/
public Builder clearRules() {
if (rulesBuilder_ == null) {
rules_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
} else {
rulesBuilder_.clear();
}
return this;
}
/**
* repeated .common.SignaturePolicy rules = 2 [json_name = "rules"];
*/
public Builder removeRules(int index) {
if (rulesBuilder_ == null) {
ensureRulesIsMutable();
rules_.remove(index);
onChanged();
} else {
rulesBuilder_.remove(index);
}
return this;
}
/**
* repeated .common.SignaturePolicy rules = 2 [json_name = "rules"];
*/
public org.hyperledger.fabric.protos.common.SignaturePolicy.Builder getRulesBuilder(
int index) {
return getRulesFieldBuilder().getBuilder(index);
}
/**
* repeated .common.SignaturePolicy rules = 2 [json_name = "rules"];
*/
public org.hyperledger.fabric.protos.common.SignaturePolicyOrBuilder getRulesOrBuilder(
int index) {
if (rulesBuilder_ == null) {
return rules_.get(index); } else {
return rulesBuilder_.getMessageOrBuilder(index);
}
}
/**
* repeated .common.SignaturePolicy rules = 2 [json_name = "rules"];
*/
public java.util.List extends org.hyperledger.fabric.protos.common.SignaturePolicyOrBuilder>
getRulesOrBuilderList() {
if (rulesBuilder_ != null) {
return rulesBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(rules_);
}
}
/**
* repeated .common.SignaturePolicy rules = 2 [json_name = "rules"];
*/
public org.hyperledger.fabric.protos.common.SignaturePolicy.Builder addRulesBuilder() {
return getRulesFieldBuilder().addBuilder(
org.hyperledger.fabric.protos.common.SignaturePolicy.getDefaultInstance());
}
/**
* repeated .common.SignaturePolicy rules = 2 [json_name = "rules"];
*/
public org.hyperledger.fabric.protos.common.SignaturePolicy.Builder addRulesBuilder(
int index) {
return getRulesFieldBuilder().addBuilder(
index, org.hyperledger.fabric.protos.common.SignaturePolicy.getDefaultInstance());
}
/**
* repeated .common.SignaturePolicy rules = 2 [json_name = "rules"];
*/
public java.util.List
getRulesBuilderList() {
return getRulesFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilder<
org.hyperledger.fabric.protos.common.SignaturePolicy, org.hyperledger.fabric.protos.common.SignaturePolicy.Builder, org.hyperledger.fabric.protos.common.SignaturePolicyOrBuilder>
getRulesFieldBuilder() {
if (rulesBuilder_ == null) {
rulesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
org.hyperledger.fabric.protos.common.SignaturePolicy, org.hyperledger.fabric.protos.common.SignaturePolicy.Builder, org.hyperledger.fabric.protos.common.SignaturePolicyOrBuilder>(
rules_,
((bitField0_ & 0x00000002) != 0),
getParentForChildren(),
isClean());
rules_ = null;
}
return rulesBuilder_;
}
// @@protoc_insertion_point(builder_scope:common.SignaturePolicy.NOutOf)
}
// @@protoc_insertion_point(class_scope:common.SignaturePolicy.NOutOf)
private static final org.hyperledger.fabric.protos.common.SignaturePolicy.NOutOf DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.common.SignaturePolicy.NOutOf();
}
public static org.hyperledger.fabric.protos.common.SignaturePolicy.NOutOf getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public NOutOf 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.SignaturePolicy.NOutOf getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int typeCase_ = 0;
@SuppressWarnings("serial")
private java.lang.Object type_;
public enum TypeCase
implements com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
SIGNED_BY(1),
N_OUT_OF(2),
TYPE_NOT_SET(0);
private final int value;
private TypeCase(int value) {
this.value = value;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static TypeCase valueOf(int value) {
return forNumber(value);
}
public static TypeCase forNumber(int value) {
switch (value) {
case 1: return SIGNED_BY;
case 2: return N_OUT_OF;
case 0: return TYPE_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public TypeCase
getTypeCase() {
return TypeCase.forNumber(
typeCase_);
}
public static final int SIGNED_BY_FIELD_NUMBER = 1;
/**
* int32 signed_by = 1 [json_name = "signedBy"];
* @return Whether the signedBy field is set.
*/
@java.lang.Override
public boolean hasSignedBy() {
return typeCase_ == 1;
}
/**
* int32 signed_by = 1 [json_name = "signedBy"];
* @return The signedBy.
*/
@java.lang.Override
public int getSignedBy() {
if (typeCase_ == 1) {
return (java.lang.Integer) type_;
}
return 0;
}
public static final int N_OUT_OF_FIELD_NUMBER = 2;
/**
* .common.SignaturePolicy.NOutOf n_out_of = 2 [json_name = "nOutOf"];
* @return Whether the nOutOf field is set.
*/
@java.lang.Override
public boolean hasNOutOf() {
return typeCase_ == 2;
}
/**
* .common.SignaturePolicy.NOutOf n_out_of = 2 [json_name = "nOutOf"];
* @return The nOutOf.
*/
@java.lang.Override
public org.hyperledger.fabric.protos.common.SignaturePolicy.NOutOf getNOutOf() {
if (typeCase_ == 2) {
return (org.hyperledger.fabric.protos.common.SignaturePolicy.NOutOf) type_;
}
return org.hyperledger.fabric.protos.common.SignaturePolicy.NOutOf.getDefaultInstance();
}
/**
* .common.SignaturePolicy.NOutOf n_out_of = 2 [json_name = "nOutOf"];
*/
@java.lang.Override
public org.hyperledger.fabric.protos.common.SignaturePolicy.NOutOfOrBuilder getNOutOfOrBuilder() {
if (typeCase_ == 2) {
return (org.hyperledger.fabric.protos.common.SignaturePolicy.NOutOf) type_;
}
return org.hyperledger.fabric.protos.common.SignaturePolicy.NOutOf.getDefaultInstance();
}
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 (typeCase_ == 1) {
output.writeInt32(
1, (int)((java.lang.Integer) type_));
}
if (typeCase_ == 2) {
output.writeMessage(2, (org.hyperledger.fabric.protos.common.SignaturePolicy.NOutOf) type_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (typeCase_ == 1) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(
1, (int)((java.lang.Integer) type_));
}
if (typeCase_ == 2) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, (org.hyperledger.fabric.protos.common.SignaturePolicy.NOutOf) type_);
}
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.SignaturePolicy)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.common.SignaturePolicy other = (org.hyperledger.fabric.protos.common.SignaturePolicy) obj;
if (!getTypeCase().equals(other.getTypeCase())) return false;
switch (typeCase_) {
case 1:
if (getSignedBy()
!= other.getSignedBy()) return false;
break;
case 2:
if (!getNOutOf()
.equals(other.getNOutOf())) return false;
break;
case 0:
default:
}
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();
switch (typeCase_) {
case 1:
hash = (37 * hash) + SIGNED_BY_FIELD_NUMBER;
hash = (53 * hash) + getSignedBy();
break;
case 2:
hash = (37 * hash) + N_OUT_OF_FIELD_NUMBER;
hash = (53 * hash) + getNOutOf().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.common.SignaturePolicy parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.common.SignaturePolicy 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.SignaturePolicy parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.common.SignaturePolicy 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.SignaturePolicy parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.common.SignaturePolicy 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.SignaturePolicy parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.common.SignaturePolicy 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.SignaturePolicy parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.common.SignaturePolicy 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.SignaturePolicy 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.SignaturePolicy 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.SignaturePolicy 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;
}
/**
*
* SignaturePolicy is a recursive message structure which defines a featherweight DSL for describing
* policies which are more complicated than 'exactly this signature'. The NOutOf operator is sufficent
* to express AND as well as OR, as well as of course N out of the following M policies
* SignedBy implies that the signature is from a valid certificate which is signed by the trusted
* authority specified in the bytes. This will be the certificate itself for a self-signed certificate
* and will be the CA for more traditional certificates
*
*
* Protobuf type {@code common.SignaturePolicy}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder implements
// @@protoc_insertion_point(builder_implements:common.SignaturePolicy)
org.hyperledger.fabric.protos.common.SignaturePolicyOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.common.PoliciesProto.internal_static_common_SignaturePolicy_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.common.PoliciesProto.internal_static_common_SignaturePolicy_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.common.SignaturePolicy.class, org.hyperledger.fabric.protos.common.SignaturePolicy.Builder.class);
}
// Construct using org.hyperledger.fabric.protos.common.SignaturePolicy.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
if (nOutOfBuilder_ != null) {
nOutOfBuilder_.clear();
}
typeCase_ = 0;
type_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.common.PoliciesProto.internal_static_common_SignaturePolicy_descriptor;
}
@java.lang.Override
public org.hyperledger.fabric.protos.common.SignaturePolicy getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.common.SignaturePolicy.getDefaultInstance();
}
@java.lang.Override
public org.hyperledger.fabric.protos.common.SignaturePolicy build() {
org.hyperledger.fabric.protos.common.SignaturePolicy result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.hyperledger.fabric.protos.common.SignaturePolicy buildPartial() {
org.hyperledger.fabric.protos.common.SignaturePolicy result = new org.hyperledger.fabric.protos.common.SignaturePolicy(this);
if (bitField0_ != 0) { buildPartial0(result); }
buildPartialOneofs(result);
onBuilt();
return result;
}
private void buildPartial0(org.hyperledger.fabric.protos.common.SignaturePolicy result) {
int from_bitField0_ = bitField0_;
}
private void buildPartialOneofs(org.hyperledger.fabric.protos.common.SignaturePolicy result) {
result.typeCase_ = typeCase_;
result.type_ = this.type_;
if (typeCase_ == 2 &&
nOutOfBuilder_ != null) {
result.type_ = nOutOfBuilder_.build();
}
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.fabric.protos.common.SignaturePolicy) {
return mergeFrom((org.hyperledger.fabric.protos.common.SignaturePolicy)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.fabric.protos.common.SignaturePolicy other) {
if (other == org.hyperledger.fabric.protos.common.SignaturePolicy.getDefaultInstance()) return this;
switch (other.getTypeCase()) {
case SIGNED_BY: {
setSignedBy(other.getSignedBy());
break;
}
case N_OUT_OF: {
mergeNOutOf(other.getNOutOf());
break;
}
case TYPE_NOT_SET: {
break;
}
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
type_ = input.readInt32();
typeCase_ = 1;
break;
} // case 8
case 18: {
input.readMessage(
getNOutOfFieldBuilder().getBuilder(),
extensionRegistry);
typeCase_ = 2;
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 typeCase_ = 0;
private java.lang.Object type_;
public TypeCase
getTypeCase() {
return TypeCase.forNumber(
typeCase_);
}
public Builder clearType() {
typeCase_ = 0;
type_ = null;
onChanged();
return this;
}
private int bitField0_;
/**
* int32 signed_by = 1 [json_name = "signedBy"];
* @return Whether the signedBy field is set.
*/
public boolean hasSignedBy() {
return typeCase_ == 1;
}
/**
* int32 signed_by = 1 [json_name = "signedBy"];
* @return The signedBy.
*/
public int getSignedBy() {
if (typeCase_ == 1) {
return (java.lang.Integer) type_;
}
return 0;
}
/**
* int32 signed_by = 1 [json_name = "signedBy"];
* @param value The signedBy to set.
* @return This builder for chaining.
*/
public Builder setSignedBy(int value) {
typeCase_ = 1;
type_ = value;
onChanged();
return this;
}
/**
* int32 signed_by = 1 [json_name = "signedBy"];
* @return This builder for chaining.
*/
public Builder clearSignedBy() {
if (typeCase_ == 1) {
typeCase_ = 0;
type_ = null;
onChanged();
}
return this;
}
private com.google.protobuf.SingleFieldBuilder<
org.hyperledger.fabric.protos.common.SignaturePolicy.NOutOf, org.hyperledger.fabric.protos.common.SignaturePolicy.NOutOf.Builder, org.hyperledger.fabric.protos.common.SignaturePolicy.NOutOfOrBuilder> nOutOfBuilder_;
/**
* .common.SignaturePolicy.NOutOf n_out_of = 2 [json_name = "nOutOf"];
* @return Whether the nOutOf field is set.
*/
@java.lang.Override
public boolean hasNOutOf() {
return typeCase_ == 2;
}
/**
* .common.SignaturePolicy.NOutOf n_out_of = 2 [json_name = "nOutOf"];
* @return The nOutOf.
*/
@java.lang.Override
public org.hyperledger.fabric.protos.common.SignaturePolicy.NOutOf getNOutOf() {
if (nOutOfBuilder_ == null) {
if (typeCase_ == 2) {
return (org.hyperledger.fabric.protos.common.SignaturePolicy.NOutOf) type_;
}
return org.hyperledger.fabric.protos.common.SignaturePolicy.NOutOf.getDefaultInstance();
} else {
if (typeCase_ == 2) {
return nOutOfBuilder_.getMessage();
}
return org.hyperledger.fabric.protos.common.SignaturePolicy.NOutOf.getDefaultInstance();
}
}
/**
* .common.SignaturePolicy.NOutOf n_out_of = 2 [json_name = "nOutOf"];
*/
public Builder setNOutOf(org.hyperledger.fabric.protos.common.SignaturePolicy.NOutOf value) {
if (nOutOfBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
type_ = value;
onChanged();
} else {
nOutOfBuilder_.setMessage(value);
}
typeCase_ = 2;
return this;
}
/**
* .common.SignaturePolicy.NOutOf n_out_of = 2 [json_name = "nOutOf"];
*/
public Builder setNOutOf(
org.hyperledger.fabric.protos.common.SignaturePolicy.NOutOf.Builder builderForValue) {
if (nOutOfBuilder_ == null) {
type_ = builderForValue.build();
onChanged();
} else {
nOutOfBuilder_.setMessage(builderForValue.build());
}
typeCase_ = 2;
return this;
}
/**
* .common.SignaturePolicy.NOutOf n_out_of = 2 [json_name = "nOutOf"];
*/
public Builder mergeNOutOf(org.hyperledger.fabric.protos.common.SignaturePolicy.NOutOf value) {
if (nOutOfBuilder_ == null) {
if (typeCase_ == 2 &&
type_ != org.hyperledger.fabric.protos.common.SignaturePolicy.NOutOf.getDefaultInstance()) {
type_ = org.hyperledger.fabric.protos.common.SignaturePolicy.NOutOf.newBuilder((org.hyperledger.fabric.protos.common.SignaturePolicy.NOutOf) type_)
.mergeFrom(value).buildPartial();
} else {
type_ = value;
}
onChanged();
} else {
if (typeCase_ == 2) {
nOutOfBuilder_.mergeFrom(value);
} else {
nOutOfBuilder_.setMessage(value);
}
}
typeCase_ = 2;
return this;
}
/**
* .common.SignaturePolicy.NOutOf n_out_of = 2 [json_name = "nOutOf"];
*/
public Builder clearNOutOf() {
if (nOutOfBuilder_ == null) {
if (typeCase_ == 2) {
typeCase_ = 0;
type_ = null;
onChanged();
}
} else {
if (typeCase_ == 2) {
typeCase_ = 0;
type_ = null;
}
nOutOfBuilder_.clear();
}
return this;
}
/**
* .common.SignaturePolicy.NOutOf n_out_of = 2 [json_name = "nOutOf"];
*/
public org.hyperledger.fabric.protos.common.SignaturePolicy.NOutOf.Builder getNOutOfBuilder() {
return getNOutOfFieldBuilder().getBuilder();
}
/**
* .common.SignaturePolicy.NOutOf n_out_of = 2 [json_name = "nOutOf"];
*/
@java.lang.Override
public org.hyperledger.fabric.protos.common.SignaturePolicy.NOutOfOrBuilder getNOutOfOrBuilder() {
if ((typeCase_ == 2) && (nOutOfBuilder_ != null)) {
return nOutOfBuilder_.getMessageOrBuilder();
} else {
if (typeCase_ == 2) {
return (org.hyperledger.fabric.protos.common.SignaturePolicy.NOutOf) type_;
}
return org.hyperledger.fabric.protos.common.SignaturePolicy.NOutOf.getDefaultInstance();
}
}
/**
* .common.SignaturePolicy.NOutOf n_out_of = 2 [json_name = "nOutOf"];
*/
private com.google.protobuf.SingleFieldBuilder<
org.hyperledger.fabric.protos.common.SignaturePolicy.NOutOf, org.hyperledger.fabric.protos.common.SignaturePolicy.NOutOf.Builder, org.hyperledger.fabric.protos.common.SignaturePolicy.NOutOfOrBuilder>
getNOutOfFieldBuilder() {
if (nOutOfBuilder_ == null) {
if (!(typeCase_ == 2)) {
type_ = org.hyperledger.fabric.protos.common.SignaturePolicy.NOutOf.getDefaultInstance();
}
nOutOfBuilder_ = new com.google.protobuf.SingleFieldBuilder<
org.hyperledger.fabric.protos.common.SignaturePolicy.NOutOf, org.hyperledger.fabric.protos.common.SignaturePolicy.NOutOf.Builder, org.hyperledger.fabric.protos.common.SignaturePolicy.NOutOfOrBuilder>(
(org.hyperledger.fabric.protos.common.SignaturePolicy.NOutOf) type_,
getParentForChildren(),
isClean());
type_ = null;
}
typeCase_ = 2;
onChanged();
return nOutOfBuilder_;
}
// @@protoc_insertion_point(builder_scope:common.SignaturePolicy)
}
// @@protoc_insertion_point(class_scope:common.SignaturePolicy)
private static final org.hyperledger.fabric.protos.common.SignaturePolicy DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.common.SignaturePolicy();
}
public static org.hyperledger.fabric.protos.common.SignaturePolicy getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public SignaturePolicy 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.SignaturePolicy getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy