// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: service.proto

package org.chromium.chrome.browser.autofill_assistant.proto;

/**
 * <pre>
 * Result message used to send payment request related data to the server.
 * </pre>
 *
 * Protobuf type {@code autofill_assistant.PaymentDetails}
 */
public  final class PaymentDetails extends
    com.google.protobuf.GeneratedMessageLite<
        PaymentDetails, PaymentDetails.Builder> implements
    // @@protoc_insertion_point(message_implements:autofill_assistant.PaymentDetails)
    PaymentDetailsOrBuilder {
  private PaymentDetails() {
    cardIssuerNetwork_ = "";
    payerEmail_ = "";
  }
  private int bitField0_;
  public static final int CARD_ISSUER_NETWORK_FIELD_NUMBER = 1;
  private java.lang.String cardIssuerNetwork_;
  /**
   * <code>optional string card_issuer_network = 1;</code>
   */
  public boolean hasCardIssuerNetwork() {
    return ((bitField0_ & 0x00000001) == 0x00000001);
  }
  /**
   * <code>optional string card_issuer_network = 1;</code>
   */
  public java.lang.String getCardIssuerNetwork() {
    return cardIssuerNetwork_;
  }
  /**
   * <code>optional string card_issuer_network = 1;</code>
   */
  public com.google.protobuf.ByteString
      getCardIssuerNetworkBytes() {
    return com.google.protobuf.ByteString.copyFromUtf8(cardIssuerNetwork_);
  }
  /**
   * <code>optional string card_issuer_network = 1;</code>
   */
  private void setCardIssuerNetwork(
      java.lang.String value) {
    if (value == null) {
    throw new NullPointerException();
  }
  bitField0_ |= 0x00000001;
    cardIssuerNetwork_ = value;
  }
  /**
   * <code>optional string card_issuer_network = 1;</code>
   */
  private void clearCardIssuerNetwork() {
    bitField0_ = (bitField0_ & ~0x00000001);
    cardIssuerNetwork_ = getDefaultInstance().getCardIssuerNetwork();
  }
  /**
   * <code>optional string card_issuer_network = 1;</code>
   */
  private void setCardIssuerNetworkBytes(
      com.google.protobuf.ByteString value) {
    if (value == null) {
    throw new NullPointerException();
  }
  bitField0_ |= 0x00000001;
    cardIssuerNetwork_ = value.toStringUtf8();
  }

  public static final int IS_TERMS_AND_CONDITIONS_ACCEPTED_FIELD_NUMBER = 2;
  private boolean isTermsAndConditionsAccepted_;
  /**
   * <pre>
   * Whether the integrated terms and conditions approval checkbox was checked.
   * </pre>
   *
   * <code>optional bool is_terms_and_conditions_accepted = 2;</code>
   */
  public boolean hasIsTermsAndConditionsAccepted() {
    return ((bitField0_ & 0x00000002) == 0x00000002);
  }
  /**
   * <pre>
   * Whether the integrated terms and conditions approval checkbox was checked.
   * </pre>
   *
   * <code>optional bool is_terms_and_conditions_accepted = 2;</code>
   */
  public boolean getIsTermsAndConditionsAccepted() {
    return isTermsAndConditionsAccepted_;
  }
  /**
   * <pre>
   * Whether the integrated terms and conditions approval checkbox was checked.
   * </pre>
   *
   * <code>optional bool is_terms_and_conditions_accepted = 2;</code>
   */
  private void setIsTermsAndConditionsAccepted(boolean value) {
    bitField0_ |= 0x00000002;
    isTermsAndConditionsAccepted_ = value;
  }
  /**
   * <pre>
   * Whether the integrated terms and conditions approval checkbox was checked.
   * </pre>
   *
   * <code>optional bool is_terms_and_conditions_accepted = 2;</code>
   */
  private void clearIsTermsAndConditionsAccepted() {
    bitField0_ = (bitField0_ & ~0x00000002);
    isTermsAndConditionsAccepted_ = false;
  }

  public static final int PAYER_EMAIL_FIELD_NUMBER = 3;
  private java.lang.String payerEmail_;
  /**
   * <pre>
   * The email address of the payer.
   * </pre>
   *
   * <code>optional string payer_email = 3;</code>
   */
  public boolean hasPayerEmail() {
    return ((bitField0_ & 0x00000004) == 0x00000004);
  }
  /**
   * <pre>
   * The email address of the payer.
   * </pre>
   *
   * <code>optional string payer_email = 3;</code>
   */
  public java.lang.String getPayerEmail() {
    return payerEmail_;
  }
  /**
   * <pre>
   * The email address of the payer.
   * </pre>
   *
   * <code>optional string payer_email = 3;</code>
   */
  public com.google.protobuf.ByteString
      getPayerEmailBytes() {
    return com.google.protobuf.ByteString.copyFromUtf8(payerEmail_);
  }
  /**
   * <pre>
   * The email address of the payer.
   * </pre>
   *
   * <code>optional string payer_email = 3;</code>
   */
  private void setPayerEmail(
      java.lang.String value) {
    if (value == null) {
    throw new NullPointerException();
  }
  bitField0_ |= 0x00000004;
    payerEmail_ = value;
  }
  /**
   * <pre>
   * The email address of the payer.
   * </pre>
   *
   * <code>optional string payer_email = 3;</code>
   */
  private void clearPayerEmail() {
    bitField0_ = (bitField0_ & ~0x00000004);
    payerEmail_ = getDefaultInstance().getPayerEmail();
  }
  /**
   * <pre>
   * The email address of the payer.
   * </pre>
   *
   * <code>optional string payer_email = 3;</code>
   */
  private void setPayerEmailBytes(
      com.google.protobuf.ByteString value) {
    if (value == null) {
    throw new NullPointerException();
  }
  bitField0_ |= 0x00000004;
    payerEmail_ = value.toStringUtf8();
  }

  public void writeTo(com.google.protobuf.CodedOutputStream output)
                      throws java.io.IOException {
    if (((bitField0_ & 0x00000001) == 0x00000001)) {
      output.writeString(1, getCardIssuerNetwork());
    }
    if (((bitField0_ & 0x00000002) == 0x00000002)) {
      output.writeBool(2, isTermsAndConditionsAccepted_);
    }
    if (((bitField0_ & 0x00000004) == 0x00000004)) {
      output.writeString(3, getPayerEmail());
    }
    unknownFields.writeTo(output);
  }

  public int getSerializedSize() {
    int size = memoizedSerializedSize;
    if (size != -1) return size;

    size = 0;
    if (((bitField0_ & 0x00000001) == 0x00000001)) {
      size += com.google.protobuf.CodedOutputStream
        .computeStringSize(1, getCardIssuerNetwork());
    }
    if (((bitField0_ & 0x00000002) == 0x00000002)) {
      size += com.google.protobuf.CodedOutputStream
        .computeBoolSize(2, isTermsAndConditionsAccepted_);
    }
    if (((bitField0_ & 0x00000004) == 0x00000004)) {
      size += com.google.protobuf.CodedOutputStream
        .computeStringSize(3, getPayerEmail());
    }
    size += unknownFields.getSerializedSize();
    memoizedSerializedSize = size;
    return size;
  }

  public static org.chromium.chrome.browser.autofill_assistant.proto.PaymentDetails parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return com.google.protobuf.GeneratedMessageLite.parseFrom(
        DEFAULT_INSTANCE, data);
  }
  public static org.chromium.chrome.browser.autofill_assistant.proto.PaymentDetails parseFrom(
      com.google.protobuf.ByteString data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return com.google.protobuf.GeneratedMessageLite.parseFrom(
        DEFAULT_INSTANCE, data, extensionRegistry);
  }
  public static org.chromium.chrome.browser.autofill_assistant.proto.PaymentDetails parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return com.google.protobuf.GeneratedMessageLite.parseFrom(
        DEFAULT_INSTANCE, data);
  }
  public static org.chromium.chrome.browser.autofill_assistant.proto.PaymentDetails parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return com.google.protobuf.GeneratedMessageLite.parseFrom(
        DEFAULT_INSTANCE, data, extensionRegistry);
  }
  public static org.chromium.chrome.browser.autofill_assistant.proto.PaymentDetails parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageLite.parseFrom(
        DEFAULT_INSTANCE, input);
  }
  public static org.chromium.chrome.browser.autofill_assistant.proto.PaymentDetails parseFrom(
      java.io.InputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageLite.parseFrom(
        DEFAULT_INSTANCE, input, extensionRegistry);
  }
  public static org.chromium.chrome.browser.autofill_assistant.proto.PaymentDetails parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return parseDelimitedFrom(DEFAULT_INSTANCE, input);
  }
  public static org.chromium.chrome.browser.autofill_assistant.proto.PaymentDetails parseDelimitedFrom(
      java.io.InputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry);
  }
  public static org.chromium.chrome.browser.autofill_assistant.proto.PaymentDetails parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageLite.parseFrom(
        DEFAULT_INSTANCE, input);
  }
  public static org.chromium.chrome.browser.autofill_assistant.proto.PaymentDetails parseFrom(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageLite.parseFrom(
        DEFAULT_INSTANCE, input, extensionRegistry);
  }

  public static Builder newBuilder() {
    return DEFAULT_INSTANCE.toBuilder();
  }
  public static Builder newBuilder(org.chromium.chrome.browser.autofill_assistant.proto.PaymentDetails prototype) {
    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
  }

  /**
   * <pre>
   * Result message used to send payment request related data to the server.
   * </pre>
   *
   * Protobuf type {@code autofill_assistant.PaymentDetails}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageLite.Builder<
        org.chromium.chrome.browser.autofill_assistant.proto.PaymentDetails, Builder> implements
      // @@protoc_insertion_point(builder_implements:autofill_assistant.PaymentDetails)
      org.chromium.chrome.browser.autofill_assistant.proto.PaymentDetailsOrBuilder {
    // Construct using org.chromium.chrome.browser.autofill_assistant.proto.PaymentDetails.newBuilder()
    private Builder() {
      super(DEFAULT_INSTANCE);
    }


    /**
     * <code>optional string card_issuer_network = 1;</code>
     */
    public boolean hasCardIssuerNetwork() {
      return instance.hasCardIssuerNetwork();
    }
    /**
     * <code>optional string card_issuer_network = 1;</code>
     */
    public java.lang.String getCardIssuerNetwork() {
      return instance.getCardIssuerNetwork();
    }
    /**
     * <code>optional string card_issuer_network = 1;</code>
     */
    public com.google.protobuf.ByteString
        getCardIssuerNetworkBytes() {
      return instance.getCardIssuerNetworkBytes();
    }
    /**
     * <code>optional string card_issuer_network = 1;</code>
     */
    public Builder setCardIssuerNetwork(
        java.lang.String value) {
      copyOnWrite();
      instance.setCardIssuerNetwork(value);
      return this;
    }
    /**
     * <code>optional string card_issuer_network = 1;</code>
     */
    public Builder clearCardIssuerNetwork() {
      copyOnWrite();
      instance.clearCardIssuerNetwork();
      return this;
    }
    /**
     * <code>optional string card_issuer_network = 1;</code>
     */
    public Builder setCardIssuerNetworkBytes(
        com.google.protobuf.ByteString value) {
      copyOnWrite();
      instance.setCardIssuerNetworkBytes(value);
      return this;
    }

    /**
     * <pre>
     * Whether the integrated terms and conditions approval checkbox was checked.
     * </pre>
     *
     * <code>optional bool is_terms_and_conditions_accepted = 2;</code>
     */
    public boolean hasIsTermsAndConditionsAccepted() {
      return instance.hasIsTermsAndConditionsAccepted();
    }
    /**
     * <pre>
     * Whether the integrated terms and conditions approval checkbox was checked.
     * </pre>
     *
     * <code>optional bool is_terms_and_conditions_accepted = 2;</code>
     */
    public boolean getIsTermsAndConditionsAccepted() {
      return instance.getIsTermsAndConditionsAccepted();
    }
    /**
     * <pre>
     * Whether the integrated terms and conditions approval checkbox was checked.
     * </pre>
     *
     * <code>optional bool is_terms_and_conditions_accepted = 2;</code>
     */
    public Builder setIsTermsAndConditionsAccepted(boolean value) {
      copyOnWrite();
      instance.setIsTermsAndConditionsAccepted(value);
      return this;
    }
    /**
     * <pre>
     * Whether the integrated terms and conditions approval checkbox was checked.
     * </pre>
     *
     * <code>optional bool is_terms_and_conditions_accepted = 2;</code>
     */
    public Builder clearIsTermsAndConditionsAccepted() {
      copyOnWrite();
      instance.clearIsTermsAndConditionsAccepted();
      return this;
    }

    /**
     * <pre>
     * The email address of the payer.
     * </pre>
     *
     * <code>optional string payer_email = 3;</code>
     */
    public boolean hasPayerEmail() {
      return instance.hasPayerEmail();
    }
    /**
     * <pre>
     * The email address of the payer.
     * </pre>
     *
     * <code>optional string payer_email = 3;</code>
     */
    public java.lang.String getPayerEmail() {
      return instance.getPayerEmail();
    }
    /**
     * <pre>
     * The email address of the payer.
     * </pre>
     *
     * <code>optional string payer_email = 3;</code>
     */
    public com.google.protobuf.ByteString
        getPayerEmailBytes() {
      return instance.getPayerEmailBytes();
    }
    /**
     * <pre>
     * The email address of the payer.
     * </pre>
     *
     * <code>optional string payer_email = 3;</code>
     */
    public Builder setPayerEmail(
        java.lang.String value) {
      copyOnWrite();
      instance.setPayerEmail(value);
      return this;
    }
    /**
     * <pre>
     * The email address of the payer.
     * </pre>
     *
     * <code>optional string payer_email = 3;</code>
     */
    public Builder clearPayerEmail() {
      copyOnWrite();
      instance.clearPayerEmail();
      return this;
    }
    /**
     * <pre>
     * The email address of the payer.
     * </pre>
     *
     * <code>optional string payer_email = 3;</code>
     */
    public Builder setPayerEmailBytes(
        com.google.protobuf.ByteString value) {
      copyOnWrite();
      instance.setPayerEmailBytes(value);
      return this;
    }

    // @@protoc_insertion_point(builder_scope:autofill_assistant.PaymentDetails)
  }
  protected final Object dynamicMethod(
      com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
      Object arg0, Object arg1) {
    switch (method) {
      case NEW_MUTABLE_INSTANCE: {
        return new org.chromium.chrome.browser.autofill_assistant.proto.PaymentDetails();
      }
      case IS_INITIALIZED: {
        return DEFAULT_INSTANCE;
      }
      case MAKE_IMMUTABLE: {
        return null;
      }
      case NEW_BUILDER: {
        return new Builder();
      }
      case VISIT: {
        Visitor visitor = (Visitor) arg0;
        org.chromium.chrome.browser.autofill_assistant.proto.PaymentDetails other = (org.chromium.chrome.browser.autofill_assistant.proto.PaymentDetails) arg1;
        cardIssuerNetwork_ = visitor.visitString(
            hasCardIssuerNetwork(), cardIssuerNetwork_,
            other.hasCardIssuerNetwork(), other.cardIssuerNetwork_);
        isTermsAndConditionsAccepted_ = visitor.visitBoolean(
            hasIsTermsAndConditionsAccepted(), isTermsAndConditionsAccepted_,
            other.hasIsTermsAndConditionsAccepted(), other.isTermsAndConditionsAccepted_);
        payerEmail_ = visitor.visitString(
            hasPayerEmail(), payerEmail_,
            other.hasPayerEmail(), other.payerEmail_);
        if (visitor == com.google.protobuf.GeneratedMessageLite.MergeFromVisitor
            .INSTANCE) {
          bitField0_ |= other.bitField0_;
        }
        return this;
      }
      case MERGE_FROM_STREAM: {
        com.google.protobuf.CodedInputStream input =
            (com.google.protobuf.CodedInputStream) arg0;
        com.google.protobuf.ExtensionRegistryLite extensionRegistry =
            (com.google.protobuf.ExtensionRegistryLite) arg1;
        try {
          boolean done = false;
          while (!done) {
            int tag = input.readTag();
            switch (tag) {
              case 0:
                done = true;
                break;
              default: {
                if (!parseUnknownField(tag, input)) {
                  done = true;
                }
                break;
              }
              case 10: {
                String s = input.readString();
                bitField0_ |= 0x00000001;
                cardIssuerNetwork_ = s;
                break;
              }
              case 16: {
                bitField0_ |= 0x00000002;
                isTermsAndConditionsAccepted_ = input.readBool();
                break;
              }
              case 26: {
                String s = input.readString();
                bitField0_ |= 0x00000004;
                payerEmail_ = s;
                break;
              }
            }
          }
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          throw new RuntimeException(e.setUnfinishedMessage(this));
        } catch (java.io.IOException e) {
          throw new RuntimeException(
              new com.google.protobuf.InvalidProtocolBufferException(
                  e.getMessage()).setUnfinishedMessage(this));
        } finally {
        }
      }
      case GET_DEFAULT_INSTANCE: {
        return DEFAULT_INSTANCE;
      }
      case GET_PARSER: {
        if (PARSER == null) {    synchronized (org.chromium.chrome.browser.autofill_assistant.proto.PaymentDetails.class) {
            if (PARSER == null) {
              PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
            }
          }
        }
        return PARSER;
      }
    }
    throw new UnsupportedOperationException();
  }


  // @@protoc_insertion_point(class_scope:autofill_assistant.PaymentDetails)
  private static final org.chromium.chrome.browser.autofill_assistant.proto.PaymentDetails DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new PaymentDetails();
    DEFAULT_INSTANCE.makeImmutable();
  }

  public static org.chromium.chrome.browser.autofill_assistant.proto.PaymentDetails getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static volatile com.google.protobuf.Parser<PaymentDetails> PARSER;

  public static com.google.protobuf.Parser<PaymentDetails> parser() {
    return DEFAULT_INSTANCE.getParserForType();
  }
}

