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

org.bitcoin.protocols.payments.Protos Maven / Gradle / Ivy

The newest version!
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: paymentrequest.proto

package org.bitcoin.protocols.payments;

public final class Protos {
  private Protos() {}
  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistry registry) {
  }
  public interface OutputOrBuilder
      extends com.google.protobuf.MessageOrBuilder {

    // optional uint64 amount = 1 [default = 0];
    /**
     * optional uint64 amount = 1 [default = 0];
     *
     * 
     * amount is integer-number-of-satoshis
     * 
*/ boolean hasAmount(); /** * optional uint64 amount = 1 [default = 0]; * *
     * amount is integer-number-of-satoshis
     * 
*/ long getAmount(); // required bytes script = 2; /** * required bytes script = 2; * *
     * usually one of the standard Script forms
     * 
*/ boolean hasScript(); /** * required bytes script = 2; * *
     * usually one of the standard Script forms
     * 
*/ com.google.protobuf.ByteString getScript(); } /** * Protobuf type {@code payments.Output} * *
   * Generalized form of "send payment to this/these bitcoin addresses"
   * 
*/ public static final class Output extends com.google.protobuf.GeneratedMessage implements OutputOrBuilder { // Use Output.newBuilder() to construct. private Output(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } private Output(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private static final Output defaultInstance; public static Output getDefaultInstance() { return defaultInstance; } public Output getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private Output( 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 8: { bitField0_ |= 0x00000001; amount_ = input.readUInt64(); break; } case 18: { bitField0_ |= 0x00000002; script_ = 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.bitcoin.protocols.payments.Protos.internal_static_payments_Output_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.bitcoin.protocols.payments.Protos.internal_static_payments_Output_fieldAccessorTable .ensureFieldAccessorsInitialized( org.bitcoin.protocols.payments.Protos.Output.class, org.bitcoin.protocols.payments.Protos.Output.Builder.class); } public static com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { public Output parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new Output(input, extensionRegistry); } }; @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } private int bitField0_; // optional uint64 amount = 1 [default = 0]; public static final int AMOUNT_FIELD_NUMBER = 1; private long amount_; /** * optional uint64 amount = 1 [default = 0]; * *
     * amount is integer-number-of-satoshis
     * 
*/ public boolean hasAmount() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * optional uint64 amount = 1 [default = 0]; * *
     * amount is integer-number-of-satoshis
     * 
*/ public long getAmount() { return amount_; } // required bytes script = 2; public static final int SCRIPT_FIELD_NUMBER = 2; private com.google.protobuf.ByteString script_; /** * required bytes script = 2; * *
     * usually one of the standard Script forms
     * 
*/ public boolean hasScript() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * required bytes script = 2; * *
     * usually one of the standard Script forms
     * 
*/ public com.google.protobuf.ByteString getScript() { return script_; } private void initFields() { amount_ = 0L; script_ = com.google.protobuf.ByteString.EMPTY; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; if (!hasScript()) { 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.writeUInt64(1, amount_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeBytes(2, script_); } 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 .computeUInt64Size(1, amount_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(2, script_); } 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.bitcoin.protocols.payments.Protos.Output parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.bitcoin.protocols.payments.Protos.Output parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.bitcoin.protocols.payments.Protos.Output parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.bitcoin.protocols.payments.Protos.Output parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.bitcoin.protocols.payments.Protos.Output parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static org.bitcoin.protocols.payments.Protos.Output parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static org.bitcoin.protocols.payments.Protos.Output parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static org.bitcoin.protocols.payments.Protos.Output parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static org.bitcoin.protocols.payments.Protos.Output parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static org.bitcoin.protocols.payments.Protos.Output 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.bitcoin.protocols.payments.Protos.Output 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 payments.Output} * *
     * Generalized form of "send payment to this/these bitcoin addresses"
     * 
*/ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements org.bitcoin.protocols.payments.Protos.OutputOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.bitcoin.protocols.payments.Protos.internal_static_payments_Output_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.bitcoin.protocols.payments.Protos.internal_static_payments_Output_fieldAccessorTable .ensureFieldAccessorsInitialized( org.bitcoin.protocols.payments.Protos.Output.class, org.bitcoin.protocols.payments.Protos.Output.Builder.class); } // Construct using org.bitcoin.protocols.payments.Protos.Output.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(); amount_ = 0L; bitField0_ = (bitField0_ & ~0x00000001); script_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000002); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.bitcoin.protocols.payments.Protos.internal_static_payments_Output_descriptor; } public org.bitcoin.protocols.payments.Protos.Output getDefaultInstanceForType() { return org.bitcoin.protocols.payments.Protos.Output.getDefaultInstance(); } public org.bitcoin.protocols.payments.Protos.Output build() { org.bitcoin.protocols.payments.Protos.Output result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public org.bitcoin.protocols.payments.Protos.Output buildPartial() { org.bitcoin.protocols.payments.Protos.Output result = new org.bitcoin.protocols.payments.Protos.Output(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.amount_ = amount_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } result.script_ = script_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.bitcoin.protocols.payments.Protos.Output) { return mergeFrom((org.bitcoin.protocols.payments.Protos.Output)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(org.bitcoin.protocols.payments.Protos.Output other) { if (other == org.bitcoin.protocols.payments.Protos.Output.getDefaultInstance()) return this; if (other.hasAmount()) { setAmount(other.getAmount()); } if (other.hasScript()) { setScript(other.getScript()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { if (!hasScript()) { return false; } return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { org.bitcoin.protocols.payments.Protos.Output parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (org.bitcoin.protocols.payments.Protos.Output) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; // optional uint64 amount = 1 [default = 0]; private long amount_ ; /** * optional uint64 amount = 1 [default = 0]; * *
       * amount is integer-number-of-satoshis
       * 
*/ public boolean hasAmount() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * optional uint64 amount = 1 [default = 0]; * *
       * amount is integer-number-of-satoshis
       * 
*/ public long getAmount() { return amount_; } /** * optional uint64 amount = 1 [default = 0]; * *
       * amount is integer-number-of-satoshis
       * 
*/ public Builder setAmount(long value) { bitField0_ |= 0x00000001; amount_ = value; onChanged(); return this; } /** * optional uint64 amount = 1 [default = 0]; * *
       * amount is integer-number-of-satoshis
       * 
*/ public Builder clearAmount() { bitField0_ = (bitField0_ & ~0x00000001); amount_ = 0L; onChanged(); return this; } // required bytes script = 2; private com.google.protobuf.ByteString script_ = com.google.protobuf.ByteString.EMPTY; /** * required bytes script = 2; * *
       * usually one of the standard Script forms
       * 
*/ public boolean hasScript() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * required bytes script = 2; * *
       * usually one of the standard Script forms
       * 
*/ public com.google.protobuf.ByteString getScript() { return script_; } /** * required bytes script = 2; * *
       * usually one of the standard Script forms
       * 
*/ public Builder setScript(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; script_ = value; onChanged(); return this; } /** * required bytes script = 2; * *
       * usually one of the standard Script forms
       * 
*/ public Builder clearScript() { bitField0_ = (bitField0_ & ~0x00000002); script_ = getDefaultInstance().getScript(); onChanged(); return this; } // @@protoc_insertion_point(builder_scope:payments.Output) } static { defaultInstance = new Output(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:payments.Output) } public interface PaymentDetailsOrBuilder extends com.google.protobuf.MessageOrBuilder { // optional string network = 1 [default = "main"]; /** * optional string network = 1 [default = "main"]; * *
     * "main" or "test"
     * 
*/ boolean hasNetwork(); /** * optional string network = 1 [default = "main"]; * *
     * "main" or "test"
     * 
*/ java.lang.String getNetwork(); /** * optional string network = 1 [default = "main"]; * *
     * "main" or "test"
     * 
*/ com.google.protobuf.ByteString getNetworkBytes(); // repeated .payments.Output outputs = 2; /** * repeated .payments.Output outputs = 2; * *
     * Where payment should be sent
     * 
*/ java.util.List getOutputsList(); /** * repeated .payments.Output outputs = 2; * *
     * Where payment should be sent
     * 
*/ org.bitcoin.protocols.payments.Protos.Output getOutputs(int index); /** * repeated .payments.Output outputs = 2; * *
     * Where payment should be sent
     * 
*/ int getOutputsCount(); /** * repeated .payments.Output outputs = 2; * *
     * Where payment should be sent
     * 
*/ java.util.List getOutputsOrBuilderList(); /** * repeated .payments.Output outputs = 2; * *
     * Where payment should be sent
     * 
*/ org.bitcoin.protocols.payments.Protos.OutputOrBuilder getOutputsOrBuilder( int index); // required uint64 time = 3; /** * required uint64 time = 3; * *
     * Timestamp; when payment request created
     * 
*/ boolean hasTime(); /** * required uint64 time = 3; * *
     * Timestamp; when payment request created
     * 
*/ long getTime(); // optional uint64 expires = 4; /** * optional uint64 expires = 4; * *
     * Timestamp; when this request should be considered invalid
     * 
*/ boolean hasExpires(); /** * optional uint64 expires = 4; * *
     * Timestamp; when this request should be considered invalid
     * 
*/ long getExpires(); // optional string memo = 5; /** * optional string memo = 5; * *
     * Human-readable description of request for the customer
     * 
*/ boolean hasMemo(); /** * optional string memo = 5; * *
     * Human-readable description of request for the customer
     * 
*/ java.lang.String getMemo(); /** * optional string memo = 5; * *
     * Human-readable description of request for the customer
     * 
*/ com.google.protobuf.ByteString getMemoBytes(); // optional string payment_url = 6; /** * optional string payment_url = 6; * *
     * URL to send Payment and get PaymentACK
     * 
*/ boolean hasPaymentUrl(); /** * optional string payment_url = 6; * *
     * URL to send Payment and get PaymentACK
     * 
*/ java.lang.String getPaymentUrl(); /** * optional string payment_url = 6; * *
     * URL to send Payment and get PaymentACK
     * 
*/ com.google.protobuf.ByteString getPaymentUrlBytes(); // optional bytes merchant_data = 7; /** * optional bytes merchant_data = 7; * *
     * Arbitrary data to include in the Payment message
     * 
*/ boolean hasMerchantData(); /** * optional bytes merchant_data = 7; * *
     * Arbitrary data to include in the Payment message
     * 
*/ com.google.protobuf.ByteString getMerchantData(); } /** * Protobuf type {@code payments.PaymentDetails} */ public static final class PaymentDetails extends com.google.protobuf.GeneratedMessage implements PaymentDetailsOrBuilder { // Use PaymentDetails.newBuilder() to construct. private PaymentDetails(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } private PaymentDetails(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private static final PaymentDetails defaultInstance; public static PaymentDetails getDefaultInstance() { return defaultInstance; } public PaymentDetails getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private PaymentDetails( 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; network_ = input.readBytes(); break; } case 18: { if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { outputs_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000002; } outputs_.add(input.readMessage(org.bitcoin.protocols.payments.Protos.Output.PARSER, extensionRegistry)); break; } case 24: { bitField0_ |= 0x00000002; time_ = input.readUInt64(); break; } case 32: { bitField0_ |= 0x00000004; expires_ = input.readUInt64(); break; } case 42: { bitField0_ |= 0x00000008; memo_ = input.readBytes(); break; } case 50: { bitField0_ |= 0x00000010; paymentUrl_ = input.readBytes(); break; } case 58: { bitField0_ |= 0x00000020; merchantData_ = 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 { if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { outputs_ = java.util.Collections.unmodifiableList(outputs_); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.bitcoin.protocols.payments.Protos.internal_static_payments_PaymentDetails_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.bitcoin.protocols.payments.Protos.internal_static_payments_PaymentDetails_fieldAccessorTable .ensureFieldAccessorsInitialized( org.bitcoin.protocols.payments.Protos.PaymentDetails.class, org.bitcoin.protocols.payments.Protos.PaymentDetails.Builder.class); } public static com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { public PaymentDetails parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new PaymentDetails(input, extensionRegistry); } }; @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } private int bitField0_; // optional string network = 1 [default = "main"]; public static final int NETWORK_FIELD_NUMBER = 1; private java.lang.Object network_; /** * optional string network = 1 [default = "main"]; * *
     * "main" or "test"
     * 
*/ public boolean hasNetwork() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * optional string network = 1 [default = "main"]; * *
     * "main" or "test"
     * 
*/ public java.lang.String getNetwork() { java.lang.Object ref = network_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { network_ = s; } return s; } } /** * optional string network = 1 [default = "main"]; * *
     * "main" or "test"
     * 
*/ public com.google.protobuf.ByteString getNetworkBytes() { java.lang.Object ref = network_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); network_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } // repeated .payments.Output outputs = 2; public static final int OUTPUTS_FIELD_NUMBER = 2; private java.util.List outputs_; /** * repeated .payments.Output outputs = 2; * *
     * Where payment should be sent
     * 
*/ public java.util.List getOutputsList() { return outputs_; } /** * repeated .payments.Output outputs = 2; * *
     * Where payment should be sent
     * 
*/ public java.util.List getOutputsOrBuilderList() { return outputs_; } /** * repeated .payments.Output outputs = 2; * *
     * Where payment should be sent
     * 
*/ public int getOutputsCount() { return outputs_.size(); } /** * repeated .payments.Output outputs = 2; * *
     * Where payment should be sent
     * 
*/ public org.bitcoin.protocols.payments.Protos.Output getOutputs(int index) { return outputs_.get(index); } /** * repeated .payments.Output outputs = 2; * *
     * Where payment should be sent
     * 
*/ public org.bitcoin.protocols.payments.Protos.OutputOrBuilder getOutputsOrBuilder( int index) { return outputs_.get(index); } // required uint64 time = 3; public static final int TIME_FIELD_NUMBER = 3; private long time_; /** * required uint64 time = 3; * *
     * Timestamp; when payment request created
     * 
*/ public boolean hasTime() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * required uint64 time = 3; * *
     * Timestamp; when payment request created
     * 
*/ public long getTime() { return time_; } // optional uint64 expires = 4; public static final int EXPIRES_FIELD_NUMBER = 4; private long expires_; /** * optional uint64 expires = 4; * *
     * Timestamp; when this request should be considered invalid
     * 
*/ public boolean hasExpires() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** * optional uint64 expires = 4; * *
     * Timestamp; when this request should be considered invalid
     * 
*/ public long getExpires() { return expires_; } // optional string memo = 5; public static final int MEMO_FIELD_NUMBER = 5; private java.lang.Object memo_; /** * optional string memo = 5; * *
     * Human-readable description of request for the customer
     * 
*/ public boolean hasMemo() { return ((bitField0_ & 0x00000008) == 0x00000008); } /** * optional string memo = 5; * *
     * Human-readable description of request for the customer
     * 
*/ public java.lang.String getMemo() { java.lang.Object ref = memo_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { memo_ = s; } return s; } } /** * optional string memo = 5; * *
     * Human-readable description of request for the customer
     * 
*/ public com.google.protobuf.ByteString getMemoBytes() { java.lang.Object ref = memo_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); memo_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } // optional string payment_url = 6; public static final int PAYMENT_URL_FIELD_NUMBER = 6; private java.lang.Object paymentUrl_; /** * optional string payment_url = 6; * *
     * URL to send Payment and get PaymentACK
     * 
*/ public boolean hasPaymentUrl() { return ((bitField0_ & 0x00000010) == 0x00000010); } /** * optional string payment_url = 6; * *
     * URL to send Payment and get PaymentACK
     * 
*/ public java.lang.String getPaymentUrl() { java.lang.Object ref = paymentUrl_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { paymentUrl_ = s; } return s; } } /** * optional string payment_url = 6; * *
     * URL to send Payment and get PaymentACK
     * 
*/ public com.google.protobuf.ByteString getPaymentUrlBytes() { java.lang.Object ref = paymentUrl_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); paymentUrl_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } // optional bytes merchant_data = 7; public static final int MERCHANT_DATA_FIELD_NUMBER = 7; private com.google.protobuf.ByteString merchantData_; /** * optional bytes merchant_data = 7; * *
     * Arbitrary data to include in the Payment message
     * 
*/ public boolean hasMerchantData() { return ((bitField0_ & 0x00000020) == 0x00000020); } /** * optional bytes merchant_data = 7; * *
     * Arbitrary data to include in the Payment message
     * 
*/ public com.google.protobuf.ByteString getMerchantData() { return merchantData_; } private void initFields() { network_ = "main"; outputs_ = java.util.Collections.emptyList(); time_ = 0L; expires_ = 0L; memo_ = ""; paymentUrl_ = ""; merchantData_ = com.google.protobuf.ByteString.EMPTY; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; if (!hasTime()) { memoizedIsInitialized = 0; return false; } for (int i = 0; i < getOutputsCount(); i++) { if (!getOutputs(i).isInitialized()) { 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, getNetworkBytes()); } for (int i = 0; i < outputs_.size(); i++) { output.writeMessage(2, outputs_.get(i)); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeUInt64(3, time_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeUInt64(4, expires_); } if (((bitField0_ & 0x00000008) == 0x00000008)) { output.writeBytes(5, getMemoBytes()); } if (((bitField0_ & 0x00000010) == 0x00000010)) { output.writeBytes(6, getPaymentUrlBytes()); } if (((bitField0_ & 0x00000020) == 0x00000020)) { output.writeBytes(7, merchantData_); } 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, getNetworkBytes()); } for (int i = 0; i < outputs_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, outputs_.get(i)); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeUInt64Size(3, time_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream .computeUInt64Size(4, expires_); } if (((bitField0_ & 0x00000008) == 0x00000008)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(5, getMemoBytes()); } if (((bitField0_ & 0x00000010) == 0x00000010)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(6, getPaymentUrlBytes()); } if (((bitField0_ & 0x00000020) == 0x00000020)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(7, merchantData_); } 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.bitcoin.protocols.payments.Protos.PaymentDetails parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.bitcoin.protocols.payments.Protos.PaymentDetails parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.bitcoin.protocols.payments.Protos.PaymentDetails parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.bitcoin.protocols.payments.Protos.PaymentDetails parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.bitcoin.protocols.payments.Protos.PaymentDetails parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static org.bitcoin.protocols.payments.Protos.PaymentDetails parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static org.bitcoin.protocols.payments.Protos.PaymentDetails parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static org.bitcoin.protocols.payments.Protos.PaymentDetails parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static org.bitcoin.protocols.payments.Protos.PaymentDetails parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static org.bitcoin.protocols.payments.Protos.PaymentDetails 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.bitcoin.protocols.payments.Protos.PaymentDetails 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 payments.PaymentDetails} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements org.bitcoin.protocols.payments.Protos.PaymentDetailsOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.bitcoin.protocols.payments.Protos.internal_static_payments_PaymentDetails_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.bitcoin.protocols.payments.Protos.internal_static_payments_PaymentDetails_fieldAccessorTable .ensureFieldAccessorsInitialized( org.bitcoin.protocols.payments.Protos.PaymentDetails.class, org.bitcoin.protocols.payments.Protos.PaymentDetails.Builder.class); } // Construct using org.bitcoin.protocols.payments.Protos.PaymentDetails.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { getOutputsFieldBuilder(); } } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); network_ = "main"; bitField0_ = (bitField0_ & ~0x00000001); if (outputsBuilder_ == null) { outputs_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); } else { outputsBuilder_.clear(); } time_ = 0L; bitField0_ = (bitField0_ & ~0x00000004); expires_ = 0L; bitField0_ = (bitField0_ & ~0x00000008); memo_ = ""; bitField0_ = (bitField0_ & ~0x00000010); paymentUrl_ = ""; bitField0_ = (bitField0_ & ~0x00000020); merchantData_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000040); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.bitcoin.protocols.payments.Protos.internal_static_payments_PaymentDetails_descriptor; } public org.bitcoin.protocols.payments.Protos.PaymentDetails getDefaultInstanceForType() { return org.bitcoin.protocols.payments.Protos.PaymentDetails.getDefaultInstance(); } public org.bitcoin.protocols.payments.Protos.PaymentDetails build() { org.bitcoin.protocols.payments.Protos.PaymentDetails result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public org.bitcoin.protocols.payments.Protos.PaymentDetails buildPartial() { org.bitcoin.protocols.payments.Protos.PaymentDetails result = new org.bitcoin.protocols.payments.Protos.PaymentDetails(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.network_ = network_; if (outputsBuilder_ == null) { if (((bitField0_ & 0x00000002) == 0x00000002)) { outputs_ = java.util.Collections.unmodifiableList(outputs_); bitField0_ = (bitField0_ & ~0x00000002); } result.outputs_ = outputs_; } else { result.outputs_ = outputsBuilder_.build(); } if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000002; } result.time_ = time_; if (((from_bitField0_ & 0x00000008) == 0x00000008)) { to_bitField0_ |= 0x00000004; } result.expires_ = expires_; if (((from_bitField0_ & 0x00000010) == 0x00000010)) { to_bitField0_ |= 0x00000008; } result.memo_ = memo_; if (((from_bitField0_ & 0x00000020) == 0x00000020)) { to_bitField0_ |= 0x00000010; } result.paymentUrl_ = paymentUrl_; if (((from_bitField0_ & 0x00000040) == 0x00000040)) { to_bitField0_ |= 0x00000020; } result.merchantData_ = merchantData_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.bitcoin.protocols.payments.Protos.PaymentDetails) { return mergeFrom((org.bitcoin.protocols.payments.Protos.PaymentDetails)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(org.bitcoin.protocols.payments.Protos.PaymentDetails other) { if (other == org.bitcoin.protocols.payments.Protos.PaymentDetails.getDefaultInstance()) return this; if (other.hasNetwork()) { bitField0_ |= 0x00000001; network_ = other.network_; onChanged(); } if (outputsBuilder_ == null) { if (!other.outputs_.isEmpty()) { if (outputs_.isEmpty()) { outputs_ = other.outputs_; bitField0_ = (bitField0_ & ~0x00000002); } else { ensureOutputsIsMutable(); outputs_.addAll(other.outputs_); } onChanged(); } } else { if (!other.outputs_.isEmpty()) { if (outputsBuilder_.isEmpty()) { outputsBuilder_.dispose(); outputsBuilder_ = null; outputs_ = other.outputs_; bitField0_ = (bitField0_ & ~0x00000002); outputsBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getOutputsFieldBuilder() : null; } else { outputsBuilder_.addAllMessages(other.outputs_); } } } if (other.hasTime()) { setTime(other.getTime()); } if (other.hasExpires()) { setExpires(other.getExpires()); } if (other.hasMemo()) { bitField0_ |= 0x00000010; memo_ = other.memo_; onChanged(); } if (other.hasPaymentUrl()) { bitField0_ |= 0x00000020; paymentUrl_ = other.paymentUrl_; onChanged(); } if (other.hasMerchantData()) { setMerchantData(other.getMerchantData()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { if (!hasTime()) { return false; } for (int i = 0; i < getOutputsCount(); i++) { if (!getOutputs(i).isInitialized()) { return false; } } return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { org.bitcoin.protocols.payments.Protos.PaymentDetails parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (org.bitcoin.protocols.payments.Protos.PaymentDetails) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; // optional string network = 1 [default = "main"]; private java.lang.Object network_ = "main"; /** * optional string network = 1 [default = "main"]; * *
       * "main" or "test"
       * 
*/ public boolean hasNetwork() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * optional string network = 1 [default = "main"]; * *
       * "main" or "test"
       * 
*/ public java.lang.String getNetwork() { java.lang.Object ref = network_; if (!(ref instanceof java.lang.String)) { java.lang.String s = ((com.google.protobuf.ByteString) ref) .toStringUtf8(); network_ = s; return s; } else { return (java.lang.String) ref; } } /** * optional string network = 1 [default = "main"]; * *
       * "main" or "test"
       * 
*/ public com.google.protobuf.ByteString getNetworkBytes() { java.lang.Object ref = network_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); network_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * optional string network = 1 [default = "main"]; * *
       * "main" or "test"
       * 
*/ public Builder setNetwork( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; network_ = value; onChanged(); return this; } /** * optional string network = 1 [default = "main"]; * *
       * "main" or "test"
       * 
*/ public Builder clearNetwork() { bitField0_ = (bitField0_ & ~0x00000001); network_ = getDefaultInstance().getNetwork(); onChanged(); return this; } /** * optional string network = 1 [default = "main"]; * *
       * "main" or "test"
       * 
*/ public Builder setNetworkBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; network_ = value; onChanged(); return this; } // repeated .payments.Output outputs = 2; private java.util.List outputs_ = java.util.Collections.emptyList(); private void ensureOutputsIsMutable() { if (!((bitField0_ & 0x00000002) == 0x00000002)) { outputs_ = new java.util.ArrayList(outputs_); bitField0_ |= 0x00000002; } } private com.google.protobuf.RepeatedFieldBuilder< org.bitcoin.protocols.payments.Protos.Output, org.bitcoin.protocols.payments.Protos.Output.Builder, org.bitcoin.protocols.payments.Protos.OutputOrBuilder> outputsBuilder_; /** * repeated .payments.Output outputs = 2; * *
       * Where payment should be sent
       * 
*/ public java.util.List getOutputsList() { if (outputsBuilder_ == null) { return java.util.Collections.unmodifiableList(outputs_); } else { return outputsBuilder_.getMessageList(); } } /** * repeated .payments.Output outputs = 2; * *
       * Where payment should be sent
       * 
*/ public int getOutputsCount() { if (outputsBuilder_ == null) { return outputs_.size(); } else { return outputsBuilder_.getCount(); } } /** * repeated .payments.Output outputs = 2; * *
       * Where payment should be sent
       * 
*/ public org.bitcoin.protocols.payments.Protos.Output getOutputs(int index) { if (outputsBuilder_ == null) { return outputs_.get(index); } else { return outputsBuilder_.getMessage(index); } } /** * repeated .payments.Output outputs = 2; * *
       * Where payment should be sent
       * 
*/ public Builder setOutputs( int index, org.bitcoin.protocols.payments.Protos.Output value) { if (outputsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureOutputsIsMutable(); outputs_.set(index, value); onChanged(); } else { outputsBuilder_.setMessage(index, value); } return this; } /** * repeated .payments.Output outputs = 2; * *
       * Where payment should be sent
       * 
*/ public Builder setOutputs( int index, org.bitcoin.protocols.payments.Protos.Output.Builder builderForValue) { if (outputsBuilder_ == null) { ensureOutputsIsMutable(); outputs_.set(index, builderForValue.build()); onChanged(); } else { outputsBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * repeated .payments.Output outputs = 2; * *
       * Where payment should be sent
       * 
*/ public Builder addOutputs(org.bitcoin.protocols.payments.Protos.Output value) { if (outputsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureOutputsIsMutable(); outputs_.add(value); onChanged(); } else { outputsBuilder_.addMessage(value); } return this; } /** * repeated .payments.Output outputs = 2; * *
       * Where payment should be sent
       * 
*/ public Builder addOutputs( int index, org.bitcoin.protocols.payments.Protos.Output value) { if (outputsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureOutputsIsMutable(); outputs_.add(index, value); onChanged(); } else { outputsBuilder_.addMessage(index, value); } return this; } /** * repeated .payments.Output outputs = 2; * *
       * Where payment should be sent
       * 
*/ public Builder addOutputs( org.bitcoin.protocols.payments.Protos.Output.Builder builderForValue) { if (outputsBuilder_ == null) { ensureOutputsIsMutable(); outputs_.add(builderForValue.build()); onChanged(); } else { outputsBuilder_.addMessage(builderForValue.build()); } return this; } /** * repeated .payments.Output outputs = 2; * *
       * Where payment should be sent
       * 
*/ public Builder addOutputs( int index, org.bitcoin.protocols.payments.Protos.Output.Builder builderForValue) { if (outputsBuilder_ == null) { ensureOutputsIsMutable(); outputs_.add(index, builderForValue.build()); onChanged(); } else { outputsBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * repeated .payments.Output outputs = 2; * *
       * Where payment should be sent
       * 
*/ public Builder addAllOutputs( java.lang.Iterable values) { if (outputsBuilder_ == null) { ensureOutputsIsMutable(); super.addAll(values, outputs_); onChanged(); } else { outputsBuilder_.addAllMessages(values); } return this; } /** * repeated .payments.Output outputs = 2; * *
       * Where payment should be sent
       * 
*/ public Builder clearOutputs() { if (outputsBuilder_ == null) { outputs_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); } else { outputsBuilder_.clear(); } return this; } /** * repeated .payments.Output outputs = 2; * *
       * Where payment should be sent
       * 
*/ public Builder removeOutputs(int index) { if (outputsBuilder_ == null) { ensureOutputsIsMutable(); outputs_.remove(index); onChanged(); } else { outputsBuilder_.remove(index); } return this; } /** * repeated .payments.Output outputs = 2; * *
       * Where payment should be sent
       * 
*/ public org.bitcoin.protocols.payments.Protos.Output.Builder getOutputsBuilder( int index) { return getOutputsFieldBuilder().getBuilder(index); } /** * repeated .payments.Output outputs = 2; * *
       * Where payment should be sent
       * 
*/ public org.bitcoin.protocols.payments.Protos.OutputOrBuilder getOutputsOrBuilder( int index) { if (outputsBuilder_ == null) { return outputs_.get(index); } else { return outputsBuilder_.getMessageOrBuilder(index); } } /** * repeated .payments.Output outputs = 2; * *
       * Where payment should be sent
       * 
*/ public java.util.List getOutputsOrBuilderList() { if (outputsBuilder_ != null) { return outputsBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(outputs_); } } /** * repeated .payments.Output outputs = 2; * *
       * Where payment should be sent
       * 
*/ public org.bitcoin.protocols.payments.Protos.Output.Builder addOutputsBuilder() { return getOutputsFieldBuilder().addBuilder( org.bitcoin.protocols.payments.Protos.Output.getDefaultInstance()); } /** * repeated .payments.Output outputs = 2; * *
       * Where payment should be sent
       * 
*/ public org.bitcoin.protocols.payments.Protos.Output.Builder addOutputsBuilder( int index) { return getOutputsFieldBuilder().addBuilder( index, org.bitcoin.protocols.payments.Protos.Output.getDefaultInstance()); } /** * repeated .payments.Output outputs = 2; * *
       * Where payment should be sent
       * 
*/ public java.util.List getOutputsBuilderList() { return getOutputsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilder< org.bitcoin.protocols.payments.Protos.Output, org.bitcoin.protocols.payments.Protos.Output.Builder, org.bitcoin.protocols.payments.Protos.OutputOrBuilder> getOutputsFieldBuilder() { if (outputsBuilder_ == null) { outputsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< org.bitcoin.protocols.payments.Protos.Output, org.bitcoin.protocols.payments.Protos.Output.Builder, org.bitcoin.protocols.payments.Protos.OutputOrBuilder>( outputs_, ((bitField0_ & 0x00000002) == 0x00000002), getParentForChildren(), isClean()); outputs_ = null; } return outputsBuilder_; } // required uint64 time = 3; private long time_ ; /** * required uint64 time = 3; * *
       * Timestamp; when payment request created
       * 
*/ public boolean hasTime() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** * required uint64 time = 3; * *
       * Timestamp; when payment request created
       * 
*/ public long getTime() { return time_; } /** * required uint64 time = 3; * *
       * Timestamp; when payment request created
       * 
*/ public Builder setTime(long value) { bitField0_ |= 0x00000004; time_ = value; onChanged(); return this; } /** * required uint64 time = 3; * *
       * Timestamp; when payment request created
       * 
*/ public Builder clearTime() { bitField0_ = (bitField0_ & ~0x00000004); time_ = 0L; onChanged(); return this; } // optional uint64 expires = 4; private long expires_ ; /** * optional uint64 expires = 4; * *
       * Timestamp; when this request should be considered invalid
       * 
*/ public boolean hasExpires() { return ((bitField0_ & 0x00000008) == 0x00000008); } /** * optional uint64 expires = 4; * *
       * Timestamp; when this request should be considered invalid
       * 
*/ public long getExpires() { return expires_; } /** * optional uint64 expires = 4; * *
       * Timestamp; when this request should be considered invalid
       * 
*/ public Builder setExpires(long value) { bitField0_ |= 0x00000008; expires_ = value; onChanged(); return this; } /** * optional uint64 expires = 4; * *
       * Timestamp; when this request should be considered invalid
       * 
*/ public Builder clearExpires() { bitField0_ = (bitField0_ & ~0x00000008); expires_ = 0L; onChanged(); return this; } // optional string memo = 5; private java.lang.Object memo_ = ""; /** * optional string memo = 5; * *
       * Human-readable description of request for the customer
       * 
*/ public boolean hasMemo() { return ((bitField0_ & 0x00000010) == 0x00000010); } /** * optional string memo = 5; * *
       * Human-readable description of request for the customer
       * 
*/ public java.lang.String getMemo() { java.lang.Object ref = memo_; if (!(ref instanceof java.lang.String)) { java.lang.String s = ((com.google.protobuf.ByteString) ref) .toStringUtf8(); memo_ = s; return s; } else { return (java.lang.String) ref; } } /** * optional string memo = 5; * *
       * Human-readable description of request for the customer
       * 
*/ public com.google.protobuf.ByteString getMemoBytes() { java.lang.Object ref = memo_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); memo_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * optional string memo = 5; * *
       * Human-readable description of request for the customer
       * 
*/ public Builder setMemo( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000010; memo_ = value; onChanged(); return this; } /** * optional string memo = 5; * *
       * Human-readable description of request for the customer
       * 
*/ public Builder clearMemo() { bitField0_ = (bitField0_ & ~0x00000010); memo_ = getDefaultInstance().getMemo(); onChanged(); return this; } /** * optional string memo = 5; * *
       * Human-readable description of request for the customer
       * 
*/ public Builder setMemoBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000010; memo_ = value; onChanged(); return this; } // optional string payment_url = 6; private java.lang.Object paymentUrl_ = ""; /** * optional string payment_url = 6; * *
       * URL to send Payment and get PaymentACK
       * 
*/ public boolean hasPaymentUrl() { return ((bitField0_ & 0x00000020) == 0x00000020); } /** * optional string payment_url = 6; * *
       * URL to send Payment and get PaymentACK
       * 
*/ public java.lang.String getPaymentUrl() { java.lang.Object ref = paymentUrl_; if (!(ref instanceof java.lang.String)) { java.lang.String s = ((com.google.protobuf.ByteString) ref) .toStringUtf8(); paymentUrl_ = s; return s; } else { return (java.lang.String) ref; } } /** * optional string payment_url = 6; * *
       * URL to send Payment and get PaymentACK
       * 
*/ public com.google.protobuf.ByteString getPaymentUrlBytes() { java.lang.Object ref = paymentUrl_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); paymentUrl_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * optional string payment_url = 6; * *
       * URL to send Payment and get PaymentACK
       * 
*/ public Builder setPaymentUrl( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000020; paymentUrl_ = value; onChanged(); return this; } /** * optional string payment_url = 6; * *
       * URL to send Payment and get PaymentACK
       * 
*/ public Builder clearPaymentUrl() { bitField0_ = (bitField0_ & ~0x00000020); paymentUrl_ = getDefaultInstance().getPaymentUrl(); onChanged(); return this; } /** * optional string payment_url = 6; * *
       * URL to send Payment and get PaymentACK
       * 
*/ public Builder setPaymentUrlBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000020; paymentUrl_ = value; onChanged(); return this; } // optional bytes merchant_data = 7; private com.google.protobuf.ByteString merchantData_ = com.google.protobuf.ByteString.EMPTY; /** * optional bytes merchant_data = 7; * *
       * Arbitrary data to include in the Payment message
       * 
*/ public boolean hasMerchantData() { return ((bitField0_ & 0x00000040) == 0x00000040); } /** * optional bytes merchant_data = 7; * *
       * Arbitrary data to include in the Payment message
       * 
*/ public com.google.protobuf.ByteString getMerchantData() { return merchantData_; } /** * optional bytes merchant_data = 7; * *
       * Arbitrary data to include in the Payment message
       * 
*/ public Builder setMerchantData(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000040; merchantData_ = value; onChanged(); return this; } /** * optional bytes merchant_data = 7; * *
       * Arbitrary data to include in the Payment message
       * 
*/ public Builder clearMerchantData() { bitField0_ = (bitField0_ & ~0x00000040); merchantData_ = getDefaultInstance().getMerchantData(); onChanged(); return this; } // @@protoc_insertion_point(builder_scope:payments.PaymentDetails) } static { defaultInstance = new PaymentDetails(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:payments.PaymentDetails) } public interface PaymentRequestOrBuilder extends com.google.protobuf.MessageOrBuilder { // optional uint32 payment_details_version = 1 [default = 1]; /** * optional uint32 payment_details_version = 1 [default = 1]; */ boolean hasPaymentDetailsVersion(); /** * optional uint32 payment_details_version = 1 [default = 1]; */ int getPaymentDetailsVersion(); // optional string pki_type = 2 [default = "none"]; /** * optional string pki_type = 2 [default = "none"]; * *
     * none / x509+sha256 / x509+sha1
     * 
*/ boolean hasPkiType(); /** * optional string pki_type = 2 [default = "none"]; * *
     * none / x509+sha256 / x509+sha1
     * 
*/ java.lang.String getPkiType(); /** * optional string pki_type = 2 [default = "none"]; * *
     * none / x509+sha256 / x509+sha1
     * 
*/ com.google.protobuf.ByteString getPkiTypeBytes(); // optional bytes pki_data = 3; /** * optional bytes pki_data = 3; * *
     * depends on pki_type
     * 
*/ boolean hasPkiData(); /** * optional bytes pki_data = 3; * *
     * depends on pki_type
     * 
*/ com.google.protobuf.ByteString getPkiData(); // required bytes serialized_payment_details = 4; /** * required bytes serialized_payment_details = 4; * *
     * PaymentDetails
     * 
*/ boolean hasSerializedPaymentDetails(); /** * required bytes serialized_payment_details = 4; * *
     * PaymentDetails
     * 
*/ com.google.protobuf.ByteString getSerializedPaymentDetails(); // optional bytes signature = 5; /** * optional bytes signature = 5; * *
     * pki-dependent signature
     * 
*/ boolean hasSignature(); /** * optional bytes signature = 5; * *
     * pki-dependent signature
     * 
*/ com.google.protobuf.ByteString getSignature(); } /** * Protobuf type {@code payments.PaymentRequest} */ public static final class PaymentRequest extends com.google.protobuf.GeneratedMessage implements PaymentRequestOrBuilder { // Use PaymentRequest.newBuilder() to construct. private PaymentRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } private PaymentRequest(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private static final PaymentRequest defaultInstance; public static PaymentRequest getDefaultInstance() { return defaultInstance; } public PaymentRequest getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private PaymentRequest( 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 8: { bitField0_ |= 0x00000001; paymentDetailsVersion_ = input.readUInt32(); break; } case 18: { bitField0_ |= 0x00000002; pkiType_ = input.readBytes(); break; } case 26: { bitField0_ |= 0x00000004; pkiData_ = input.readBytes(); break; } case 34: { bitField0_ |= 0x00000008; serializedPaymentDetails_ = input.readBytes(); break; } case 42: { bitField0_ |= 0x00000010; signature_ = 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.bitcoin.protocols.payments.Protos.internal_static_payments_PaymentRequest_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.bitcoin.protocols.payments.Protos.internal_static_payments_PaymentRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( org.bitcoin.protocols.payments.Protos.PaymentRequest.class, org.bitcoin.protocols.payments.Protos.PaymentRequest.Builder.class); } public static com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { public PaymentRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new PaymentRequest(input, extensionRegistry); } }; @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } private int bitField0_; // optional uint32 payment_details_version = 1 [default = 1]; public static final int PAYMENT_DETAILS_VERSION_FIELD_NUMBER = 1; private int paymentDetailsVersion_; /** * optional uint32 payment_details_version = 1 [default = 1]; */ public boolean hasPaymentDetailsVersion() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * optional uint32 payment_details_version = 1 [default = 1]; */ public int getPaymentDetailsVersion() { return paymentDetailsVersion_; } // optional string pki_type = 2 [default = "none"]; public static final int PKI_TYPE_FIELD_NUMBER = 2; private java.lang.Object pkiType_; /** * optional string pki_type = 2 [default = "none"]; * *
     * none / x509+sha256 / x509+sha1
     * 
*/ public boolean hasPkiType() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * optional string pki_type = 2 [default = "none"]; * *
     * none / x509+sha256 / x509+sha1
     * 
*/ public java.lang.String getPkiType() { java.lang.Object ref = pkiType_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { pkiType_ = s; } return s; } } /** * optional string pki_type = 2 [default = "none"]; * *
     * none / x509+sha256 / x509+sha1
     * 
*/ public com.google.protobuf.ByteString getPkiTypeBytes() { java.lang.Object ref = pkiType_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); pkiType_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } // optional bytes pki_data = 3; public static final int PKI_DATA_FIELD_NUMBER = 3; private com.google.protobuf.ByteString pkiData_; /** * optional bytes pki_data = 3; * *
     * depends on pki_type
     * 
*/ public boolean hasPkiData() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** * optional bytes pki_data = 3; * *
     * depends on pki_type
     * 
*/ public com.google.protobuf.ByteString getPkiData() { return pkiData_; } // required bytes serialized_payment_details = 4; public static final int SERIALIZED_PAYMENT_DETAILS_FIELD_NUMBER = 4; private com.google.protobuf.ByteString serializedPaymentDetails_; /** * required bytes serialized_payment_details = 4; * *
     * PaymentDetails
     * 
*/ public boolean hasSerializedPaymentDetails() { return ((bitField0_ & 0x00000008) == 0x00000008); } /** * required bytes serialized_payment_details = 4; * *
     * PaymentDetails
     * 
*/ public com.google.protobuf.ByteString getSerializedPaymentDetails() { return serializedPaymentDetails_; } // optional bytes signature = 5; public static final int SIGNATURE_FIELD_NUMBER = 5; private com.google.protobuf.ByteString signature_; /** * optional bytes signature = 5; * *
     * pki-dependent signature
     * 
*/ public boolean hasSignature() { return ((bitField0_ & 0x00000010) == 0x00000010); } /** * optional bytes signature = 5; * *
     * pki-dependent signature
     * 
*/ public com.google.protobuf.ByteString getSignature() { return signature_; } private void initFields() { paymentDetailsVersion_ = 1; pkiType_ = "none"; pkiData_ = com.google.protobuf.ByteString.EMPTY; serializedPaymentDetails_ = com.google.protobuf.ByteString.EMPTY; signature_ = com.google.protobuf.ByteString.EMPTY; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; if (!hasSerializedPaymentDetails()) { 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.writeUInt32(1, paymentDetailsVersion_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeBytes(2, getPkiTypeBytes()); } if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeBytes(3, pkiData_); } if (((bitField0_ & 0x00000008) == 0x00000008)) { output.writeBytes(4, serializedPaymentDetails_); } if (((bitField0_ & 0x00000010) == 0x00000010)) { output.writeBytes(5, signature_); } 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 .computeUInt32Size(1, paymentDetailsVersion_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(2, getPkiTypeBytes()); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(3, pkiData_); } if (((bitField0_ & 0x00000008) == 0x00000008)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(4, serializedPaymentDetails_); } if (((bitField0_ & 0x00000010) == 0x00000010)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(5, signature_); } 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.bitcoin.protocols.payments.Protos.PaymentRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.bitcoin.protocols.payments.Protos.PaymentRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.bitcoin.protocols.payments.Protos.PaymentRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.bitcoin.protocols.payments.Protos.PaymentRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.bitcoin.protocols.payments.Protos.PaymentRequest parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static org.bitcoin.protocols.payments.Protos.PaymentRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static org.bitcoin.protocols.payments.Protos.PaymentRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static org.bitcoin.protocols.payments.Protos.PaymentRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static org.bitcoin.protocols.payments.Protos.PaymentRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static org.bitcoin.protocols.payments.Protos.PaymentRequest 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.bitcoin.protocols.payments.Protos.PaymentRequest 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 payments.PaymentRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements org.bitcoin.protocols.payments.Protos.PaymentRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.bitcoin.protocols.payments.Protos.internal_static_payments_PaymentRequest_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.bitcoin.protocols.payments.Protos.internal_static_payments_PaymentRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( org.bitcoin.protocols.payments.Protos.PaymentRequest.class, org.bitcoin.protocols.payments.Protos.PaymentRequest.Builder.class); } // Construct using org.bitcoin.protocols.payments.Protos.PaymentRequest.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(); paymentDetailsVersion_ = 1; bitField0_ = (bitField0_ & ~0x00000001); pkiType_ = "none"; bitField0_ = (bitField0_ & ~0x00000002); pkiData_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000004); serializedPaymentDetails_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000008); signature_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000010); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.bitcoin.protocols.payments.Protos.internal_static_payments_PaymentRequest_descriptor; } public org.bitcoin.protocols.payments.Protos.PaymentRequest getDefaultInstanceForType() { return org.bitcoin.protocols.payments.Protos.PaymentRequest.getDefaultInstance(); } public org.bitcoin.protocols.payments.Protos.PaymentRequest build() { org.bitcoin.protocols.payments.Protos.PaymentRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public org.bitcoin.protocols.payments.Protos.PaymentRequest buildPartial() { org.bitcoin.protocols.payments.Protos.PaymentRequest result = new org.bitcoin.protocols.payments.Protos.PaymentRequest(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.paymentDetailsVersion_ = paymentDetailsVersion_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } result.pkiType_ = pkiType_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } result.pkiData_ = pkiData_; if (((from_bitField0_ & 0x00000008) == 0x00000008)) { to_bitField0_ |= 0x00000008; } result.serializedPaymentDetails_ = serializedPaymentDetails_; if (((from_bitField0_ & 0x00000010) == 0x00000010)) { to_bitField0_ |= 0x00000010; } result.signature_ = signature_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.bitcoin.protocols.payments.Protos.PaymentRequest) { return mergeFrom((org.bitcoin.protocols.payments.Protos.PaymentRequest)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(org.bitcoin.protocols.payments.Protos.PaymentRequest other) { if (other == org.bitcoin.protocols.payments.Protos.PaymentRequest.getDefaultInstance()) return this; if (other.hasPaymentDetailsVersion()) { setPaymentDetailsVersion(other.getPaymentDetailsVersion()); } if (other.hasPkiType()) { bitField0_ |= 0x00000002; pkiType_ = other.pkiType_; onChanged(); } if (other.hasPkiData()) { setPkiData(other.getPkiData()); } if (other.hasSerializedPaymentDetails()) { setSerializedPaymentDetails(other.getSerializedPaymentDetails()); } if (other.hasSignature()) { setSignature(other.getSignature()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { if (!hasSerializedPaymentDetails()) { return false; } return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { org.bitcoin.protocols.payments.Protos.PaymentRequest parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (org.bitcoin.protocols.payments.Protos.PaymentRequest) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; // optional uint32 payment_details_version = 1 [default = 1]; private int paymentDetailsVersion_ = 1; /** * optional uint32 payment_details_version = 1 [default = 1]; */ public boolean hasPaymentDetailsVersion() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * optional uint32 payment_details_version = 1 [default = 1]; */ public int getPaymentDetailsVersion() { return paymentDetailsVersion_; } /** * optional uint32 payment_details_version = 1 [default = 1]; */ public Builder setPaymentDetailsVersion(int value) { bitField0_ |= 0x00000001; paymentDetailsVersion_ = value; onChanged(); return this; } /** * optional uint32 payment_details_version = 1 [default = 1]; */ public Builder clearPaymentDetailsVersion() { bitField0_ = (bitField0_ & ~0x00000001); paymentDetailsVersion_ = 1; onChanged(); return this; } // optional string pki_type = 2 [default = "none"]; private java.lang.Object pkiType_ = "none"; /** * optional string pki_type = 2 [default = "none"]; * *
       * none / x509+sha256 / x509+sha1
       * 
*/ public boolean hasPkiType() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * optional string pki_type = 2 [default = "none"]; * *
       * none / x509+sha256 / x509+sha1
       * 
*/ public java.lang.String getPkiType() { java.lang.Object ref = pkiType_; if (!(ref instanceof java.lang.String)) { java.lang.String s = ((com.google.protobuf.ByteString) ref) .toStringUtf8(); pkiType_ = s; return s; } else { return (java.lang.String) ref; } } /** * optional string pki_type = 2 [default = "none"]; * *
       * none / x509+sha256 / x509+sha1
       * 
*/ public com.google.protobuf.ByteString getPkiTypeBytes() { java.lang.Object ref = pkiType_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); pkiType_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * optional string pki_type = 2 [default = "none"]; * *
       * none / x509+sha256 / x509+sha1
       * 
*/ public Builder setPkiType( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; pkiType_ = value; onChanged(); return this; } /** * optional string pki_type = 2 [default = "none"]; * *
       * none / x509+sha256 / x509+sha1
       * 
*/ public Builder clearPkiType() { bitField0_ = (bitField0_ & ~0x00000002); pkiType_ = getDefaultInstance().getPkiType(); onChanged(); return this; } /** * optional string pki_type = 2 [default = "none"]; * *
       * none / x509+sha256 / x509+sha1
       * 
*/ public Builder setPkiTypeBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; pkiType_ = value; onChanged(); return this; } // optional bytes pki_data = 3; private com.google.protobuf.ByteString pkiData_ = com.google.protobuf.ByteString.EMPTY; /** * optional bytes pki_data = 3; * *
       * depends on pki_type
       * 
*/ public boolean hasPkiData() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** * optional bytes pki_data = 3; * *
       * depends on pki_type
       * 
*/ public com.google.protobuf.ByteString getPkiData() { return pkiData_; } /** * optional bytes pki_data = 3; * *
       * depends on pki_type
       * 
*/ public Builder setPkiData(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000004; pkiData_ = value; onChanged(); return this; } /** * optional bytes pki_data = 3; * *
       * depends on pki_type
       * 
*/ public Builder clearPkiData() { bitField0_ = (bitField0_ & ~0x00000004); pkiData_ = getDefaultInstance().getPkiData(); onChanged(); return this; } // required bytes serialized_payment_details = 4; private com.google.protobuf.ByteString serializedPaymentDetails_ = com.google.protobuf.ByteString.EMPTY; /** * required bytes serialized_payment_details = 4; * *
       * PaymentDetails
       * 
*/ public boolean hasSerializedPaymentDetails() { return ((bitField0_ & 0x00000008) == 0x00000008); } /** * required bytes serialized_payment_details = 4; * *
       * PaymentDetails
       * 
*/ public com.google.protobuf.ByteString getSerializedPaymentDetails() { return serializedPaymentDetails_; } /** * required bytes serialized_payment_details = 4; * *
       * PaymentDetails
       * 
*/ public Builder setSerializedPaymentDetails(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000008; serializedPaymentDetails_ = value; onChanged(); return this; } /** * required bytes serialized_payment_details = 4; * *
       * PaymentDetails
       * 
*/ public Builder clearSerializedPaymentDetails() { bitField0_ = (bitField0_ & ~0x00000008); serializedPaymentDetails_ = getDefaultInstance().getSerializedPaymentDetails(); onChanged(); return this; } // optional bytes signature = 5; private com.google.protobuf.ByteString signature_ = com.google.protobuf.ByteString.EMPTY; /** * optional bytes signature = 5; * *
       * pki-dependent signature
       * 
*/ public boolean hasSignature() { return ((bitField0_ & 0x00000010) == 0x00000010); } /** * optional bytes signature = 5; * *
       * pki-dependent signature
       * 
*/ public com.google.protobuf.ByteString getSignature() { return signature_; } /** * optional bytes signature = 5; * *
       * pki-dependent signature
       * 
*/ public Builder setSignature(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000010; signature_ = value; onChanged(); return this; } /** * optional bytes signature = 5; * *
       * pki-dependent signature
       * 
*/ public Builder clearSignature() { bitField0_ = (bitField0_ & ~0x00000010); signature_ = getDefaultInstance().getSignature(); onChanged(); return this; } // @@protoc_insertion_point(builder_scope:payments.PaymentRequest) } static { defaultInstance = new PaymentRequest(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:payments.PaymentRequest) } public interface X509CertificatesOrBuilder extends com.google.protobuf.MessageOrBuilder { // repeated bytes certificate = 1; /** * repeated bytes certificate = 1; * *
     * DER-encoded X.509 certificate chain
     * 
*/ java.util.List getCertificateList(); /** * repeated bytes certificate = 1; * *
     * DER-encoded X.509 certificate chain
     * 
*/ int getCertificateCount(); /** * repeated bytes certificate = 1; * *
     * DER-encoded X.509 certificate chain
     * 
*/ com.google.protobuf.ByteString getCertificate(int index); } /** * Protobuf type {@code payments.X509Certificates} */ public static final class X509Certificates extends com.google.protobuf.GeneratedMessage implements X509CertificatesOrBuilder { // Use X509Certificates.newBuilder() to construct. private X509Certificates(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } private X509Certificates(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private static final X509Certificates defaultInstance; public static X509Certificates getDefaultInstance() { return defaultInstance; } public X509Certificates getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private X509Certificates( 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)) { certificate_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } certificate_.add(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 { if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { certificate_ = java.util.Collections.unmodifiableList(certificate_); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.bitcoin.protocols.payments.Protos.internal_static_payments_X509Certificates_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.bitcoin.protocols.payments.Protos.internal_static_payments_X509Certificates_fieldAccessorTable .ensureFieldAccessorsInitialized( org.bitcoin.protocols.payments.Protos.X509Certificates.class, org.bitcoin.protocols.payments.Protos.X509Certificates.Builder.class); } public static com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { public X509Certificates parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new X509Certificates(input, extensionRegistry); } }; @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } // repeated bytes certificate = 1; public static final int CERTIFICATE_FIELD_NUMBER = 1; private java.util.List certificate_; /** * repeated bytes certificate = 1; * *
     * DER-encoded X.509 certificate chain
     * 
*/ public java.util.List getCertificateList() { return certificate_; } /** * repeated bytes certificate = 1; * *
     * DER-encoded X.509 certificate chain
     * 
*/ public int getCertificateCount() { return certificate_.size(); } /** * repeated bytes certificate = 1; * *
     * DER-encoded X.509 certificate chain
     * 
*/ public com.google.protobuf.ByteString getCertificate(int index) { return certificate_.get(index); } private void initFields() { certificate_ = java.util.Collections.emptyList(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); for (int i = 0; i < certificate_.size(); i++) { output.writeBytes(1, certificate_.get(i)); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; { int dataSize = 0; for (int i = 0; i < certificate_.size(); i++) { dataSize += com.google.protobuf.CodedOutputStream .computeBytesSizeNoTag(certificate_.get(i)); } size += dataSize; size += 1 * getCertificateList().size(); } 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.bitcoin.protocols.payments.Protos.X509Certificates parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.bitcoin.protocols.payments.Protos.X509Certificates parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.bitcoin.protocols.payments.Protos.X509Certificates parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.bitcoin.protocols.payments.Protos.X509Certificates parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.bitcoin.protocols.payments.Protos.X509Certificates parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static org.bitcoin.protocols.payments.Protos.X509Certificates parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static org.bitcoin.protocols.payments.Protos.X509Certificates parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static org.bitcoin.protocols.payments.Protos.X509Certificates parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static org.bitcoin.protocols.payments.Protos.X509Certificates parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static org.bitcoin.protocols.payments.Protos.X509Certificates 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.bitcoin.protocols.payments.Protos.X509Certificates 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 payments.X509Certificates} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements org.bitcoin.protocols.payments.Protos.X509CertificatesOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.bitcoin.protocols.payments.Protos.internal_static_payments_X509Certificates_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.bitcoin.protocols.payments.Protos.internal_static_payments_X509Certificates_fieldAccessorTable .ensureFieldAccessorsInitialized( org.bitcoin.protocols.payments.Protos.X509Certificates.class, org.bitcoin.protocols.payments.Protos.X509Certificates.Builder.class); } // Construct using org.bitcoin.protocols.payments.Protos.X509Certificates.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(); certificate_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.bitcoin.protocols.payments.Protos.internal_static_payments_X509Certificates_descriptor; } public org.bitcoin.protocols.payments.Protos.X509Certificates getDefaultInstanceForType() { return org.bitcoin.protocols.payments.Protos.X509Certificates.getDefaultInstance(); } public org.bitcoin.protocols.payments.Protos.X509Certificates build() { org.bitcoin.protocols.payments.Protos.X509Certificates result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public org.bitcoin.protocols.payments.Protos.X509Certificates buildPartial() { org.bitcoin.protocols.payments.Protos.X509Certificates result = new org.bitcoin.protocols.payments.Protos.X509Certificates(this); int from_bitField0_ = bitField0_; if (((bitField0_ & 0x00000001) == 0x00000001)) { certificate_ = java.util.Collections.unmodifiableList(certificate_); bitField0_ = (bitField0_ & ~0x00000001); } result.certificate_ = certificate_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.bitcoin.protocols.payments.Protos.X509Certificates) { return mergeFrom((org.bitcoin.protocols.payments.Protos.X509Certificates)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(org.bitcoin.protocols.payments.Protos.X509Certificates other) { if (other == org.bitcoin.protocols.payments.Protos.X509Certificates.getDefaultInstance()) return this; if (!other.certificate_.isEmpty()) { if (certificate_.isEmpty()) { certificate_ = other.certificate_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureCertificateIsMutable(); certificate_.addAll(other.certificate_); } onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { org.bitcoin.protocols.payments.Protos.X509Certificates parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (org.bitcoin.protocols.payments.Protos.X509Certificates) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; // repeated bytes certificate = 1; private java.util.List certificate_ = java.util.Collections.emptyList(); private void ensureCertificateIsMutable() { if (!((bitField0_ & 0x00000001) == 0x00000001)) { certificate_ = new java.util.ArrayList(certificate_); bitField0_ |= 0x00000001; } } /** * repeated bytes certificate = 1; * *
       * DER-encoded X.509 certificate chain
       * 
*/ public java.util.List getCertificateList() { return java.util.Collections.unmodifiableList(certificate_); } /** * repeated bytes certificate = 1; * *
       * DER-encoded X.509 certificate chain
       * 
*/ public int getCertificateCount() { return certificate_.size(); } /** * repeated bytes certificate = 1; * *
       * DER-encoded X.509 certificate chain
       * 
*/ public com.google.protobuf.ByteString getCertificate(int index) { return certificate_.get(index); } /** * repeated bytes certificate = 1; * *
       * DER-encoded X.509 certificate chain
       * 
*/ public Builder setCertificate( int index, com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } ensureCertificateIsMutable(); certificate_.set(index, value); onChanged(); return this; } /** * repeated bytes certificate = 1; * *
       * DER-encoded X.509 certificate chain
       * 
*/ public Builder addCertificate(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } ensureCertificateIsMutable(); certificate_.add(value); onChanged(); return this; } /** * repeated bytes certificate = 1; * *
       * DER-encoded X.509 certificate chain
       * 
*/ public Builder addAllCertificate( java.lang.Iterable values) { ensureCertificateIsMutable(); super.addAll(values, certificate_); onChanged(); return this; } /** * repeated bytes certificate = 1; * *
       * DER-encoded X.509 certificate chain
       * 
*/ public Builder clearCertificate() { certificate_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } // @@protoc_insertion_point(builder_scope:payments.X509Certificates) } static { defaultInstance = new X509Certificates(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:payments.X509Certificates) } public interface PaymentOrBuilder extends com.google.protobuf.MessageOrBuilder { // optional bytes merchant_data = 1; /** * optional bytes merchant_data = 1; * *
     * From PaymentDetails.merchant_data
     * 
*/ boolean hasMerchantData(); /** * optional bytes merchant_data = 1; * *
     * From PaymentDetails.merchant_data
     * 
*/ com.google.protobuf.ByteString getMerchantData(); // repeated bytes transactions = 2; /** * repeated bytes transactions = 2; * *
     * Signed transactions that satisfy PaymentDetails.outputs
     * 
*/ java.util.List getTransactionsList(); /** * repeated bytes transactions = 2; * *
     * Signed transactions that satisfy PaymentDetails.outputs
     * 
*/ int getTransactionsCount(); /** * repeated bytes transactions = 2; * *
     * Signed transactions that satisfy PaymentDetails.outputs
     * 
*/ com.google.protobuf.ByteString getTransactions(int index); // repeated .payments.Output refund_to = 3; /** * repeated .payments.Output refund_to = 3; * *
     * Where to send refunds, if a refund is necessary
     * 
*/ java.util.List getRefundToList(); /** * repeated .payments.Output refund_to = 3; * *
     * Where to send refunds, if a refund is necessary
     * 
*/ org.bitcoin.protocols.payments.Protos.Output getRefundTo(int index); /** * repeated .payments.Output refund_to = 3; * *
     * Where to send refunds, if a refund is necessary
     * 
*/ int getRefundToCount(); /** * repeated .payments.Output refund_to = 3; * *
     * Where to send refunds, if a refund is necessary
     * 
*/ java.util.List getRefundToOrBuilderList(); /** * repeated .payments.Output refund_to = 3; * *
     * Where to send refunds, if a refund is necessary
     * 
*/ org.bitcoin.protocols.payments.Protos.OutputOrBuilder getRefundToOrBuilder( int index); // optional string memo = 4; /** * optional string memo = 4; * *
     * Human-readable message for the merchant
     * 
*/ boolean hasMemo(); /** * optional string memo = 4; * *
     * Human-readable message for the merchant
     * 
*/ java.lang.String getMemo(); /** * optional string memo = 4; * *
     * Human-readable message for the merchant
     * 
*/ com.google.protobuf.ByteString getMemoBytes(); } /** * Protobuf type {@code payments.Payment} */ public static final class Payment extends com.google.protobuf.GeneratedMessage implements PaymentOrBuilder { // Use Payment.newBuilder() to construct. private Payment(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } private Payment(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private static final Payment defaultInstance; public static Payment getDefaultInstance() { return defaultInstance; } public Payment getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private Payment( 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; merchantData_ = input.readBytes(); break; } case 18: { if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { transactions_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000002; } transactions_.add(input.readBytes()); break; } case 26: { if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { refundTo_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000004; } refundTo_.add(input.readMessage(org.bitcoin.protocols.payments.Protos.Output.PARSER, extensionRegistry)); break; } case 34: { bitField0_ |= 0x00000002; memo_ = 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 { if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { transactions_ = java.util.Collections.unmodifiableList(transactions_); } if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { refundTo_ = java.util.Collections.unmodifiableList(refundTo_); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.bitcoin.protocols.payments.Protos.internal_static_payments_Payment_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.bitcoin.protocols.payments.Protos.internal_static_payments_Payment_fieldAccessorTable .ensureFieldAccessorsInitialized( org.bitcoin.protocols.payments.Protos.Payment.class, org.bitcoin.protocols.payments.Protos.Payment.Builder.class); } public static com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { public Payment parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new Payment(input, extensionRegistry); } }; @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } private int bitField0_; // optional bytes merchant_data = 1; public static final int MERCHANT_DATA_FIELD_NUMBER = 1; private com.google.protobuf.ByteString merchantData_; /** * optional bytes merchant_data = 1; * *
     * From PaymentDetails.merchant_data
     * 
*/ public boolean hasMerchantData() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * optional bytes merchant_data = 1; * *
     * From PaymentDetails.merchant_data
     * 
*/ public com.google.protobuf.ByteString getMerchantData() { return merchantData_; } // repeated bytes transactions = 2; public static final int TRANSACTIONS_FIELD_NUMBER = 2; private java.util.List transactions_; /** * repeated bytes transactions = 2; * *
     * Signed transactions that satisfy PaymentDetails.outputs
     * 
*/ public java.util.List getTransactionsList() { return transactions_; } /** * repeated bytes transactions = 2; * *
     * Signed transactions that satisfy PaymentDetails.outputs
     * 
*/ public int getTransactionsCount() { return transactions_.size(); } /** * repeated bytes transactions = 2; * *
     * Signed transactions that satisfy PaymentDetails.outputs
     * 
*/ public com.google.protobuf.ByteString getTransactions(int index) { return transactions_.get(index); } // repeated .payments.Output refund_to = 3; public static final int REFUND_TO_FIELD_NUMBER = 3; private java.util.List refundTo_; /** * repeated .payments.Output refund_to = 3; * *
     * Where to send refunds, if a refund is necessary
     * 
*/ public java.util.List getRefundToList() { return refundTo_; } /** * repeated .payments.Output refund_to = 3; * *
     * Where to send refunds, if a refund is necessary
     * 
*/ public java.util.List getRefundToOrBuilderList() { return refundTo_; } /** * repeated .payments.Output refund_to = 3; * *
     * Where to send refunds, if a refund is necessary
     * 
*/ public int getRefundToCount() { return refundTo_.size(); } /** * repeated .payments.Output refund_to = 3; * *
     * Where to send refunds, if a refund is necessary
     * 
*/ public org.bitcoin.protocols.payments.Protos.Output getRefundTo(int index) { return refundTo_.get(index); } /** * repeated .payments.Output refund_to = 3; * *
     * Where to send refunds, if a refund is necessary
     * 
*/ public org.bitcoin.protocols.payments.Protos.OutputOrBuilder getRefundToOrBuilder( int index) { return refundTo_.get(index); } // optional string memo = 4; public static final int MEMO_FIELD_NUMBER = 4; private java.lang.Object memo_; /** * optional string memo = 4; * *
     * Human-readable message for the merchant
     * 
*/ public boolean hasMemo() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * optional string memo = 4; * *
     * Human-readable message for the merchant
     * 
*/ public java.lang.String getMemo() { java.lang.Object ref = memo_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { memo_ = s; } return s; } } /** * optional string memo = 4; * *
     * Human-readable message for the merchant
     * 
*/ public com.google.protobuf.ByteString getMemoBytes() { java.lang.Object ref = memo_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); memo_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } private void initFields() { merchantData_ = com.google.protobuf.ByteString.EMPTY; transactions_ = java.util.Collections.emptyList(); refundTo_ = java.util.Collections.emptyList(); memo_ = ""; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; for (int i = 0; i < getRefundToCount(); i++) { if (!getRefundTo(i).isInitialized()) { 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, merchantData_); } for (int i = 0; i < transactions_.size(); i++) { output.writeBytes(2, transactions_.get(i)); } for (int i = 0; i < refundTo_.size(); i++) { output.writeMessage(3, refundTo_.get(i)); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeBytes(4, getMemoBytes()); } 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, merchantData_); } { int dataSize = 0; for (int i = 0; i < transactions_.size(); i++) { dataSize += com.google.protobuf.CodedOutputStream .computeBytesSizeNoTag(transactions_.get(i)); } size += dataSize; size += 1 * getTransactionsList().size(); } for (int i = 0; i < refundTo_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, refundTo_.get(i)); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(4, getMemoBytes()); } 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.bitcoin.protocols.payments.Protos.Payment parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.bitcoin.protocols.payments.Protos.Payment parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.bitcoin.protocols.payments.Protos.Payment parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.bitcoin.protocols.payments.Protos.Payment parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.bitcoin.protocols.payments.Protos.Payment parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static org.bitcoin.protocols.payments.Protos.Payment parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static org.bitcoin.protocols.payments.Protos.Payment parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static org.bitcoin.protocols.payments.Protos.Payment parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static org.bitcoin.protocols.payments.Protos.Payment parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static org.bitcoin.protocols.payments.Protos.Payment 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.bitcoin.protocols.payments.Protos.Payment 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 payments.Payment} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements org.bitcoin.protocols.payments.Protos.PaymentOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.bitcoin.protocols.payments.Protos.internal_static_payments_Payment_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.bitcoin.protocols.payments.Protos.internal_static_payments_Payment_fieldAccessorTable .ensureFieldAccessorsInitialized( org.bitcoin.protocols.payments.Protos.Payment.class, org.bitcoin.protocols.payments.Protos.Payment.Builder.class); } // Construct using org.bitcoin.protocols.payments.Protos.Payment.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { getRefundToFieldBuilder(); } } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); merchantData_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000001); transactions_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); if (refundToBuilder_ == null) { refundTo_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000004); } else { refundToBuilder_.clear(); } memo_ = ""; bitField0_ = (bitField0_ & ~0x00000008); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.bitcoin.protocols.payments.Protos.internal_static_payments_Payment_descriptor; } public org.bitcoin.protocols.payments.Protos.Payment getDefaultInstanceForType() { return org.bitcoin.protocols.payments.Protos.Payment.getDefaultInstance(); } public org.bitcoin.protocols.payments.Protos.Payment build() { org.bitcoin.protocols.payments.Protos.Payment result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public org.bitcoin.protocols.payments.Protos.Payment buildPartial() { org.bitcoin.protocols.payments.Protos.Payment result = new org.bitcoin.protocols.payments.Protos.Payment(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.merchantData_ = merchantData_; if (((bitField0_ & 0x00000002) == 0x00000002)) { transactions_ = java.util.Collections.unmodifiableList(transactions_); bitField0_ = (bitField0_ & ~0x00000002); } result.transactions_ = transactions_; if (refundToBuilder_ == null) { if (((bitField0_ & 0x00000004) == 0x00000004)) { refundTo_ = java.util.Collections.unmodifiableList(refundTo_); bitField0_ = (bitField0_ & ~0x00000004); } result.refundTo_ = refundTo_; } else { result.refundTo_ = refundToBuilder_.build(); } if (((from_bitField0_ & 0x00000008) == 0x00000008)) { to_bitField0_ |= 0x00000002; } result.memo_ = memo_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.bitcoin.protocols.payments.Protos.Payment) { return mergeFrom((org.bitcoin.protocols.payments.Protos.Payment)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(org.bitcoin.protocols.payments.Protos.Payment other) { if (other == org.bitcoin.protocols.payments.Protos.Payment.getDefaultInstance()) return this; if (other.hasMerchantData()) { setMerchantData(other.getMerchantData()); } if (!other.transactions_.isEmpty()) { if (transactions_.isEmpty()) { transactions_ = other.transactions_; bitField0_ = (bitField0_ & ~0x00000002); } else { ensureTransactionsIsMutable(); transactions_.addAll(other.transactions_); } onChanged(); } if (refundToBuilder_ == null) { if (!other.refundTo_.isEmpty()) { if (refundTo_.isEmpty()) { refundTo_ = other.refundTo_; bitField0_ = (bitField0_ & ~0x00000004); } else { ensureRefundToIsMutable(); refundTo_.addAll(other.refundTo_); } onChanged(); } } else { if (!other.refundTo_.isEmpty()) { if (refundToBuilder_.isEmpty()) { refundToBuilder_.dispose(); refundToBuilder_ = null; refundTo_ = other.refundTo_; bitField0_ = (bitField0_ & ~0x00000004); refundToBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getRefundToFieldBuilder() : null; } else { refundToBuilder_.addAllMessages(other.refundTo_); } } } if (other.hasMemo()) { bitField0_ |= 0x00000008; memo_ = other.memo_; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { for (int i = 0; i < getRefundToCount(); i++) { if (!getRefundTo(i).isInitialized()) { return false; } } return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { org.bitcoin.protocols.payments.Protos.Payment parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (org.bitcoin.protocols.payments.Protos.Payment) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; // optional bytes merchant_data = 1; private com.google.protobuf.ByteString merchantData_ = com.google.protobuf.ByteString.EMPTY; /** * optional bytes merchant_data = 1; * *
       * From PaymentDetails.merchant_data
       * 
*/ public boolean hasMerchantData() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * optional bytes merchant_data = 1; * *
       * From PaymentDetails.merchant_data
       * 
*/ public com.google.protobuf.ByteString getMerchantData() { return merchantData_; } /** * optional bytes merchant_data = 1; * *
       * From PaymentDetails.merchant_data
       * 
*/ public Builder setMerchantData(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; merchantData_ = value; onChanged(); return this; } /** * optional bytes merchant_data = 1; * *
       * From PaymentDetails.merchant_data
       * 
*/ public Builder clearMerchantData() { bitField0_ = (bitField0_ & ~0x00000001); merchantData_ = getDefaultInstance().getMerchantData(); onChanged(); return this; } // repeated bytes transactions = 2; private java.util.List transactions_ = java.util.Collections.emptyList(); private void ensureTransactionsIsMutable() { if (!((bitField0_ & 0x00000002) == 0x00000002)) { transactions_ = new java.util.ArrayList(transactions_); bitField0_ |= 0x00000002; } } /** * repeated bytes transactions = 2; * *
       * Signed transactions that satisfy PaymentDetails.outputs
       * 
*/ public java.util.List getTransactionsList() { return java.util.Collections.unmodifiableList(transactions_); } /** * repeated bytes transactions = 2; * *
       * Signed transactions that satisfy PaymentDetails.outputs
       * 
*/ public int getTransactionsCount() { return transactions_.size(); } /** * repeated bytes transactions = 2; * *
       * Signed transactions that satisfy PaymentDetails.outputs
       * 
*/ public com.google.protobuf.ByteString getTransactions(int index) { return transactions_.get(index); } /** * repeated bytes transactions = 2; * *
       * Signed transactions that satisfy PaymentDetails.outputs
       * 
*/ public Builder setTransactions( int index, com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } ensureTransactionsIsMutable(); transactions_.set(index, value); onChanged(); return this; } /** * repeated bytes transactions = 2; * *
       * Signed transactions that satisfy PaymentDetails.outputs
       * 
*/ public Builder addTransactions(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } ensureTransactionsIsMutable(); transactions_.add(value); onChanged(); return this; } /** * repeated bytes transactions = 2; * *
       * Signed transactions that satisfy PaymentDetails.outputs
       * 
*/ public Builder addAllTransactions( java.lang.Iterable values) { ensureTransactionsIsMutable(); super.addAll(values, transactions_); onChanged(); return this; } /** * repeated bytes transactions = 2; * *
       * Signed transactions that satisfy PaymentDetails.outputs
       * 
*/ public Builder clearTransactions() { transactions_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } // repeated .payments.Output refund_to = 3; private java.util.List refundTo_ = java.util.Collections.emptyList(); private void ensureRefundToIsMutable() { if (!((bitField0_ & 0x00000004) == 0x00000004)) { refundTo_ = new java.util.ArrayList(refundTo_); bitField0_ |= 0x00000004; } } private com.google.protobuf.RepeatedFieldBuilder< org.bitcoin.protocols.payments.Protos.Output, org.bitcoin.protocols.payments.Protos.Output.Builder, org.bitcoin.protocols.payments.Protos.OutputOrBuilder> refundToBuilder_; /** * repeated .payments.Output refund_to = 3; * *
       * Where to send refunds, if a refund is necessary
       * 
*/ public java.util.List getRefundToList() { if (refundToBuilder_ == null) { return java.util.Collections.unmodifiableList(refundTo_); } else { return refundToBuilder_.getMessageList(); } } /** * repeated .payments.Output refund_to = 3; * *
       * Where to send refunds, if a refund is necessary
       * 
*/ public int getRefundToCount() { if (refundToBuilder_ == null) { return refundTo_.size(); } else { return refundToBuilder_.getCount(); } } /** * repeated .payments.Output refund_to = 3; * *
       * Where to send refunds, if a refund is necessary
       * 
*/ public org.bitcoin.protocols.payments.Protos.Output getRefundTo(int index) { if (refundToBuilder_ == null) { return refundTo_.get(index); } else { return refundToBuilder_.getMessage(index); } } /** * repeated .payments.Output refund_to = 3; * *
       * Where to send refunds, if a refund is necessary
       * 
*/ public Builder setRefundTo( int index, org.bitcoin.protocols.payments.Protos.Output value) { if (refundToBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureRefundToIsMutable(); refundTo_.set(index, value); onChanged(); } else { refundToBuilder_.setMessage(index, value); } return this; } /** * repeated .payments.Output refund_to = 3; * *
       * Where to send refunds, if a refund is necessary
       * 
*/ public Builder setRefundTo( int index, org.bitcoin.protocols.payments.Protos.Output.Builder builderForValue) { if (refundToBuilder_ == null) { ensureRefundToIsMutable(); refundTo_.set(index, builderForValue.build()); onChanged(); } else { refundToBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * repeated .payments.Output refund_to = 3; * *
       * Where to send refunds, if a refund is necessary
       * 
*/ public Builder addRefundTo(org.bitcoin.protocols.payments.Protos.Output value) { if (refundToBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureRefundToIsMutable(); refundTo_.add(value); onChanged(); } else { refundToBuilder_.addMessage(value); } return this; } /** * repeated .payments.Output refund_to = 3; * *
       * Where to send refunds, if a refund is necessary
       * 
*/ public Builder addRefundTo( int index, org.bitcoin.protocols.payments.Protos.Output value) { if (refundToBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureRefundToIsMutable(); refundTo_.add(index, value); onChanged(); } else { refundToBuilder_.addMessage(index, value); } return this; } /** * repeated .payments.Output refund_to = 3; * *
       * Where to send refunds, if a refund is necessary
       * 
*/ public Builder addRefundTo( org.bitcoin.protocols.payments.Protos.Output.Builder builderForValue) { if (refundToBuilder_ == null) { ensureRefundToIsMutable(); refundTo_.add(builderForValue.build()); onChanged(); } else { refundToBuilder_.addMessage(builderForValue.build()); } return this; } /** * repeated .payments.Output refund_to = 3; * *
       * Where to send refunds, if a refund is necessary
       * 
*/ public Builder addRefundTo( int index, org.bitcoin.protocols.payments.Protos.Output.Builder builderForValue) { if (refundToBuilder_ == null) { ensureRefundToIsMutable(); refundTo_.add(index, builderForValue.build()); onChanged(); } else { refundToBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * repeated .payments.Output refund_to = 3; * *
       * Where to send refunds, if a refund is necessary
       * 
*/ public Builder addAllRefundTo( java.lang.Iterable values) { if (refundToBuilder_ == null) { ensureRefundToIsMutable(); super.addAll(values, refundTo_); onChanged(); } else { refundToBuilder_.addAllMessages(values); } return this; } /** * repeated .payments.Output refund_to = 3; * *
       * Where to send refunds, if a refund is necessary
       * 
*/ public Builder clearRefundTo() { if (refundToBuilder_ == null) { refundTo_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000004); onChanged(); } else { refundToBuilder_.clear(); } return this; } /** * repeated .payments.Output refund_to = 3; * *
       * Where to send refunds, if a refund is necessary
       * 
*/ public Builder removeRefundTo(int index) { if (refundToBuilder_ == null) { ensureRefundToIsMutable(); refundTo_.remove(index); onChanged(); } else { refundToBuilder_.remove(index); } return this; } /** * repeated .payments.Output refund_to = 3; * *
       * Where to send refunds, if a refund is necessary
       * 
*/ public org.bitcoin.protocols.payments.Protos.Output.Builder getRefundToBuilder( int index) { return getRefundToFieldBuilder().getBuilder(index); } /** * repeated .payments.Output refund_to = 3; * *
       * Where to send refunds, if a refund is necessary
       * 
*/ public org.bitcoin.protocols.payments.Protos.OutputOrBuilder getRefundToOrBuilder( int index) { if (refundToBuilder_ == null) { return refundTo_.get(index); } else { return refundToBuilder_.getMessageOrBuilder(index); } } /** * repeated .payments.Output refund_to = 3; * *
       * Where to send refunds, if a refund is necessary
       * 
*/ public java.util.List getRefundToOrBuilderList() { if (refundToBuilder_ != null) { return refundToBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(refundTo_); } } /** * repeated .payments.Output refund_to = 3; * *
       * Where to send refunds, if a refund is necessary
       * 
*/ public org.bitcoin.protocols.payments.Protos.Output.Builder addRefundToBuilder() { return getRefundToFieldBuilder().addBuilder( org.bitcoin.protocols.payments.Protos.Output.getDefaultInstance()); } /** * repeated .payments.Output refund_to = 3; * *
       * Where to send refunds, if a refund is necessary
       * 
*/ public org.bitcoin.protocols.payments.Protos.Output.Builder addRefundToBuilder( int index) { return getRefundToFieldBuilder().addBuilder( index, org.bitcoin.protocols.payments.Protos.Output.getDefaultInstance()); } /** * repeated .payments.Output refund_to = 3; * *
       * Where to send refunds, if a refund is necessary
       * 
*/ public java.util.List getRefundToBuilderList() { return getRefundToFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilder< org.bitcoin.protocols.payments.Protos.Output, org.bitcoin.protocols.payments.Protos.Output.Builder, org.bitcoin.protocols.payments.Protos.OutputOrBuilder> getRefundToFieldBuilder() { if (refundToBuilder_ == null) { refundToBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< org.bitcoin.protocols.payments.Protos.Output, org.bitcoin.protocols.payments.Protos.Output.Builder, org.bitcoin.protocols.payments.Protos.OutputOrBuilder>( refundTo_, ((bitField0_ & 0x00000004) == 0x00000004), getParentForChildren(), isClean()); refundTo_ = null; } return refundToBuilder_; } // optional string memo = 4; private java.lang.Object memo_ = ""; /** * optional string memo = 4; * *
       * Human-readable message for the merchant
       * 
*/ public boolean hasMemo() { return ((bitField0_ & 0x00000008) == 0x00000008); } /** * optional string memo = 4; * *
       * Human-readable message for the merchant
       * 
*/ public java.lang.String getMemo() { java.lang.Object ref = memo_; if (!(ref instanceof java.lang.String)) { java.lang.String s = ((com.google.protobuf.ByteString) ref) .toStringUtf8(); memo_ = s; return s; } else { return (java.lang.String) ref; } } /** * optional string memo = 4; * *
       * Human-readable message for the merchant
       * 
*/ public com.google.protobuf.ByteString getMemoBytes() { java.lang.Object ref = memo_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); memo_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * optional string memo = 4; * *
       * Human-readable message for the merchant
       * 
*/ public Builder setMemo( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000008; memo_ = value; onChanged(); return this; } /** * optional string memo = 4; * *
       * Human-readable message for the merchant
       * 
*/ public Builder clearMemo() { bitField0_ = (bitField0_ & ~0x00000008); memo_ = getDefaultInstance().getMemo(); onChanged(); return this; } /** * optional string memo = 4; * *
       * Human-readable message for the merchant
       * 
*/ public Builder setMemoBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000008; memo_ = value; onChanged(); return this; } // @@protoc_insertion_point(builder_scope:payments.Payment) } static { defaultInstance = new Payment(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:payments.Payment) } public interface PaymentACKOrBuilder extends com.google.protobuf.MessageOrBuilder { // required .payments.Payment payment = 1; /** * required .payments.Payment payment = 1; * *
     * Payment message that triggered this ACK
     * 
*/ boolean hasPayment(); /** * required .payments.Payment payment = 1; * *
     * Payment message that triggered this ACK
     * 
*/ org.bitcoin.protocols.payments.Protos.Payment getPayment(); /** * required .payments.Payment payment = 1; * *
     * Payment message that triggered this ACK
     * 
*/ org.bitcoin.protocols.payments.Protos.PaymentOrBuilder getPaymentOrBuilder(); // optional string memo = 2; /** * optional string memo = 2; * *
     * human-readable message for customer
     * 
*/ boolean hasMemo(); /** * optional string memo = 2; * *
     * human-readable message for customer
     * 
*/ java.lang.String getMemo(); /** * optional string memo = 2; * *
     * human-readable message for customer
     * 
*/ com.google.protobuf.ByteString getMemoBytes(); } /** * Protobuf type {@code payments.PaymentACK} */ public static final class PaymentACK extends com.google.protobuf.GeneratedMessage implements PaymentACKOrBuilder { // Use PaymentACK.newBuilder() to construct. private PaymentACK(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } private PaymentACK(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private static final PaymentACK defaultInstance; public static PaymentACK getDefaultInstance() { return defaultInstance; } public PaymentACK getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private PaymentACK( 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: { org.bitcoin.protocols.payments.Protos.Payment.Builder subBuilder = null; if (((bitField0_ & 0x00000001) == 0x00000001)) { subBuilder = payment_.toBuilder(); } payment_ = input.readMessage(org.bitcoin.protocols.payments.Protos.Payment.PARSER, extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(payment_); payment_ = subBuilder.buildPartial(); } bitField0_ |= 0x00000001; break; } case 18: { bitField0_ |= 0x00000002; memo_ = 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.bitcoin.protocols.payments.Protos.internal_static_payments_PaymentACK_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.bitcoin.protocols.payments.Protos.internal_static_payments_PaymentACK_fieldAccessorTable .ensureFieldAccessorsInitialized( org.bitcoin.protocols.payments.Protos.PaymentACK.class, org.bitcoin.protocols.payments.Protos.PaymentACK.Builder.class); } public static com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { public PaymentACK parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new PaymentACK(input, extensionRegistry); } }; @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } private int bitField0_; // required .payments.Payment payment = 1; public static final int PAYMENT_FIELD_NUMBER = 1; private org.bitcoin.protocols.payments.Protos.Payment payment_; /** * required .payments.Payment payment = 1; * *
     * Payment message that triggered this ACK
     * 
*/ public boolean hasPayment() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * required .payments.Payment payment = 1; * *
     * Payment message that triggered this ACK
     * 
*/ public org.bitcoin.protocols.payments.Protos.Payment getPayment() { return payment_; } /** * required .payments.Payment payment = 1; * *
     * Payment message that triggered this ACK
     * 
*/ public org.bitcoin.protocols.payments.Protos.PaymentOrBuilder getPaymentOrBuilder() { return payment_; } // optional string memo = 2; public static final int MEMO_FIELD_NUMBER = 2; private java.lang.Object memo_; /** * optional string memo = 2; * *
     * human-readable message for customer
     * 
*/ public boolean hasMemo() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * optional string memo = 2; * *
     * human-readable message for customer
     * 
*/ public java.lang.String getMemo() { java.lang.Object ref = memo_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { memo_ = s; } return s; } } /** * optional string memo = 2; * *
     * human-readable message for customer
     * 
*/ public com.google.protobuf.ByteString getMemoBytes() { java.lang.Object ref = memo_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); memo_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } private void initFields() { payment_ = org.bitcoin.protocols.payments.Protos.Payment.getDefaultInstance(); memo_ = ""; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; if (!hasPayment()) { memoizedIsInitialized = 0; return false; } if (!getPayment().isInitialized()) { 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.writeMessage(1, payment_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeBytes(2, getMemoBytes()); } 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 .computeMessageSize(1, payment_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(2, getMemoBytes()); } 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.bitcoin.protocols.payments.Protos.PaymentACK parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.bitcoin.protocols.payments.Protos.PaymentACK parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.bitcoin.protocols.payments.Protos.PaymentACK parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.bitcoin.protocols.payments.Protos.PaymentACK parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.bitcoin.protocols.payments.Protos.PaymentACK parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static org.bitcoin.protocols.payments.Protos.PaymentACK parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static org.bitcoin.protocols.payments.Protos.PaymentACK parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static org.bitcoin.protocols.payments.Protos.PaymentACK parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static org.bitcoin.protocols.payments.Protos.PaymentACK parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static org.bitcoin.protocols.payments.Protos.PaymentACK 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.bitcoin.protocols.payments.Protos.PaymentACK 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 payments.PaymentACK} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements org.bitcoin.protocols.payments.Protos.PaymentACKOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.bitcoin.protocols.payments.Protos.internal_static_payments_PaymentACK_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.bitcoin.protocols.payments.Protos.internal_static_payments_PaymentACK_fieldAccessorTable .ensureFieldAccessorsInitialized( org.bitcoin.protocols.payments.Protos.PaymentACK.class, org.bitcoin.protocols.payments.Protos.PaymentACK.Builder.class); } // Construct using org.bitcoin.protocols.payments.Protos.PaymentACK.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { getPaymentFieldBuilder(); } } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); if (paymentBuilder_ == null) { payment_ = org.bitcoin.protocols.payments.Protos.Payment.getDefaultInstance(); } else { paymentBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000001); memo_ = ""; bitField0_ = (bitField0_ & ~0x00000002); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.bitcoin.protocols.payments.Protos.internal_static_payments_PaymentACK_descriptor; } public org.bitcoin.protocols.payments.Protos.PaymentACK getDefaultInstanceForType() { return org.bitcoin.protocols.payments.Protos.PaymentACK.getDefaultInstance(); } public org.bitcoin.protocols.payments.Protos.PaymentACK build() { org.bitcoin.protocols.payments.Protos.PaymentACK result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public org.bitcoin.protocols.payments.Protos.PaymentACK buildPartial() { org.bitcoin.protocols.payments.Protos.PaymentACK result = new org.bitcoin.protocols.payments.Protos.PaymentACK(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } if (paymentBuilder_ == null) { result.payment_ = payment_; } else { result.payment_ = paymentBuilder_.build(); } if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } result.memo_ = memo_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.bitcoin.protocols.payments.Protos.PaymentACK) { return mergeFrom((org.bitcoin.protocols.payments.Protos.PaymentACK)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(org.bitcoin.protocols.payments.Protos.PaymentACK other) { if (other == org.bitcoin.protocols.payments.Protos.PaymentACK.getDefaultInstance()) return this; if (other.hasPayment()) { mergePayment(other.getPayment()); } if (other.hasMemo()) { bitField0_ |= 0x00000002; memo_ = other.memo_; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { if (!hasPayment()) { return false; } if (!getPayment().isInitialized()) { return false; } return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { org.bitcoin.protocols.payments.Protos.PaymentACK parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (org.bitcoin.protocols.payments.Protos.PaymentACK) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; // required .payments.Payment payment = 1; private org.bitcoin.protocols.payments.Protos.Payment payment_ = org.bitcoin.protocols.payments.Protos.Payment.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< org.bitcoin.protocols.payments.Protos.Payment, org.bitcoin.protocols.payments.Protos.Payment.Builder, org.bitcoin.protocols.payments.Protos.PaymentOrBuilder> paymentBuilder_; /** * required .payments.Payment payment = 1; * *
       * Payment message that triggered this ACK
       * 
*/ public boolean hasPayment() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * required .payments.Payment payment = 1; * *
       * Payment message that triggered this ACK
       * 
*/ public org.bitcoin.protocols.payments.Protos.Payment getPayment() { if (paymentBuilder_ == null) { return payment_; } else { return paymentBuilder_.getMessage(); } } /** * required .payments.Payment payment = 1; * *
       * Payment message that triggered this ACK
       * 
*/ public Builder setPayment(org.bitcoin.protocols.payments.Protos.Payment value) { if (paymentBuilder_ == null) { if (value == null) { throw new NullPointerException(); } payment_ = value; onChanged(); } else { paymentBuilder_.setMessage(value); } bitField0_ |= 0x00000001; return this; } /** * required .payments.Payment payment = 1; * *
       * Payment message that triggered this ACK
       * 
*/ public Builder setPayment( org.bitcoin.protocols.payments.Protos.Payment.Builder builderForValue) { if (paymentBuilder_ == null) { payment_ = builderForValue.build(); onChanged(); } else { paymentBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000001; return this; } /** * required .payments.Payment payment = 1; * *
       * Payment message that triggered this ACK
       * 
*/ public Builder mergePayment(org.bitcoin.protocols.payments.Protos.Payment value) { if (paymentBuilder_ == null) { if (((bitField0_ & 0x00000001) == 0x00000001) && payment_ != org.bitcoin.protocols.payments.Protos.Payment.getDefaultInstance()) { payment_ = org.bitcoin.protocols.payments.Protos.Payment.newBuilder(payment_).mergeFrom(value).buildPartial(); } else { payment_ = value; } onChanged(); } else { paymentBuilder_.mergeFrom(value); } bitField0_ |= 0x00000001; return this; } /** * required .payments.Payment payment = 1; * *
       * Payment message that triggered this ACK
       * 
*/ public Builder clearPayment() { if (paymentBuilder_ == null) { payment_ = org.bitcoin.protocols.payments.Protos.Payment.getDefaultInstance(); onChanged(); } else { paymentBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000001); return this; } /** * required .payments.Payment payment = 1; * *
       * Payment message that triggered this ACK
       * 
*/ public org.bitcoin.protocols.payments.Protos.Payment.Builder getPaymentBuilder() { bitField0_ |= 0x00000001; onChanged(); return getPaymentFieldBuilder().getBuilder(); } /** * required .payments.Payment payment = 1; * *
       * Payment message that triggered this ACK
       * 
*/ public org.bitcoin.protocols.payments.Protos.PaymentOrBuilder getPaymentOrBuilder() { if (paymentBuilder_ != null) { return paymentBuilder_.getMessageOrBuilder(); } else { return payment_; } } /** * required .payments.Payment payment = 1; * *
       * Payment message that triggered this ACK
       * 
*/ private com.google.protobuf.SingleFieldBuilder< org.bitcoin.protocols.payments.Protos.Payment, org.bitcoin.protocols.payments.Protos.Payment.Builder, org.bitcoin.protocols.payments.Protos.PaymentOrBuilder> getPaymentFieldBuilder() { if (paymentBuilder_ == null) { paymentBuilder_ = new com.google.protobuf.SingleFieldBuilder< org.bitcoin.protocols.payments.Protos.Payment, org.bitcoin.protocols.payments.Protos.Payment.Builder, org.bitcoin.protocols.payments.Protos.PaymentOrBuilder>( payment_, getParentForChildren(), isClean()); payment_ = null; } return paymentBuilder_; } // optional string memo = 2; private java.lang.Object memo_ = ""; /** * optional string memo = 2; * *
       * human-readable message for customer
       * 
*/ public boolean hasMemo() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * optional string memo = 2; * *
       * human-readable message for customer
       * 
*/ public java.lang.String getMemo() { java.lang.Object ref = memo_; if (!(ref instanceof java.lang.String)) { java.lang.String s = ((com.google.protobuf.ByteString) ref) .toStringUtf8(); memo_ = s; return s; } else { return (java.lang.String) ref; } } /** * optional string memo = 2; * *
       * human-readable message for customer
       * 
*/ public com.google.protobuf.ByteString getMemoBytes() { java.lang.Object ref = memo_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); memo_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * optional string memo = 2; * *
       * human-readable message for customer
       * 
*/ public Builder setMemo( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; memo_ = value; onChanged(); return this; } /** * optional string memo = 2; * *
       * human-readable message for customer
       * 
*/ public Builder clearMemo() { bitField0_ = (bitField0_ & ~0x00000002); memo_ = getDefaultInstance().getMemo(); onChanged(); return this; } /** * optional string memo = 2; * *
       * human-readable message for customer
       * 
*/ public Builder setMemoBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; memo_ = value; onChanged(); return this; } // @@protoc_insertion_point(builder_scope:payments.PaymentACK) } static { defaultInstance = new PaymentACK(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:payments.PaymentACK) } private static com.google.protobuf.Descriptors.Descriptor internal_static_payments_Output_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_payments_Output_fieldAccessorTable; private static com.google.protobuf.Descriptors.Descriptor internal_static_payments_PaymentDetails_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_payments_PaymentDetails_fieldAccessorTable; private static com.google.protobuf.Descriptors.Descriptor internal_static_payments_PaymentRequest_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_payments_PaymentRequest_fieldAccessorTable; private static com.google.protobuf.Descriptors.Descriptor internal_static_payments_X509Certificates_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_payments_X509Certificates_fieldAccessorTable; private static com.google.protobuf.Descriptors.Descriptor internal_static_payments_Payment_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_payments_Payment_fieldAccessorTable; private static com.google.protobuf.Descriptors.Descriptor internal_static_payments_PaymentACK_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_payments_PaymentACK_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\024paymentrequest.proto\022\010payments\"+\n\006Outp" + "ut\022\021\n\006amount\030\001 \001(\004:\0010\022\016\n\006script\030\002 \002(\014\"\243\001" + "\n\016PaymentDetails\022\025\n\007network\030\001 \001(\t:\004main\022" + "!\n\007outputs\030\002 \003(\0132\020.payments.Output\022\014\n\004ti" + "me\030\003 \002(\004\022\017\n\007expires\030\004 \001(\004\022\014\n\004memo\030\005 \001(\t\022" + "\023\n\013payment_url\030\006 \001(\t\022\025\n\rmerchant_data\030\007 " + "\001(\014\"\225\001\n\016PaymentRequest\022\"\n\027payment_detail" + "s_version\030\001 \001(\r:\0011\022\026\n\010pki_type\030\002 \001(\t:\004no" + "ne\022\020\n\010pki_data\030\003 \001(\014\022\"\n\032serialized_payme" + "nt_details\030\004 \002(\014\022\021\n\tsignature\030\005 \001(\014\"\'\n\020X", "509Certificates\022\023\n\013certificate\030\001 \003(\014\"i\n\007" + "Payment\022\025\n\rmerchant_data\030\001 \001(\014\022\024\n\014transa" + "ctions\030\002 \003(\014\022#\n\trefund_to\030\003 \003(\0132\020.paymen" + "ts.Output\022\014\n\004memo\030\004 \001(\t\">\n\nPaymentACK\022\"\n" + "\007payment\030\001 \002(\0132\021.payments.Payment\022\014\n\004mem" + "o\030\002 \001(\tB(\n\036org.bitcoin.protocols.payment" + "sB\006Protos" }; 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; internal_static_payments_Output_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_payments_Output_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_payments_Output_descriptor, new java.lang.String[] { "Amount", "Script", }); internal_static_payments_PaymentDetails_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_payments_PaymentDetails_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_payments_PaymentDetails_descriptor, new java.lang.String[] { "Network", "Outputs", "Time", "Expires", "Memo", "PaymentUrl", "MerchantData", }); internal_static_payments_PaymentRequest_descriptor = getDescriptor().getMessageTypes().get(2); internal_static_payments_PaymentRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_payments_PaymentRequest_descriptor, new java.lang.String[] { "PaymentDetailsVersion", "PkiType", "PkiData", "SerializedPaymentDetails", "Signature", }); internal_static_payments_X509Certificates_descriptor = getDescriptor().getMessageTypes().get(3); internal_static_payments_X509Certificates_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_payments_X509Certificates_descriptor, new java.lang.String[] { "Certificate", }); internal_static_payments_Payment_descriptor = getDescriptor().getMessageTypes().get(4); internal_static_payments_Payment_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_payments_Payment_descriptor, new java.lang.String[] { "MerchantData", "Transactions", "RefundTo", "Memo", }); internal_static_payments_PaymentACK_descriptor = getDescriptor().getMessageTypes().get(5); internal_static_payments_PaymentACK_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_payments_PaymentACK_descriptor, new java.lang.String[] { "Payment", "Memo", }); return null; } }; com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { }, assigner); } // @@protoc_insertion_point(outer_class_scope) }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy