// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: spotify/login5/v3/challenges/hashcash.proto

package com.spotify.login5v3;

public final class Hashcash {
  private Hashcash() {}
  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistryLite registry) {
  }

  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistry registry) {
    registerAllExtensions(
        (com.google.protobuf.ExtensionRegistryLite) registry);
  }
  public interface HashcashChallengeOrBuilder extends
      // @@protoc_insertion_point(interface_extends:spotify.login5.v3.challenges.HashcashChallenge)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <code>bytes prefix = 1;</code>
     * @return The prefix.
     */
    com.google.protobuf.ByteString getPrefix();

    /**
     * <code>int32 length = 2;</code>
     * @return The length.
     */
    int getLength();
  }
  /**
   * Protobuf type {@code spotify.login5.v3.challenges.HashcashChallenge}
   */
  public  static final class HashcashChallenge extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:spotify.login5.v3.challenges.HashcashChallenge)
      HashcashChallengeOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use HashcashChallenge.newBuilder() to construct.
    private HashcashChallenge(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private HashcashChallenge() {
      prefix_ = com.google.protobuf.ByteString.EMPTY;
    }

    @java.lang.Override
    @SuppressWarnings({"unused"})
    protected java.lang.Object newInstance(
        UnusedPrivateParameter unused) {
      return new HashcashChallenge();
    }

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return this.unknownFields;
    }
    private HashcashChallenge(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      this();
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      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;
            case 10: {

              prefix_ = input.readBytes();
              break;
            }
            case 16: {

              length_ = input.readInt32();
              break;
            }
            default: {
              if (!parseUnknownField(
                  input, unknownFields, extensionRegistry, tag)) {
                done = true;
              }
              break;
            }
          }
        }
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(this);
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(
            e).setUnfinishedMessage(this);
      } finally {
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.spotify.login5v3.Hashcash.internal_static_spotify_login5_v3_challenges_HashcashChallenge_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.spotify.login5v3.Hashcash.internal_static_spotify_login5_v3_challenges_HashcashChallenge_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.spotify.login5v3.Hashcash.HashcashChallenge.class, com.spotify.login5v3.Hashcash.HashcashChallenge.Builder.class);
    }

    public static final int PREFIX_FIELD_NUMBER = 1;
    private com.google.protobuf.ByteString prefix_;
    /**
     * <code>bytes prefix = 1;</code>
     * @return The prefix.
     */
    public com.google.protobuf.ByteString getPrefix() {
      return prefix_;
    }

    public static final int LENGTH_FIELD_NUMBER = 2;
    private int length_;
    /**
     * <code>int32 length = 2;</code>
     * @return The length.
     */
    public int getLength() {
      return length_;
    }

    private byte memoizedIsInitialized = -1;
    @java.lang.Override
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized == 1) return true;
      if (isInitialized == 0) return false;

      memoizedIsInitialized = 1;
      return true;
    }

    @java.lang.Override
    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      if (!prefix_.isEmpty()) {
        output.writeBytes(1, prefix_);
      }
      if (length_ != 0) {
        output.writeInt32(2, length_);
      }
      unknownFields.writeTo(output);
    }

    @java.lang.Override
    public int getSerializedSize() {
      int size = memoizedSize;
      if (size != -1) return size;

      size = 0;
      if (!prefix_.isEmpty()) {
        size += com.google.protobuf.CodedOutputStream
          .computeBytesSize(1, prefix_);
      }
      if (length_ != 0) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt32Size(2, length_);
      }
      size += unknownFields.getSerializedSize();
      memoizedSize = size;
      return size;
    }

    @java.lang.Override
    public boolean equals(final java.lang.Object obj) {
      if (obj == this) {
       return true;
      }
      if (!(obj instanceof com.spotify.login5v3.Hashcash.HashcashChallenge)) {
        return super.equals(obj);
      }
      com.spotify.login5v3.Hashcash.HashcashChallenge other = (com.spotify.login5v3.Hashcash.HashcashChallenge) obj;

      if (!getPrefix()
          .equals(other.getPrefix())) return false;
      if (getLength()
          != other.getLength()) return false;
      if (!unknownFields.equals(other.unknownFields)) return false;
      return true;
    }

    @java.lang.Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptor().hashCode();
      hash = (37 * hash) + PREFIX_FIELD_NUMBER;
      hash = (53 * hash) + getPrefix().hashCode();
      hash = (37 * hash) + LENGTH_FIELD_NUMBER;
      hash = (53 * hash) + getLength();
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static com.spotify.login5v3.Hashcash.HashcashChallenge parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.spotify.login5v3.Hashcash.HashcashChallenge parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static com.spotify.login5v3.Hashcash.HashcashChallenge parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.spotify.login5v3.Hashcash.HashcashChallenge parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static com.spotify.login5v3.Hashcash.HashcashChallenge parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.spotify.login5v3.Hashcash.HashcashChallenge parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static com.spotify.login5v3.Hashcash.HashcashChallenge parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static com.spotify.login5v3.Hashcash.HashcashChallenge parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input, extensionRegistry);
    }
    public static com.spotify.login5v3.Hashcash.HashcashChallenge parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static com.spotify.login5v3.Hashcash.HashcashChallenge parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
    }
    public static com.spotify.login5v3.Hashcash.HashcashChallenge parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static com.spotify.login5v3.Hashcash.HashcashChallenge parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input, extensionRegistry);
    }

    @java.lang.Override
    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder() {
      return DEFAULT_INSTANCE.toBuilder();
    }
    public static Builder newBuilder(com.spotify.login5v3.Hashcash.HashcashChallenge prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }
    @java.lang.Override
    public Builder toBuilder() {
      return this == DEFAULT_INSTANCE
          ? new Builder() : new Builder().mergeFrom(this);
    }

    @java.lang.Override
    protected Builder newBuilderForType(
        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      Builder builder = new Builder(parent);
      return builder;
    }
    /**
     * Protobuf type {@code spotify.login5.v3.challenges.HashcashChallenge}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:spotify.login5.v3.challenges.HashcashChallenge)
        com.spotify.login5v3.Hashcash.HashcashChallengeOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return com.spotify.login5v3.Hashcash.internal_static_spotify_login5_v3_challenges_HashcashChallenge_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return com.spotify.login5v3.Hashcash.internal_static_spotify_login5_v3_challenges_HashcashChallenge_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                com.spotify.login5v3.Hashcash.HashcashChallenge.class, com.spotify.login5v3.Hashcash.HashcashChallenge.Builder.class);
      }

      // Construct using com.spotify.login5v3.Hashcash.HashcashChallenge.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessageV3
                .alwaysUseFieldBuilders) {
        }
      }
      @java.lang.Override
      public Builder clear() {
        super.clear();
        prefix_ = com.google.protobuf.ByteString.EMPTY;

        length_ = 0;

        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return com.spotify.login5v3.Hashcash.internal_static_spotify_login5_v3_challenges_HashcashChallenge_descriptor;
      }

      @java.lang.Override
      public com.spotify.login5v3.Hashcash.HashcashChallenge getDefaultInstanceForType() {
        return com.spotify.login5v3.Hashcash.HashcashChallenge.getDefaultInstance();
      }

      @java.lang.Override
      public com.spotify.login5v3.Hashcash.HashcashChallenge build() {
        com.spotify.login5v3.Hashcash.HashcashChallenge result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public com.spotify.login5v3.Hashcash.HashcashChallenge buildPartial() {
        com.spotify.login5v3.Hashcash.HashcashChallenge result = new com.spotify.login5v3.Hashcash.HashcashChallenge(this);
        result.prefix_ = prefix_;
        result.length_ = length_;
        onBuilt();
        return result;
      }

      @java.lang.Override
      public Builder clone() {
        return super.clone();
      }
      @java.lang.Override
      public Builder setField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          java.lang.Object value) {
        return super.setField(field, value);
      }
      @java.lang.Override
      public Builder clearField(
          com.google.protobuf.Descriptors.FieldDescriptor field) {
        return super.clearField(field);
      }
      @java.lang.Override
      public Builder clearOneof(
          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
        return super.clearOneof(oneof);
      }
      @java.lang.Override
      public Builder setRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          int index, java.lang.Object value) {
        return super.setRepeatedField(field, index, value);
      }
      @java.lang.Override
      public Builder addRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          java.lang.Object value) {
        return super.addRepeatedField(field, value);
      }
      @java.lang.Override
      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof com.spotify.login5v3.Hashcash.HashcashChallenge) {
          return mergeFrom((com.spotify.login5v3.Hashcash.HashcashChallenge)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(com.spotify.login5v3.Hashcash.HashcashChallenge other) {
        if (other == com.spotify.login5v3.Hashcash.HashcashChallenge.getDefaultInstance()) return this;
        if (other.getPrefix() != com.google.protobuf.ByteString.EMPTY) {
          setPrefix(other.getPrefix());
        }
        if (other.getLength() != 0) {
          setLength(other.getLength());
        }
        this.mergeUnknownFields(other.unknownFields);
        onChanged();
        return this;
      }

      @java.lang.Override
      public final boolean isInitialized() {
        return true;
      }

      @java.lang.Override
      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        com.spotify.login5v3.Hashcash.HashcashChallenge parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (com.spotify.login5v3.Hashcash.HashcashChallenge) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }

      private com.google.protobuf.ByteString prefix_ = com.google.protobuf.ByteString.EMPTY;
      /**
       * <code>bytes prefix = 1;</code>
       * @return The prefix.
       */
      public com.google.protobuf.ByteString getPrefix() {
        return prefix_;
      }
      /**
       * <code>bytes prefix = 1;</code>
       * @param value The prefix to set.
       * @return This builder for chaining.
       */
      public Builder setPrefix(com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  
        prefix_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>bytes prefix = 1;</code>
       * @return This builder for chaining.
       */
      public Builder clearPrefix() {
        
        prefix_ = getDefaultInstance().getPrefix();
        onChanged();
        return this;
      }

      private int length_ ;
      /**
       * <code>int32 length = 2;</code>
       * @return The length.
       */
      public int getLength() {
        return length_;
      }
      /**
       * <code>int32 length = 2;</code>
       * @param value The length to set.
       * @return This builder for chaining.
       */
      public Builder setLength(int value) {
        
        length_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>int32 length = 2;</code>
       * @return This builder for chaining.
       */
      public Builder clearLength() {
        
        length_ = 0;
        onChanged();
        return this;
      }
      @java.lang.Override
      public final Builder setUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return super.setUnknownFields(unknownFields);
      }

      @java.lang.Override
      public final Builder mergeUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return super.mergeUnknownFields(unknownFields);
      }


      // @@protoc_insertion_point(builder_scope:spotify.login5.v3.challenges.HashcashChallenge)
    }

    // @@protoc_insertion_point(class_scope:spotify.login5.v3.challenges.HashcashChallenge)
    private static final com.spotify.login5v3.Hashcash.HashcashChallenge DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new com.spotify.login5v3.Hashcash.HashcashChallenge();
    }

    public static com.spotify.login5v3.Hashcash.HashcashChallenge getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    private static final com.google.protobuf.Parser<HashcashChallenge>
        PARSER = new com.google.protobuf.AbstractParser<HashcashChallenge>() {
      @java.lang.Override
      public HashcashChallenge parsePartialFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return new HashcashChallenge(input, extensionRegistry);
      }
    };

    public static com.google.protobuf.Parser<HashcashChallenge> parser() {
      return PARSER;
    }

    @java.lang.Override
    public com.google.protobuf.Parser<HashcashChallenge> getParserForType() {
      return PARSER;
    }

    @java.lang.Override
    public com.spotify.login5v3.Hashcash.HashcashChallenge getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  public interface HashcashSolutionOrBuilder extends
      // @@protoc_insertion_point(interface_extends:spotify.login5.v3.challenges.HashcashSolution)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <code>bytes suffix = 1;</code>
     * @return The suffix.
     */
    com.google.protobuf.ByteString getSuffix();

    /**
     * <code>.google.protobuf.Duration duration = 2;</code>
     * @return Whether the duration field is set.
     */
    boolean hasDuration();
    /**
     * <code>.google.protobuf.Duration duration = 2;</code>
     * @return The duration.
     */
    com.google.protobuf.Duration getDuration();
    /**
     * <code>.google.protobuf.Duration duration = 2;</code>
     */
    com.google.protobuf.DurationOrBuilder getDurationOrBuilder();
  }
  /**
   * Protobuf type {@code spotify.login5.v3.challenges.HashcashSolution}
   */
  public  static final class HashcashSolution extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:spotify.login5.v3.challenges.HashcashSolution)
      HashcashSolutionOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use HashcashSolution.newBuilder() to construct.
    private HashcashSolution(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private HashcashSolution() {
      suffix_ = com.google.protobuf.ByteString.EMPTY;
    }

    @java.lang.Override
    @SuppressWarnings({"unused"})
    protected java.lang.Object newInstance(
        UnusedPrivateParameter unused) {
      return new HashcashSolution();
    }

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return this.unknownFields;
    }
    private HashcashSolution(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      this();
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      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;
            case 10: {

              suffix_ = input.readBytes();
              break;
            }
            case 18: {
              com.google.protobuf.Duration.Builder subBuilder = null;
              if (duration_ != null) {
                subBuilder = duration_.toBuilder();
              }
              duration_ = input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom(duration_);
                duration_ = subBuilder.buildPartial();
              }

              break;
            }
            default: {
              if (!parseUnknownField(
                  input, unknownFields, extensionRegistry, tag)) {
                done = true;
              }
              break;
            }
          }
        }
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(this);
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(
            e).setUnfinishedMessage(this);
      } finally {
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.spotify.login5v3.Hashcash.internal_static_spotify_login5_v3_challenges_HashcashSolution_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.spotify.login5v3.Hashcash.internal_static_spotify_login5_v3_challenges_HashcashSolution_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.spotify.login5v3.Hashcash.HashcashSolution.class, com.spotify.login5v3.Hashcash.HashcashSolution.Builder.class);
    }

    public static final int SUFFIX_FIELD_NUMBER = 1;
    private com.google.protobuf.ByteString suffix_;
    /**
     * <code>bytes suffix = 1;</code>
     * @return The suffix.
     */
    public com.google.protobuf.ByteString getSuffix() {
      return suffix_;
    }

    public static final int DURATION_FIELD_NUMBER = 2;
    private com.google.protobuf.Duration duration_;
    /**
     * <code>.google.protobuf.Duration duration = 2;</code>
     * @return Whether the duration field is set.
     */
    public boolean hasDuration() {
      return duration_ != null;
    }
    /**
     * <code>.google.protobuf.Duration duration = 2;</code>
     * @return The duration.
     */
    public com.google.protobuf.Duration getDuration() {
      return duration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : duration_;
    }
    /**
     * <code>.google.protobuf.Duration duration = 2;</code>
     */
    public com.google.protobuf.DurationOrBuilder getDurationOrBuilder() {
      return getDuration();
    }

    private byte memoizedIsInitialized = -1;
    @java.lang.Override
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized == 1) return true;
      if (isInitialized == 0) return false;

      memoizedIsInitialized = 1;
      return true;
    }

    @java.lang.Override
    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      if (!suffix_.isEmpty()) {
        output.writeBytes(1, suffix_);
      }
      if (duration_ != null) {
        output.writeMessage(2, getDuration());
      }
      unknownFields.writeTo(output);
    }

    @java.lang.Override
    public int getSerializedSize() {
      int size = memoizedSize;
      if (size != -1) return size;

      size = 0;
      if (!suffix_.isEmpty()) {
        size += com.google.protobuf.CodedOutputStream
          .computeBytesSize(1, suffix_);
      }
      if (duration_ != null) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(2, getDuration());
      }
      size += unknownFields.getSerializedSize();
      memoizedSize = size;
      return size;
    }

    @java.lang.Override
    public boolean equals(final java.lang.Object obj) {
      if (obj == this) {
       return true;
      }
      if (!(obj instanceof com.spotify.login5v3.Hashcash.HashcashSolution)) {
        return super.equals(obj);
      }
      com.spotify.login5v3.Hashcash.HashcashSolution other = (com.spotify.login5v3.Hashcash.HashcashSolution) obj;

      if (!getSuffix()
          .equals(other.getSuffix())) return false;
      if (hasDuration() != other.hasDuration()) return false;
      if (hasDuration()) {
        if (!getDuration()
            .equals(other.getDuration())) return false;
      }
      if (!unknownFields.equals(other.unknownFields)) return false;
      return true;
    }

    @java.lang.Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptor().hashCode();
      hash = (37 * hash) + SUFFIX_FIELD_NUMBER;
      hash = (53 * hash) + getSuffix().hashCode();
      if (hasDuration()) {
        hash = (37 * hash) + DURATION_FIELD_NUMBER;
        hash = (53 * hash) + getDuration().hashCode();
      }
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static com.spotify.login5v3.Hashcash.HashcashSolution parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.spotify.login5v3.Hashcash.HashcashSolution parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static com.spotify.login5v3.Hashcash.HashcashSolution parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.spotify.login5v3.Hashcash.HashcashSolution parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static com.spotify.login5v3.Hashcash.HashcashSolution parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.spotify.login5v3.Hashcash.HashcashSolution parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static com.spotify.login5v3.Hashcash.HashcashSolution parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static com.spotify.login5v3.Hashcash.HashcashSolution parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input, extensionRegistry);
    }
    public static com.spotify.login5v3.Hashcash.HashcashSolution parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static com.spotify.login5v3.Hashcash.HashcashSolution parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
    }
    public static com.spotify.login5v3.Hashcash.HashcashSolution parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static com.spotify.login5v3.Hashcash.HashcashSolution parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input, extensionRegistry);
    }

    @java.lang.Override
    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder() {
      return DEFAULT_INSTANCE.toBuilder();
    }
    public static Builder newBuilder(com.spotify.login5v3.Hashcash.HashcashSolution prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }
    @java.lang.Override
    public Builder toBuilder() {
      return this == DEFAULT_INSTANCE
          ? new Builder() : new Builder().mergeFrom(this);
    }

    @java.lang.Override
    protected Builder newBuilderForType(
        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      Builder builder = new Builder(parent);
      return builder;
    }
    /**
     * Protobuf type {@code spotify.login5.v3.challenges.HashcashSolution}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:spotify.login5.v3.challenges.HashcashSolution)
        com.spotify.login5v3.Hashcash.HashcashSolutionOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return com.spotify.login5v3.Hashcash.internal_static_spotify_login5_v3_challenges_HashcashSolution_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return com.spotify.login5v3.Hashcash.internal_static_spotify_login5_v3_challenges_HashcashSolution_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                com.spotify.login5v3.Hashcash.HashcashSolution.class, com.spotify.login5v3.Hashcash.HashcashSolution.Builder.class);
      }

      // Construct using com.spotify.login5v3.Hashcash.HashcashSolution.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessageV3
                .alwaysUseFieldBuilders) {
        }
      }
      @java.lang.Override
      public Builder clear() {
        super.clear();
        suffix_ = com.google.protobuf.ByteString.EMPTY;

        if (durationBuilder_ == null) {
          duration_ = null;
        } else {
          duration_ = null;
          durationBuilder_ = null;
        }
        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return com.spotify.login5v3.Hashcash.internal_static_spotify_login5_v3_challenges_HashcashSolution_descriptor;
      }

      @java.lang.Override
      public com.spotify.login5v3.Hashcash.HashcashSolution getDefaultInstanceForType() {
        return com.spotify.login5v3.Hashcash.HashcashSolution.getDefaultInstance();
      }

      @java.lang.Override
      public com.spotify.login5v3.Hashcash.HashcashSolution build() {
        com.spotify.login5v3.Hashcash.HashcashSolution result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public com.spotify.login5v3.Hashcash.HashcashSolution buildPartial() {
        com.spotify.login5v3.Hashcash.HashcashSolution result = new com.spotify.login5v3.Hashcash.HashcashSolution(this);
        result.suffix_ = suffix_;
        if (durationBuilder_ == null) {
          result.duration_ = duration_;
        } else {
          result.duration_ = durationBuilder_.build();
        }
        onBuilt();
        return result;
      }

      @java.lang.Override
      public Builder clone() {
        return super.clone();
      }
      @java.lang.Override
      public Builder setField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          java.lang.Object value) {
        return super.setField(field, value);
      }
      @java.lang.Override
      public Builder clearField(
          com.google.protobuf.Descriptors.FieldDescriptor field) {
        return super.clearField(field);
      }
      @java.lang.Override
      public Builder clearOneof(
          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
        return super.clearOneof(oneof);
      }
      @java.lang.Override
      public Builder setRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          int index, java.lang.Object value) {
        return super.setRepeatedField(field, index, value);
      }
      @java.lang.Override
      public Builder addRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          java.lang.Object value) {
        return super.addRepeatedField(field, value);
      }
      @java.lang.Override
      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof com.spotify.login5v3.Hashcash.HashcashSolution) {
          return mergeFrom((com.spotify.login5v3.Hashcash.HashcashSolution)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(com.spotify.login5v3.Hashcash.HashcashSolution other) {
        if (other == com.spotify.login5v3.Hashcash.HashcashSolution.getDefaultInstance()) return this;
        if (other.getSuffix() != com.google.protobuf.ByteString.EMPTY) {
          setSuffix(other.getSuffix());
        }
        if (other.hasDuration()) {
          mergeDuration(other.getDuration());
        }
        this.mergeUnknownFields(other.unknownFields);
        onChanged();
        return this;
      }

      @java.lang.Override
      public final boolean isInitialized() {
        return true;
      }

      @java.lang.Override
      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        com.spotify.login5v3.Hashcash.HashcashSolution parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (com.spotify.login5v3.Hashcash.HashcashSolution) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }

      private com.google.protobuf.ByteString suffix_ = com.google.protobuf.ByteString.EMPTY;
      /**
       * <code>bytes suffix = 1;</code>
       * @return The suffix.
       */
      public com.google.protobuf.ByteString getSuffix() {
        return suffix_;
      }
      /**
       * <code>bytes suffix = 1;</code>
       * @param value The suffix to set.
       * @return This builder for chaining.
       */
      public Builder setSuffix(com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  
        suffix_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>bytes suffix = 1;</code>
       * @return This builder for chaining.
       */
      public Builder clearSuffix() {
        
        suffix_ = getDefaultInstance().getSuffix();
        onChanged();
        return this;
      }

      private com.google.protobuf.Duration duration_;
      private com.google.protobuf.SingleFieldBuilderV3<
          com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> durationBuilder_;
      /**
       * <code>.google.protobuf.Duration duration = 2;</code>
       * @return Whether the duration field is set.
       */
      public boolean hasDuration() {
        return durationBuilder_ != null || duration_ != null;
      }
      /**
       * <code>.google.protobuf.Duration duration = 2;</code>
       * @return The duration.
       */
      public com.google.protobuf.Duration getDuration() {
        if (durationBuilder_ == null) {
          return duration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : duration_;
        } else {
          return durationBuilder_.getMessage();
        }
      }
      /**
       * <code>.google.protobuf.Duration duration = 2;</code>
       */
      public Builder setDuration(com.google.protobuf.Duration value) {
        if (durationBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          duration_ = value;
          onChanged();
        } else {
          durationBuilder_.setMessage(value);
        }

        return this;
      }
      /**
       * <code>.google.protobuf.Duration duration = 2;</code>
       */
      public Builder setDuration(
          com.google.protobuf.Duration.Builder builderForValue) {
        if (durationBuilder_ == null) {
          duration_ = builderForValue.build();
          onChanged();
        } else {
          durationBuilder_.setMessage(builderForValue.build());
        }

        return this;
      }
      /**
       * <code>.google.protobuf.Duration duration = 2;</code>
       */
      public Builder mergeDuration(com.google.protobuf.Duration value) {
        if (durationBuilder_ == null) {
          if (duration_ != null) {
            duration_ =
              com.google.protobuf.Duration.newBuilder(duration_).mergeFrom(value).buildPartial();
          } else {
            duration_ = value;
          }
          onChanged();
        } else {
          durationBuilder_.mergeFrom(value);
        }

        return this;
      }
      /**
       * <code>.google.protobuf.Duration duration = 2;</code>
       */
      public Builder clearDuration() {
        if (durationBuilder_ == null) {
          duration_ = null;
          onChanged();
        } else {
          duration_ = null;
          durationBuilder_ = null;
        }

        return this;
      }
      /**
       * <code>.google.protobuf.Duration duration = 2;</code>
       */
      public com.google.protobuf.Duration.Builder getDurationBuilder() {
        
        onChanged();
        return getDurationFieldBuilder().getBuilder();
      }
      /**
       * <code>.google.protobuf.Duration duration = 2;</code>
       */
      public com.google.protobuf.DurationOrBuilder getDurationOrBuilder() {
        if (durationBuilder_ != null) {
          return durationBuilder_.getMessageOrBuilder();
        } else {
          return duration_ == null ?
              com.google.protobuf.Duration.getDefaultInstance() : duration_;
        }
      }
      /**
       * <code>.google.protobuf.Duration duration = 2;</code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
          com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> 
          getDurationFieldBuilder() {
        if (durationBuilder_ == null) {
          durationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
              com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>(
                  getDuration(),
                  getParentForChildren(),
                  isClean());
          duration_ = null;
        }
        return durationBuilder_;
      }
      @java.lang.Override
      public final Builder setUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return super.setUnknownFields(unknownFields);
      }

      @java.lang.Override
      public final Builder mergeUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return super.mergeUnknownFields(unknownFields);
      }


      // @@protoc_insertion_point(builder_scope:spotify.login5.v3.challenges.HashcashSolution)
    }

    // @@protoc_insertion_point(class_scope:spotify.login5.v3.challenges.HashcashSolution)
    private static final com.spotify.login5v3.Hashcash.HashcashSolution DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new com.spotify.login5v3.Hashcash.HashcashSolution();
    }

    public static com.spotify.login5v3.Hashcash.HashcashSolution getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    private static final com.google.protobuf.Parser<HashcashSolution>
        PARSER = new com.google.protobuf.AbstractParser<HashcashSolution>() {
      @java.lang.Override
      public HashcashSolution parsePartialFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return new HashcashSolution(input, extensionRegistry);
      }
    };

    public static com.google.protobuf.Parser<HashcashSolution> parser() {
      return PARSER;
    }

    @java.lang.Override
    public com.google.protobuf.Parser<HashcashSolution> getParserForType() {
      return PARSER;
    }

    @java.lang.Override
    public com.spotify.login5v3.Hashcash.HashcashSolution getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_spotify_login5_v3_challenges_HashcashChallenge_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_spotify_login5_v3_challenges_HashcashChallenge_fieldAccessorTable;
  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_spotify_login5_v3_challenges_HashcashSolution_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_spotify_login5_v3_challenges_HashcashSolution_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+spotify/login5/v3/challenges/hashcash." +
      "proto\022\034spotify.login5.v3.challenges\032\036goo" +
      "gle/protobuf/duration.proto\"3\n\021HashcashC" +
      "hallenge\022\016\n\006prefix\030\001 \001(\014\022\016\n\006length\030\002 \001(\005" +
      "\"O\n\020HashcashSolution\022\016\n\006suffix\030\001 \001(\014\022+\n\010" +
      "duration\030\002 \001(\0132\031.google.protobuf.Duratio" +
      "nB\026\n\024com.spotify.login5v3b\006proto3"
    };
    descriptor = com.google.protobuf.Descriptors.FileDescriptor
      .internalBuildGeneratedFileFrom(descriptorData,
        new com.google.protobuf.Descriptors.FileDescriptor[] {
          com.google.protobuf.DurationProto.getDescriptor(),
        });
    internal_static_spotify_login5_v3_challenges_HashcashChallenge_descriptor =
      getDescriptor().getMessageTypes().get(0);
    internal_static_spotify_login5_v3_challenges_HashcashChallenge_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_spotify_login5_v3_challenges_HashcashChallenge_descriptor,
        new java.lang.String[] { "Prefix", "Length", });
    internal_static_spotify_login5_v3_challenges_HashcashSolution_descriptor =
      getDescriptor().getMessageTypes().get(1);
    internal_static_spotify_login5_v3_challenges_HashcashSolution_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_spotify_login5_v3_challenges_HashcashSolution_descriptor,
        new java.lang.String[] { "Suffix", "Duration", });
    com.google.protobuf.DurationProto.getDescriptor();
  }

  // @@protoc_insertion_point(outer_class_scope)
}
