org.bitcoinj.protocols.channels.ClientState Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: storedclientpaymentchannel.proto
package org.bitcoinj.protocols.channels;
public final class ClientState {
private ClientState() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
}
public interface StoredClientPaymentChannelsOrBuilder extends
// @@protoc_insertion_point(interface_extends:paymentchannels.StoredClientPaymentChannels)
com.google.protobuf.MessageOrBuilder {
/**
* repeated .paymentchannels.StoredClientPaymentChannel channels = 1;
*/
java.util.List
getChannelsList();
/**
* repeated .paymentchannels.StoredClientPaymentChannel channels = 1;
*/
org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel getChannels(int index);
/**
* repeated .paymentchannels.StoredClientPaymentChannel channels = 1;
*/
int getChannelsCount();
/**
* repeated .paymentchannels.StoredClientPaymentChannel channels = 1;
*/
java.util.List extends org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannelOrBuilder>
getChannelsOrBuilderList();
/**
* repeated .paymentchannels.StoredClientPaymentChannel channels = 1;
*/
org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannelOrBuilder getChannelsOrBuilder(
int index);
}
/**
* Protobuf type {@code paymentchannels.StoredClientPaymentChannels}
*
*
* A set of StoredPaymentChannel's
*
*/
public static final class StoredClientPaymentChannels extends
com.google.protobuf.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:paymentchannels.StoredClientPaymentChannels)
StoredClientPaymentChannelsOrBuilder {
// Use StoredClientPaymentChannels.newBuilder() to construct.
private StoredClientPaymentChannels(com.google.protobuf.GeneratedMessage.Builder> builder) {
super(builder);
this.unknownFields = builder.getUnknownFields();
}
private StoredClientPaymentChannels(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
private static final StoredClientPaymentChannels defaultInstance;
public static StoredClientPaymentChannels getDefaultInstance() {
return defaultInstance;
}
public StoredClientPaymentChannels getDefaultInstanceForType() {
return defaultInstance;
}
private final com.google.protobuf.UnknownFieldSet unknownFields;
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private StoredClientPaymentChannels(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
initFields();
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownField(input, unknownFields,
extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
channels_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
channels_.add(input.readMessage(org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel.PARSER, extensionRegistry));
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e.getMessage()).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
channels_ = java.util.Collections.unmodifiableList(channels_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.bitcoinj.protocols.channels.ClientState.internal_static_paymentchannels_StoredClientPaymentChannels_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.bitcoinj.protocols.channels.ClientState.internal_static_paymentchannels_StoredClientPaymentChannels_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannels.class, org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannels.Builder.class);
}
public static com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
public StoredClientPaymentChannels parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new StoredClientPaymentChannels(input, extensionRegistry);
}
};
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public static final int CHANNELS_FIELD_NUMBER = 1;
private java.util.List channels_;
/**
* repeated .paymentchannels.StoredClientPaymentChannel channels = 1;
*/
public java.util.List getChannelsList() {
return channels_;
}
/**
* repeated .paymentchannels.StoredClientPaymentChannel channels = 1;
*/
public java.util.List extends org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannelOrBuilder>
getChannelsOrBuilderList() {
return channels_;
}
/**
* repeated .paymentchannels.StoredClientPaymentChannel channels = 1;
*/
public int getChannelsCount() {
return channels_.size();
}
/**
* repeated .paymentchannels.StoredClientPaymentChannel channels = 1;
*/
public org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel getChannels(int index) {
return channels_.get(index);
}
/**
* repeated .paymentchannels.StoredClientPaymentChannel channels = 1;
*/
public org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannelOrBuilder getChannelsOrBuilder(
int index) {
return channels_.get(index);
}
private void initFields() {
channels_ = java.util.Collections.emptyList();
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
for (int i = 0; i < getChannelsCount(); i++) {
if (!getChannels(i).isInitialized()) {
memoizedIsInitialized = 0;
return false;
}
}
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
for (int i = 0; i < channels_.size(); i++) {
output.writeMessage(1, channels_.get(i));
}
getUnknownFields().writeTo(output);
}
private int memoizedSerializedSize = -1;
public int getSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < channels_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, channels_.get(i));
}
size += getUnknownFields().getSerializedSize();
memoizedSerializedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
protected java.lang.Object writeReplace()
throws java.io.ObjectStreamException {
return super.writeReplace();
}
public static org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannels parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannels parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannels parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannels parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannels parseFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannels parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannels parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input);
}
public static org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannels parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input, extensionRegistry);
}
public static org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannels parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannels parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static Builder newBuilder() { return Builder.create(); }
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder(org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannels prototype) {
return newBuilder().mergeFrom(prototype);
}
public Builder toBuilder() { return newBuilder(this); }
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code paymentchannels.StoredClientPaymentChannels}
*
*
* A set of StoredPaymentChannel's
*
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder implements
// @@protoc_insertion_point(builder_implements:paymentchannels.StoredClientPaymentChannels)
org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannelsOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.bitcoinj.protocols.channels.ClientState.internal_static_paymentchannels_StoredClientPaymentChannels_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.bitcoinj.protocols.channels.ClientState.internal_static_paymentchannels_StoredClientPaymentChannels_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannels.class, org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannels.Builder.class);
}
// Construct using org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannels.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
getChannelsFieldBuilder();
}
}
private static Builder create() {
return new Builder();
}
public Builder clear() {
super.clear();
if (channelsBuilder_ == null) {
channels_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
channelsBuilder_.clear();
}
return this;
}
public Builder clone() {
return create().mergeFrom(buildPartial());
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.bitcoinj.protocols.channels.ClientState.internal_static_paymentchannels_StoredClientPaymentChannels_descriptor;
}
public org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannels getDefaultInstanceForType() {
return org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannels.getDefaultInstance();
}
public org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannels build() {
org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannels result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannels buildPartial() {
org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannels result = new org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannels(this);
int from_bitField0_ = bitField0_;
if (channelsBuilder_ == null) {
if (((bitField0_ & 0x00000001) == 0x00000001)) {
channels_ = java.util.Collections.unmodifiableList(channels_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.channels_ = channels_;
} else {
result.channels_ = channelsBuilder_.build();
}
onBuilt();
return result;
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannels) {
return mergeFrom((org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannels)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannels other) {
if (other == org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannels.getDefaultInstance()) return this;
if (channelsBuilder_ == null) {
if (!other.channels_.isEmpty()) {
if (channels_.isEmpty()) {
channels_ = other.channels_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureChannelsIsMutable();
channels_.addAll(other.channels_);
}
onChanged();
}
} else {
if (!other.channels_.isEmpty()) {
if (channelsBuilder_.isEmpty()) {
channelsBuilder_.dispose();
channelsBuilder_ = null;
channels_ = other.channels_;
bitField0_ = (bitField0_ & ~0x00000001);
channelsBuilder_ =
com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
getChannelsFieldBuilder() : null;
} else {
channelsBuilder_.addAllMessages(other.channels_);
}
}
}
this.mergeUnknownFields(other.getUnknownFields());
return this;
}
public final boolean isInitialized() {
for (int i = 0; i < getChannelsCount(); i++) {
if (!getChannels(i).isInitialized()) {
return false;
}
}
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannels parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannels) e.getUnfinishedMessage();
throw e;
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.util.List channels_ =
java.util.Collections.emptyList();
private void ensureChannelsIsMutable() {
if (!((bitField0_ & 0x00000001) == 0x00000001)) {
channels_ = new java.util.ArrayList(channels_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilder<
org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel, org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel.Builder, org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannelOrBuilder> channelsBuilder_;
/**
* repeated .paymentchannels.StoredClientPaymentChannel channels = 1;
*/
public java.util.List getChannelsList() {
if (channelsBuilder_ == null) {
return java.util.Collections.unmodifiableList(channels_);
} else {
return channelsBuilder_.getMessageList();
}
}
/**
* repeated .paymentchannels.StoredClientPaymentChannel channels = 1;
*/
public int getChannelsCount() {
if (channelsBuilder_ == null) {
return channels_.size();
} else {
return channelsBuilder_.getCount();
}
}
/**
* repeated .paymentchannels.StoredClientPaymentChannel channels = 1;
*/
public org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel getChannels(int index) {
if (channelsBuilder_ == null) {
return channels_.get(index);
} else {
return channelsBuilder_.getMessage(index);
}
}
/**
* repeated .paymentchannels.StoredClientPaymentChannel channels = 1;
*/
public Builder setChannels(
int index, org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel value) {
if (channelsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureChannelsIsMutable();
channels_.set(index, value);
onChanged();
} else {
channelsBuilder_.setMessage(index, value);
}
return this;
}
/**
* repeated .paymentchannels.StoredClientPaymentChannel channels = 1;
*/
public Builder setChannels(
int index, org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel.Builder builderForValue) {
if (channelsBuilder_ == null) {
ensureChannelsIsMutable();
channels_.set(index, builderForValue.build());
onChanged();
} else {
channelsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .paymentchannels.StoredClientPaymentChannel channels = 1;
*/
public Builder addChannels(org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel value) {
if (channelsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureChannelsIsMutable();
channels_.add(value);
onChanged();
} else {
channelsBuilder_.addMessage(value);
}
return this;
}
/**
* repeated .paymentchannels.StoredClientPaymentChannel channels = 1;
*/
public Builder addChannels(
int index, org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel value) {
if (channelsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureChannelsIsMutable();
channels_.add(index, value);
onChanged();
} else {
channelsBuilder_.addMessage(index, value);
}
return this;
}
/**
* repeated .paymentchannels.StoredClientPaymentChannel channels = 1;
*/
public Builder addChannels(
org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel.Builder builderForValue) {
if (channelsBuilder_ == null) {
ensureChannelsIsMutable();
channels_.add(builderForValue.build());
onChanged();
} else {
channelsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* repeated .paymentchannels.StoredClientPaymentChannel channels = 1;
*/
public Builder addChannels(
int index, org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel.Builder builderForValue) {
if (channelsBuilder_ == null) {
ensureChannelsIsMutable();
channels_.add(index, builderForValue.build());
onChanged();
} else {
channelsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .paymentchannels.StoredClientPaymentChannel channels = 1;
*/
public Builder addAllChannels(
java.lang.Iterable extends org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel> values) {
if (channelsBuilder_ == null) {
ensureChannelsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, channels_);
onChanged();
} else {
channelsBuilder_.addAllMessages(values);
}
return this;
}
/**
* repeated .paymentchannels.StoredClientPaymentChannel channels = 1;
*/
public Builder clearChannels() {
if (channelsBuilder_ == null) {
channels_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
channelsBuilder_.clear();
}
return this;
}
/**
* repeated .paymentchannels.StoredClientPaymentChannel channels = 1;
*/
public Builder removeChannels(int index) {
if (channelsBuilder_ == null) {
ensureChannelsIsMutable();
channels_.remove(index);
onChanged();
} else {
channelsBuilder_.remove(index);
}
return this;
}
/**
* repeated .paymentchannels.StoredClientPaymentChannel channels = 1;
*/
public org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel.Builder getChannelsBuilder(
int index) {
return getChannelsFieldBuilder().getBuilder(index);
}
/**
* repeated .paymentchannels.StoredClientPaymentChannel channels = 1;
*/
public org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannelOrBuilder getChannelsOrBuilder(
int index) {
if (channelsBuilder_ == null) {
return channels_.get(index); } else {
return channelsBuilder_.getMessageOrBuilder(index);
}
}
/**
* repeated .paymentchannels.StoredClientPaymentChannel channels = 1;
*/
public java.util.List extends org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannelOrBuilder>
getChannelsOrBuilderList() {
if (channelsBuilder_ != null) {
return channelsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(channels_);
}
}
/**
* repeated .paymentchannels.StoredClientPaymentChannel channels = 1;
*/
public org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel.Builder addChannelsBuilder() {
return getChannelsFieldBuilder().addBuilder(
org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel.getDefaultInstance());
}
/**
* repeated .paymentchannels.StoredClientPaymentChannel channels = 1;
*/
public org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel.Builder addChannelsBuilder(
int index) {
return getChannelsFieldBuilder().addBuilder(
index, org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel.getDefaultInstance());
}
/**
* repeated .paymentchannels.StoredClientPaymentChannel channels = 1;
*/
public java.util.List
getChannelsBuilderList() {
return getChannelsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilder<
org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel, org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel.Builder, org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannelOrBuilder>
getChannelsFieldBuilder() {
if (channelsBuilder_ == null) {
channelsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel, org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel.Builder, org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannelOrBuilder>(
channels_,
((bitField0_ & 0x00000001) == 0x00000001),
getParentForChildren(),
isClean());
channels_ = null;
}
return channelsBuilder_;
}
// @@protoc_insertion_point(builder_scope:paymentchannels.StoredClientPaymentChannels)
}
static {
defaultInstance = new StoredClientPaymentChannels(true);
defaultInstance.initFields();
}
// @@protoc_insertion_point(class_scope:paymentchannels.StoredClientPaymentChannels)
}
public interface StoredClientPaymentChannelOrBuilder extends
// @@protoc_insertion_point(interface_extends:paymentchannels.StoredClientPaymentChannel)
com.google.protobuf.MessageOrBuilder {
/**
* required bytes id = 1;
*/
boolean hasId();
/**
* required bytes id = 1;
*/
com.google.protobuf.ByteString getId();
/**
* required bytes contractTransaction = 2;
*/
boolean hasContractTransaction();
/**
* required bytes contractTransaction = 2;
*/
com.google.protobuf.ByteString getContractTransaction();
/**
* required bytes refundTransaction = 3;
*/
boolean hasRefundTransaction();
/**
* required bytes refundTransaction = 3;
*/
com.google.protobuf.ByteString getRefundTransaction();
/**
* required bytes myPublicKey = 8;
*/
boolean hasMyPublicKey();
/**
* required bytes myPublicKey = 8;
*/
com.google.protobuf.ByteString getMyPublicKey();
/**
* required bytes myKey = 4;
*
*
* Deprecated, key is already stored in the wallet, and found using myPublicKey;
*
*/
boolean hasMyKey();
/**
* required bytes myKey = 4;
*
*
* Deprecated, key is already stored in the wallet, and found using myPublicKey;
*
*/
com.google.protobuf.ByteString getMyKey();
/**
* required uint64 valueToMe = 5;
*/
boolean hasValueToMe();
/**
* required uint64 valueToMe = 5;
*/
long getValueToMe();
/**
* required uint64 refundFees = 6;
*
*
* Fees required to refund the transaction.
*
*/
boolean hasRefundFees();
/**
* required uint64 refundFees = 6;
*
*
* Fees required to refund the transaction.
*
*/
long getRefundFees();
/**
* optional bytes closeTransactionHash = 7;
*
*
* When set, the hash of the transaction that was presented by the server for closure of the channel.
* It spends the contractTransaction and is expected to be broadcast to the network by the server.
* It's supposed to be in the wallet already.
*
*/
boolean hasCloseTransactionHash();
/**
* optional bytes closeTransactionHash = 7;
*
*
* When set, the hash of the transaction that was presented by the server for closure of the channel.
* It spends the contractTransaction and is expected to be broadcast to the network by the server.
* It's supposed to be in the wallet already.
*
*/
com.google.protobuf.ByteString getCloseTransactionHash();
/**
* optional uint32 majorVersion = 9 [default = 1];
*/
boolean hasMajorVersion();
/**
* optional uint32 majorVersion = 9 [default = 1];
*/
int getMajorVersion();
/**
* optional uint64 expiryTime = 10;
*
*
* The expiry time of the CLTV lock. Only used in protocol v2.
*
*/
boolean hasExpiryTime();
/**
* optional uint64 expiryTime = 10;
*
*
* The expiry time of the CLTV lock. Only used in protocol v2.
*
*/
long getExpiryTime();
/**
* optional bytes serverKey = 11;
*
*
* The server's public key. Only used in protocol v2.
*
*/
boolean hasServerKey();
/**
* optional bytes serverKey = 11;
*
*
* The server's public key. Only used in protocol v2.
*
*/
com.google.protobuf.ByteString getServerKey();
}
/**
* Protobuf type {@code paymentchannels.StoredClientPaymentChannel}
*
*
* A client-side payment channel in serialized form, which can be reloaded later if the client restarts and wants to
* reopen an existing channel
*
*/
public static final class StoredClientPaymentChannel extends
com.google.protobuf.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:paymentchannels.StoredClientPaymentChannel)
StoredClientPaymentChannelOrBuilder {
// Use StoredClientPaymentChannel.newBuilder() to construct.
private StoredClientPaymentChannel(com.google.protobuf.GeneratedMessage.Builder> builder) {
super(builder);
this.unknownFields = builder.getUnknownFields();
}
private StoredClientPaymentChannel(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
private static final StoredClientPaymentChannel defaultInstance;
public static StoredClientPaymentChannel getDefaultInstance() {
return defaultInstance;
}
public StoredClientPaymentChannel getDefaultInstanceForType() {
return defaultInstance;
}
private final com.google.protobuf.UnknownFieldSet unknownFields;
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private StoredClientPaymentChannel(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
initFields();
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownField(input, unknownFields,
extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
bitField0_ |= 0x00000001;
id_ = input.readBytes();
break;
}
case 18: {
bitField0_ |= 0x00000002;
contractTransaction_ = input.readBytes();
break;
}
case 26: {
bitField0_ |= 0x00000004;
refundTransaction_ = input.readBytes();
break;
}
case 34: {
bitField0_ |= 0x00000010;
myKey_ = input.readBytes();
break;
}
case 40: {
bitField0_ |= 0x00000020;
valueToMe_ = input.readUInt64();
break;
}
case 48: {
bitField0_ |= 0x00000040;
refundFees_ = input.readUInt64();
break;
}
case 58: {
bitField0_ |= 0x00000080;
closeTransactionHash_ = input.readBytes();
break;
}
case 66: {
bitField0_ |= 0x00000008;
myPublicKey_ = input.readBytes();
break;
}
case 72: {
bitField0_ |= 0x00000100;
majorVersion_ = input.readUInt32();
break;
}
case 80: {
bitField0_ |= 0x00000200;
expiryTime_ = input.readUInt64();
break;
}
case 90: {
bitField0_ |= 0x00000400;
serverKey_ = input.readBytes();
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e.getMessage()).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.bitcoinj.protocols.channels.ClientState.internal_static_paymentchannels_StoredClientPaymentChannel_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.bitcoinj.protocols.channels.ClientState.internal_static_paymentchannels_StoredClientPaymentChannel_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel.class, org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel.Builder.class);
}
public static com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
public StoredClientPaymentChannel parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new StoredClientPaymentChannel(input, extensionRegistry);
}
};
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
private int bitField0_;
public static final int ID_FIELD_NUMBER = 1;
private com.google.protobuf.ByteString id_;
/**
* required bytes id = 1;
*/
public boolean hasId() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* required bytes id = 1;
*/
public com.google.protobuf.ByteString getId() {
return id_;
}
public static final int CONTRACTTRANSACTION_FIELD_NUMBER = 2;
private com.google.protobuf.ByteString contractTransaction_;
/**
* required bytes contractTransaction = 2;
*/
public boolean hasContractTransaction() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
* required bytes contractTransaction = 2;
*/
public com.google.protobuf.ByteString getContractTransaction() {
return contractTransaction_;
}
public static final int REFUNDTRANSACTION_FIELD_NUMBER = 3;
private com.google.protobuf.ByteString refundTransaction_;
/**
* required bytes refundTransaction = 3;
*/
public boolean hasRefundTransaction() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
* required bytes refundTransaction = 3;
*/
public com.google.protobuf.ByteString getRefundTransaction() {
return refundTransaction_;
}
public static final int MYPUBLICKEY_FIELD_NUMBER = 8;
private com.google.protobuf.ByteString myPublicKey_;
/**
* required bytes myPublicKey = 8;
*/
public boolean hasMyPublicKey() {
return ((bitField0_ & 0x00000008) == 0x00000008);
}
/**
* required bytes myPublicKey = 8;
*/
public com.google.protobuf.ByteString getMyPublicKey() {
return myPublicKey_;
}
public static final int MYKEY_FIELD_NUMBER = 4;
private com.google.protobuf.ByteString myKey_;
/**
* required bytes myKey = 4;
*
*
* Deprecated, key is already stored in the wallet, and found using myPublicKey;
*
*/
public boolean hasMyKey() {
return ((bitField0_ & 0x00000010) == 0x00000010);
}
/**
* required bytes myKey = 4;
*
*
* Deprecated, key is already stored in the wallet, and found using myPublicKey;
*
*/
public com.google.protobuf.ByteString getMyKey() {
return myKey_;
}
public static final int VALUETOME_FIELD_NUMBER = 5;
private long valueToMe_;
/**
* required uint64 valueToMe = 5;
*/
public boolean hasValueToMe() {
return ((bitField0_ & 0x00000020) == 0x00000020);
}
/**
* required uint64 valueToMe = 5;
*/
public long getValueToMe() {
return valueToMe_;
}
public static final int REFUNDFEES_FIELD_NUMBER = 6;
private long refundFees_;
/**
* required uint64 refundFees = 6;
*
*
* Fees required to refund the transaction.
*
*/
public boolean hasRefundFees() {
return ((bitField0_ & 0x00000040) == 0x00000040);
}
/**
* required uint64 refundFees = 6;
*
*
* Fees required to refund the transaction.
*
*/
public long getRefundFees() {
return refundFees_;
}
public static final int CLOSETRANSACTIONHASH_FIELD_NUMBER = 7;
private com.google.protobuf.ByteString closeTransactionHash_;
/**
* optional bytes closeTransactionHash = 7;
*
*
* When set, the hash of the transaction that was presented by the server for closure of the channel.
* It spends the contractTransaction and is expected to be broadcast to the network by the server.
* It's supposed to be in the wallet already.
*
*/
public boolean hasCloseTransactionHash() {
return ((bitField0_ & 0x00000080) == 0x00000080);
}
/**
* optional bytes closeTransactionHash = 7;
*
*
* When set, the hash of the transaction that was presented by the server for closure of the channel.
* It spends the contractTransaction and is expected to be broadcast to the network by the server.
* It's supposed to be in the wallet already.
*
*/
public com.google.protobuf.ByteString getCloseTransactionHash() {
return closeTransactionHash_;
}
public static final int MAJORVERSION_FIELD_NUMBER = 9;
private int majorVersion_;
/**
* optional uint32 majorVersion = 9 [default = 1];
*/
public boolean hasMajorVersion() {
return ((bitField0_ & 0x00000100) == 0x00000100);
}
/**
* optional uint32 majorVersion = 9 [default = 1];
*/
public int getMajorVersion() {
return majorVersion_;
}
public static final int EXPIRYTIME_FIELD_NUMBER = 10;
private long expiryTime_;
/**
* optional uint64 expiryTime = 10;
*
*
* The expiry time of the CLTV lock. Only used in protocol v2.
*
*/
public boolean hasExpiryTime() {
return ((bitField0_ & 0x00000200) == 0x00000200);
}
/**
* optional uint64 expiryTime = 10;
*
*
* The expiry time of the CLTV lock. Only used in protocol v2.
*
*/
public long getExpiryTime() {
return expiryTime_;
}
public static final int SERVERKEY_FIELD_NUMBER = 11;
private com.google.protobuf.ByteString serverKey_;
/**
* optional bytes serverKey = 11;
*
*
* The server's public key. Only used in protocol v2.
*
*/
public boolean hasServerKey() {
return ((bitField0_ & 0x00000400) == 0x00000400);
}
/**
* optional bytes serverKey = 11;
*
*
* The server's public key. Only used in protocol v2.
*
*/
public com.google.protobuf.ByteString getServerKey() {
return serverKey_;
}
private void initFields() {
id_ = com.google.protobuf.ByteString.EMPTY;
contractTransaction_ = com.google.protobuf.ByteString.EMPTY;
refundTransaction_ = com.google.protobuf.ByteString.EMPTY;
myPublicKey_ = com.google.protobuf.ByteString.EMPTY;
myKey_ = com.google.protobuf.ByteString.EMPTY;
valueToMe_ = 0L;
refundFees_ = 0L;
closeTransactionHash_ = com.google.protobuf.ByteString.EMPTY;
majorVersion_ = 1;
expiryTime_ = 0L;
serverKey_ = com.google.protobuf.ByteString.EMPTY;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
if (!hasId()) {
memoizedIsInitialized = 0;
return false;
}
if (!hasContractTransaction()) {
memoizedIsInitialized = 0;
return false;
}
if (!hasRefundTransaction()) {
memoizedIsInitialized = 0;
return false;
}
if (!hasMyPublicKey()) {
memoizedIsInitialized = 0;
return false;
}
if (!hasMyKey()) {
memoizedIsInitialized = 0;
return false;
}
if (!hasValueToMe()) {
memoizedIsInitialized = 0;
return false;
}
if (!hasRefundFees()) {
memoizedIsInitialized = 0;
return false;
}
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (((bitField0_ & 0x00000001) == 0x00000001)) {
output.writeBytes(1, id_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
output.writeBytes(2, contractTransaction_);
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
output.writeBytes(3, refundTransaction_);
}
if (((bitField0_ & 0x00000010) == 0x00000010)) {
output.writeBytes(4, myKey_);
}
if (((bitField0_ & 0x00000020) == 0x00000020)) {
output.writeUInt64(5, valueToMe_);
}
if (((bitField0_ & 0x00000040) == 0x00000040)) {
output.writeUInt64(6, refundFees_);
}
if (((bitField0_ & 0x00000080) == 0x00000080)) {
output.writeBytes(7, closeTransactionHash_);
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
output.writeBytes(8, myPublicKey_);
}
if (((bitField0_ & 0x00000100) == 0x00000100)) {
output.writeUInt32(9, majorVersion_);
}
if (((bitField0_ & 0x00000200) == 0x00000200)) {
output.writeUInt64(10, expiryTime_);
}
if (((bitField0_ & 0x00000400) == 0x00000400)) {
output.writeBytes(11, serverKey_);
}
getUnknownFields().writeTo(output);
}
private int memoizedSerializedSize = -1;
public int getSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(1, id_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(2, contractTransaction_);
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(3, refundTransaction_);
}
if (((bitField0_ & 0x00000010) == 0x00000010)) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(4, myKey_);
}
if (((bitField0_ & 0x00000020) == 0x00000020)) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(5, valueToMe_);
}
if (((bitField0_ & 0x00000040) == 0x00000040)) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(6, refundFees_);
}
if (((bitField0_ & 0x00000080) == 0x00000080)) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(7, closeTransactionHash_);
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(8, myPublicKey_);
}
if (((bitField0_ & 0x00000100) == 0x00000100)) {
size += com.google.protobuf.CodedOutputStream
.computeUInt32Size(9, majorVersion_);
}
if (((bitField0_ & 0x00000200) == 0x00000200)) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(10, expiryTime_);
}
if (((bitField0_ & 0x00000400) == 0x00000400)) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(11, serverKey_);
}
size += getUnknownFields().getSerializedSize();
memoizedSerializedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
protected java.lang.Object writeReplace()
throws java.io.ObjectStreamException {
return super.writeReplace();
}
public static org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel parseFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input);
}
public static org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input, extensionRegistry);
}
public static org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static Builder newBuilder() { return Builder.create(); }
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder(org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel prototype) {
return newBuilder().mergeFrom(prototype);
}
public Builder toBuilder() { return newBuilder(this); }
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code paymentchannels.StoredClientPaymentChannel}
*
*
* A client-side payment channel in serialized form, which can be reloaded later if the client restarts and wants to
* reopen an existing channel
*
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder implements
// @@protoc_insertion_point(builder_implements:paymentchannels.StoredClientPaymentChannel)
org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannelOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.bitcoinj.protocols.channels.ClientState.internal_static_paymentchannels_StoredClientPaymentChannel_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.bitcoinj.protocols.channels.ClientState.internal_static_paymentchannels_StoredClientPaymentChannel_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel.class, org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel.Builder.class);
}
// Construct using org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
}
}
private static Builder create() {
return new Builder();
}
public Builder clear() {
super.clear();
id_ = com.google.protobuf.ByteString.EMPTY;
bitField0_ = (bitField0_ & ~0x00000001);
contractTransaction_ = com.google.protobuf.ByteString.EMPTY;
bitField0_ = (bitField0_ & ~0x00000002);
refundTransaction_ = com.google.protobuf.ByteString.EMPTY;
bitField0_ = (bitField0_ & ~0x00000004);
myPublicKey_ = com.google.protobuf.ByteString.EMPTY;
bitField0_ = (bitField0_ & ~0x00000008);
myKey_ = com.google.protobuf.ByteString.EMPTY;
bitField0_ = (bitField0_ & ~0x00000010);
valueToMe_ = 0L;
bitField0_ = (bitField0_ & ~0x00000020);
refundFees_ = 0L;
bitField0_ = (bitField0_ & ~0x00000040);
closeTransactionHash_ = com.google.protobuf.ByteString.EMPTY;
bitField0_ = (bitField0_ & ~0x00000080);
majorVersion_ = 1;
bitField0_ = (bitField0_ & ~0x00000100);
expiryTime_ = 0L;
bitField0_ = (bitField0_ & ~0x00000200);
serverKey_ = com.google.protobuf.ByteString.EMPTY;
bitField0_ = (bitField0_ & ~0x00000400);
return this;
}
public Builder clone() {
return create().mergeFrom(buildPartial());
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.bitcoinj.protocols.channels.ClientState.internal_static_paymentchannels_StoredClientPaymentChannel_descriptor;
}
public org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel getDefaultInstanceForType() {
return org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel.getDefaultInstance();
}
public org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel build() {
org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel buildPartial() {
org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel result = new org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x00000001;
}
result.id_ = id_;
if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
to_bitField0_ |= 0x00000002;
}
result.contractTransaction_ = contractTransaction_;
if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
to_bitField0_ |= 0x00000004;
}
result.refundTransaction_ = refundTransaction_;
if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
to_bitField0_ |= 0x00000008;
}
result.myPublicKey_ = myPublicKey_;
if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
to_bitField0_ |= 0x00000010;
}
result.myKey_ = myKey_;
if (((from_bitField0_ & 0x00000020) == 0x00000020)) {
to_bitField0_ |= 0x00000020;
}
result.valueToMe_ = valueToMe_;
if (((from_bitField0_ & 0x00000040) == 0x00000040)) {
to_bitField0_ |= 0x00000040;
}
result.refundFees_ = refundFees_;
if (((from_bitField0_ & 0x00000080) == 0x00000080)) {
to_bitField0_ |= 0x00000080;
}
result.closeTransactionHash_ = closeTransactionHash_;
if (((from_bitField0_ & 0x00000100) == 0x00000100)) {
to_bitField0_ |= 0x00000100;
}
result.majorVersion_ = majorVersion_;
if (((from_bitField0_ & 0x00000200) == 0x00000200)) {
to_bitField0_ |= 0x00000200;
}
result.expiryTime_ = expiryTime_;
if (((from_bitField0_ & 0x00000400) == 0x00000400)) {
to_bitField0_ |= 0x00000400;
}
result.serverKey_ = serverKey_;
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel) {
return mergeFrom((org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel other) {
if (other == org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel.getDefaultInstance()) return this;
if (other.hasId()) {
setId(other.getId());
}
if (other.hasContractTransaction()) {
setContractTransaction(other.getContractTransaction());
}
if (other.hasRefundTransaction()) {
setRefundTransaction(other.getRefundTransaction());
}
if (other.hasMyPublicKey()) {
setMyPublicKey(other.getMyPublicKey());
}
if (other.hasMyKey()) {
setMyKey(other.getMyKey());
}
if (other.hasValueToMe()) {
setValueToMe(other.getValueToMe());
}
if (other.hasRefundFees()) {
setRefundFees(other.getRefundFees());
}
if (other.hasCloseTransactionHash()) {
setCloseTransactionHash(other.getCloseTransactionHash());
}
if (other.hasMajorVersion()) {
setMajorVersion(other.getMajorVersion());
}
if (other.hasExpiryTime()) {
setExpiryTime(other.getExpiryTime());
}
if (other.hasServerKey()) {
setServerKey(other.getServerKey());
}
this.mergeUnknownFields(other.getUnknownFields());
return this;
}
public final boolean isInitialized() {
if (!hasId()) {
return false;
}
if (!hasContractTransaction()) {
return false;
}
if (!hasRefundTransaction()) {
return false;
}
if (!hasMyPublicKey()) {
return false;
}
if (!hasMyKey()) {
return false;
}
if (!hasValueToMe()) {
return false;
}
if (!hasRefundFees()) {
return false;
}
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel) e.getUnfinishedMessage();
throw e;
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private com.google.protobuf.ByteString id_ = com.google.protobuf.ByteString.EMPTY;
/**
* required bytes id = 1;
*/
public boolean hasId() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* required bytes id = 1;
*/
public com.google.protobuf.ByteString getId() {
return id_;
}
/**
* required bytes id = 1;
*/
public Builder setId(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
id_ = value;
onChanged();
return this;
}
/**
* required bytes id = 1;
*/
public Builder clearId() {
bitField0_ = (bitField0_ & ~0x00000001);
id_ = getDefaultInstance().getId();
onChanged();
return this;
}
private com.google.protobuf.ByteString contractTransaction_ = com.google.protobuf.ByteString.EMPTY;
/**
* required bytes contractTransaction = 2;
*/
public boolean hasContractTransaction() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
* required bytes contractTransaction = 2;
*/
public com.google.protobuf.ByteString getContractTransaction() {
return contractTransaction_;
}
/**
* required bytes contractTransaction = 2;
*/
public Builder setContractTransaction(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000002;
contractTransaction_ = value;
onChanged();
return this;
}
/**
* required bytes contractTransaction = 2;
*/
public Builder clearContractTransaction() {
bitField0_ = (bitField0_ & ~0x00000002);
contractTransaction_ = getDefaultInstance().getContractTransaction();
onChanged();
return this;
}
private com.google.protobuf.ByteString refundTransaction_ = com.google.protobuf.ByteString.EMPTY;
/**
* required bytes refundTransaction = 3;
*/
public boolean hasRefundTransaction() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
* required bytes refundTransaction = 3;
*/
public com.google.protobuf.ByteString getRefundTransaction() {
return refundTransaction_;
}
/**
* required bytes refundTransaction = 3;
*/
public Builder setRefundTransaction(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000004;
refundTransaction_ = value;
onChanged();
return this;
}
/**
* required bytes refundTransaction = 3;
*/
public Builder clearRefundTransaction() {
bitField0_ = (bitField0_ & ~0x00000004);
refundTransaction_ = getDefaultInstance().getRefundTransaction();
onChanged();
return this;
}
private com.google.protobuf.ByteString myPublicKey_ = com.google.protobuf.ByteString.EMPTY;
/**
* required bytes myPublicKey = 8;
*/
public boolean hasMyPublicKey() {
return ((bitField0_ & 0x00000008) == 0x00000008);
}
/**
* required bytes myPublicKey = 8;
*/
public com.google.protobuf.ByteString getMyPublicKey() {
return myPublicKey_;
}
/**
* required bytes myPublicKey = 8;
*/
public Builder setMyPublicKey(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000008;
myPublicKey_ = value;
onChanged();
return this;
}
/**
* required bytes myPublicKey = 8;
*/
public Builder clearMyPublicKey() {
bitField0_ = (bitField0_ & ~0x00000008);
myPublicKey_ = getDefaultInstance().getMyPublicKey();
onChanged();
return this;
}
private com.google.protobuf.ByteString myKey_ = com.google.protobuf.ByteString.EMPTY;
/**
* required bytes myKey = 4;
*
*
* Deprecated, key is already stored in the wallet, and found using myPublicKey;
*
*/
public boolean hasMyKey() {
return ((bitField0_ & 0x00000010) == 0x00000010);
}
/**
* required bytes myKey = 4;
*
*
* Deprecated, key is already stored in the wallet, and found using myPublicKey;
*
*/
public com.google.protobuf.ByteString getMyKey() {
return myKey_;
}
/**
* required bytes myKey = 4;
*
*
* Deprecated, key is already stored in the wallet, and found using myPublicKey;
*
*/
public Builder setMyKey(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000010;
myKey_ = value;
onChanged();
return this;
}
/**
* required bytes myKey = 4;
*
*
* Deprecated, key is already stored in the wallet, and found using myPublicKey;
*
*/
public Builder clearMyKey() {
bitField0_ = (bitField0_ & ~0x00000010);
myKey_ = getDefaultInstance().getMyKey();
onChanged();
return this;
}
private long valueToMe_ ;
/**
* required uint64 valueToMe = 5;
*/
public boolean hasValueToMe() {
return ((bitField0_ & 0x00000020) == 0x00000020);
}
/**
* required uint64 valueToMe = 5;
*/
public long getValueToMe() {
return valueToMe_;
}
/**
* required uint64 valueToMe = 5;
*/
public Builder setValueToMe(long value) {
bitField0_ |= 0x00000020;
valueToMe_ = value;
onChanged();
return this;
}
/**
* required uint64 valueToMe = 5;
*/
public Builder clearValueToMe() {
bitField0_ = (bitField0_ & ~0x00000020);
valueToMe_ = 0L;
onChanged();
return this;
}
private long refundFees_ ;
/**
* required uint64 refundFees = 6;
*
*
* Fees required to refund the transaction.
*
*/
public boolean hasRefundFees() {
return ((bitField0_ & 0x00000040) == 0x00000040);
}
/**
* required uint64 refundFees = 6;
*
*
* Fees required to refund the transaction.
*
*/
public long getRefundFees() {
return refundFees_;
}
/**
* required uint64 refundFees = 6;
*
*
* Fees required to refund the transaction.
*
*/
public Builder setRefundFees(long value) {
bitField0_ |= 0x00000040;
refundFees_ = value;
onChanged();
return this;
}
/**
* required uint64 refundFees = 6;
*
*
* Fees required to refund the transaction.
*
*/
public Builder clearRefundFees() {
bitField0_ = (bitField0_ & ~0x00000040);
refundFees_ = 0L;
onChanged();
return this;
}
private com.google.protobuf.ByteString closeTransactionHash_ = com.google.protobuf.ByteString.EMPTY;
/**
* optional bytes closeTransactionHash = 7;
*
*
* When set, the hash of the transaction that was presented by the server for closure of the channel.
* It spends the contractTransaction and is expected to be broadcast to the network by the server.
* It's supposed to be in the wallet already.
*
*/
public boolean hasCloseTransactionHash() {
return ((bitField0_ & 0x00000080) == 0x00000080);
}
/**
* optional bytes closeTransactionHash = 7;
*
*
* When set, the hash of the transaction that was presented by the server for closure of the channel.
* It spends the contractTransaction and is expected to be broadcast to the network by the server.
* It's supposed to be in the wallet already.
*
*/
public com.google.protobuf.ByteString getCloseTransactionHash() {
return closeTransactionHash_;
}
/**
* optional bytes closeTransactionHash = 7;
*
*
* When set, the hash of the transaction that was presented by the server for closure of the channel.
* It spends the contractTransaction and is expected to be broadcast to the network by the server.
* It's supposed to be in the wallet already.
*
*/
public Builder setCloseTransactionHash(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000080;
closeTransactionHash_ = value;
onChanged();
return this;
}
/**
* optional bytes closeTransactionHash = 7;
*
*
* When set, the hash of the transaction that was presented by the server for closure of the channel.
* It spends the contractTransaction and is expected to be broadcast to the network by the server.
* It's supposed to be in the wallet already.
*
*/
public Builder clearCloseTransactionHash() {
bitField0_ = (bitField0_ & ~0x00000080);
closeTransactionHash_ = getDefaultInstance().getCloseTransactionHash();
onChanged();
return this;
}
private int majorVersion_ = 1;
/**
* optional uint32 majorVersion = 9 [default = 1];
*/
public boolean hasMajorVersion() {
return ((bitField0_ & 0x00000100) == 0x00000100);
}
/**
* optional uint32 majorVersion = 9 [default = 1];
*/
public int getMajorVersion() {
return majorVersion_;
}
/**
* optional uint32 majorVersion = 9 [default = 1];
*/
public Builder setMajorVersion(int value) {
bitField0_ |= 0x00000100;
majorVersion_ = value;
onChanged();
return this;
}
/**
* optional uint32 majorVersion = 9 [default = 1];
*/
public Builder clearMajorVersion() {
bitField0_ = (bitField0_ & ~0x00000100);
majorVersion_ = 1;
onChanged();
return this;
}
private long expiryTime_ ;
/**
* optional uint64 expiryTime = 10;
*
*
* The expiry time of the CLTV lock. Only used in protocol v2.
*
*/
public boolean hasExpiryTime() {
return ((bitField0_ & 0x00000200) == 0x00000200);
}
/**
* optional uint64 expiryTime = 10;
*
*
* The expiry time of the CLTV lock. Only used in protocol v2.
*
*/
public long getExpiryTime() {
return expiryTime_;
}
/**
* optional uint64 expiryTime = 10;
*
*
* The expiry time of the CLTV lock. Only used in protocol v2.
*
*/
public Builder setExpiryTime(long value) {
bitField0_ |= 0x00000200;
expiryTime_ = value;
onChanged();
return this;
}
/**
* optional uint64 expiryTime = 10;
*
*
* The expiry time of the CLTV lock. Only used in protocol v2.
*
*/
public Builder clearExpiryTime() {
bitField0_ = (bitField0_ & ~0x00000200);
expiryTime_ = 0L;
onChanged();
return this;
}
private com.google.protobuf.ByteString serverKey_ = com.google.protobuf.ByteString.EMPTY;
/**
* optional bytes serverKey = 11;
*
*
* The server's public key. Only used in protocol v2.
*
*/
public boolean hasServerKey() {
return ((bitField0_ & 0x00000400) == 0x00000400);
}
/**
* optional bytes serverKey = 11;
*
*
* The server's public key. Only used in protocol v2.
*
*/
public com.google.protobuf.ByteString getServerKey() {
return serverKey_;
}
/**
* optional bytes serverKey = 11;
*
*
* The server's public key. Only used in protocol v2.
*
*/
public Builder setServerKey(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000400;
serverKey_ = value;
onChanged();
return this;
}
/**
* optional bytes serverKey = 11;
*
*
* The server's public key. Only used in protocol v2.
*
*/
public Builder clearServerKey() {
bitField0_ = (bitField0_ & ~0x00000400);
serverKey_ = getDefaultInstance().getServerKey();
onChanged();
return this;
}
// @@protoc_insertion_point(builder_scope:paymentchannels.StoredClientPaymentChannel)
}
static {
defaultInstance = new StoredClientPaymentChannel(true);
defaultInstance.initFields();
}
// @@protoc_insertion_point(class_scope:paymentchannels.StoredClientPaymentChannel)
}
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_paymentchannels_StoredClientPaymentChannels_descriptor;
private static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_paymentchannels_StoredClientPaymentChannels_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_paymentchannels_StoredClientPaymentChannel_descriptor;
private static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_paymentchannels_StoredClientPaymentChannel_fieldAccessorTable;
public static com.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {
return descriptor;
}
private static com.google.protobuf.Descriptors.FileDescriptor
descriptor;
static {
java.lang.String[] descriptorData = {
"\n storedclientpaymentchannel.proto\022\017paym" +
"entchannels\"\\\n\033StoredClientPaymentChanne" +
"ls\022=\n\010channels\030\001 \003(\0132+.paymentchannels.S" +
"toredClientPaymentChannel\"\211\002\n\032StoredClie" +
"ntPaymentChannel\022\n\n\002id\030\001 \002(\014\022\033\n\023contract" +
"Transaction\030\002 \002(\014\022\031\n\021refundTransaction\030\003" +
" \002(\014\022\023\n\013myPublicKey\030\010 \002(\014\022\r\n\005myKey\030\004 \002(\014" +
"\022\021\n\tvalueToMe\030\005 \002(\004\022\022\n\nrefundFees\030\006 \002(\004\022" +
"\034\n\024closeTransactionHash\030\007 \001(\014\022\027\n\014majorVe" +
"rsion\030\t \001(\r:\0011\022\022\n\nexpiryTime\030\n \001(\004\022\021\n\tse",
"rverKey\030\013 \001(\014B.\n\037org.bitcoinj.protocols." +
"channelsB\013ClientState"
};
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() {
public com.google.protobuf.ExtensionRegistry assignDescriptors(
com.google.protobuf.Descriptors.FileDescriptor root) {
descriptor = root;
return null;
}
};
com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
}, assigner);
internal_static_paymentchannels_StoredClientPaymentChannels_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_paymentchannels_StoredClientPaymentChannels_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_paymentchannels_StoredClientPaymentChannels_descriptor,
new java.lang.String[] { "Channels", });
internal_static_paymentchannels_StoredClientPaymentChannel_descriptor =
getDescriptor().getMessageTypes().get(1);
internal_static_paymentchannels_StoredClientPaymentChannel_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_paymentchannels_StoredClientPaymentChannel_descriptor,
new java.lang.String[] { "Id", "ContractTransaction", "RefundTransaction", "MyPublicKey", "MyKey", "ValueToMe", "RefundFees", "CloseTransactionHash", "MajorVersion", "ExpiryTime", "ServerKey", });
}
// @@protoc_insertion_point(outer_class_scope)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy