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

package Proxy;

/**
 * Protobuf type {@code SearchResponse}
 */
public final class SearchResponse extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:SearchResponse)
    SearchResponseOrBuilder {
private static final long serialVersionUID = 0L;
  // Use SearchResponse.newBuilder() to construct.
  private SearchResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private SearchResponse() {
  }

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

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return this.unknownFields;
  }
  private SearchResponse(
      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: {
            Proxy.SearchResult.Builder subBuilder = null;
            if (searchResult_ != null) {
              subBuilder = searchResult_.toBuilder();
            }
            searchResult_ = input.readMessage(Proxy.SearchResult.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(searchResult_);
              searchResult_ = 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 Proxy.Search.internal_static_SearchResponse_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return Proxy.Search.internal_static_SearchResponse_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            Proxy.SearchResponse.class, Proxy.SearchResponse.Builder.class);
  }

  public static final int SEARCHRESULT_FIELD_NUMBER = 1;
  private Proxy.SearchResult searchResult_;
  /**
   * <code>.SearchResult searchResult = 1;</code>
   * @return Whether the searchResult field is set.
   */
  @java.lang.Override
  public boolean hasSearchResult() {
    return searchResult_ != null;
  }
  /**
   * <code>.SearchResult searchResult = 1;</code>
   * @return The searchResult.
   */
  @java.lang.Override
  public Proxy.SearchResult getSearchResult() {
    return searchResult_ == null ? Proxy.SearchResult.getDefaultInstance() : searchResult_;
  }
  /**
   * <code>.SearchResult searchResult = 1;</code>
   */
  @java.lang.Override
  public Proxy.SearchResultOrBuilder getSearchResultOrBuilder() {
    return getSearchResult();
  }

  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 (searchResult_ != null) {
      output.writeMessage(1, getSearchResult());
    }
    unknownFields.writeTo(output);
  }

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

    size = 0;
    if (searchResult_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(1, getSearchResult());
    }
    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 Proxy.SearchResponse)) {
      return super.equals(obj);
    }
    Proxy.SearchResponse other = (Proxy.SearchResponse) obj;

    if (hasSearchResult() != other.hasSearchResult()) return false;
    if (hasSearchResult()) {
      if (!getSearchResult()
          .equals(other.getSearchResult())) 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();
    if (hasSearchResult()) {
      hash = (37 * hash) + SEARCHRESULT_FIELD_NUMBER;
      hash = (53 * hash) + getSearchResult().hashCode();
    }
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static Proxy.SearchResponse parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static Proxy.SearchResponse parseFrom(
      java.nio.ByteBuffer data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static Proxy.SearchResponse parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static Proxy.SearchResponse parseFrom(
      com.google.protobuf.ByteString data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static Proxy.SearchResponse parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static Proxy.SearchResponse parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static Proxy.SearchResponse parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static Proxy.SearchResponse 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 Proxy.SearchResponse parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }
  public static Proxy.SearchResponse 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 Proxy.SearchResponse parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static Proxy.SearchResponse 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(Proxy.SearchResponse 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 SearchResponse}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:SearchResponse)
      Proxy.SearchResponseOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return Proxy.Search.internal_static_SearchResponse_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return Proxy.Search.internal_static_SearchResponse_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              Proxy.SearchResponse.class, Proxy.SearchResponse.Builder.class);
    }

    // Construct using Proxy.SearchResponse.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();
      if (searchResultBuilder_ == null) {
        searchResult_ = null;
      } else {
        searchResult_ = null;
        searchResultBuilder_ = null;
      }
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return Proxy.Search.internal_static_SearchResponse_descriptor;
    }

    @java.lang.Override
    public Proxy.SearchResponse getDefaultInstanceForType() {
      return Proxy.SearchResponse.getDefaultInstance();
    }

    @java.lang.Override
    public Proxy.SearchResponse build() {
      Proxy.SearchResponse result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public Proxy.SearchResponse buildPartial() {
      Proxy.SearchResponse result = new Proxy.SearchResponse(this);
      if (searchResultBuilder_ == null) {
        result.searchResult_ = searchResult_;
      } else {
        result.searchResult_ = searchResultBuilder_.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 Proxy.SearchResponse) {
        return mergeFrom((Proxy.SearchResponse)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(Proxy.SearchResponse other) {
      if (other == Proxy.SearchResponse.getDefaultInstance()) return this;
      if (other.hasSearchResult()) {
        mergeSearchResult(other.getSearchResult());
      }
      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 {
      Proxy.SearchResponse parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (Proxy.SearchResponse) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }

    private Proxy.SearchResult searchResult_;
    private com.google.protobuf.SingleFieldBuilderV3<
        Proxy.SearchResult, Proxy.SearchResult.Builder, Proxy.SearchResultOrBuilder> searchResultBuilder_;
    /**
     * <code>.SearchResult searchResult = 1;</code>
     * @return Whether the searchResult field is set.
     */
    public boolean hasSearchResult() {
      return searchResultBuilder_ != null || searchResult_ != null;
    }
    /**
     * <code>.SearchResult searchResult = 1;</code>
     * @return The searchResult.
     */
    public Proxy.SearchResult getSearchResult() {
      if (searchResultBuilder_ == null) {
        return searchResult_ == null ? Proxy.SearchResult.getDefaultInstance() : searchResult_;
      } else {
        return searchResultBuilder_.getMessage();
      }
    }
    /**
     * <code>.SearchResult searchResult = 1;</code>
     */
    public Builder setSearchResult(Proxy.SearchResult value) {
      if (searchResultBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        searchResult_ = value;
        onChanged();
      } else {
        searchResultBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * <code>.SearchResult searchResult = 1;</code>
     */
    public Builder setSearchResult(
        Proxy.SearchResult.Builder builderForValue) {
      if (searchResultBuilder_ == null) {
        searchResult_ = builderForValue.build();
        onChanged();
      } else {
        searchResultBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * <code>.SearchResult searchResult = 1;</code>
     */
    public Builder mergeSearchResult(Proxy.SearchResult value) {
      if (searchResultBuilder_ == null) {
        if (searchResult_ != null) {
          searchResult_ =
            Proxy.SearchResult.newBuilder(searchResult_).mergeFrom(value).buildPartial();
        } else {
          searchResult_ = value;
        }
        onChanged();
      } else {
        searchResultBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * <code>.SearchResult searchResult = 1;</code>
     */
    public Builder clearSearchResult() {
      if (searchResultBuilder_ == null) {
        searchResult_ = null;
        onChanged();
      } else {
        searchResult_ = null;
        searchResultBuilder_ = null;
      }

      return this;
    }
    /**
     * <code>.SearchResult searchResult = 1;</code>
     */
    public Proxy.SearchResult.Builder getSearchResultBuilder() {
      
      onChanged();
      return getSearchResultFieldBuilder().getBuilder();
    }
    /**
     * <code>.SearchResult searchResult = 1;</code>
     */
    public Proxy.SearchResultOrBuilder getSearchResultOrBuilder() {
      if (searchResultBuilder_ != null) {
        return searchResultBuilder_.getMessageOrBuilder();
      } else {
        return searchResult_ == null ?
            Proxy.SearchResult.getDefaultInstance() : searchResult_;
      }
    }
    /**
     * <code>.SearchResult searchResult = 1;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        Proxy.SearchResult, Proxy.SearchResult.Builder, Proxy.SearchResultOrBuilder> 
        getSearchResultFieldBuilder() {
      if (searchResultBuilder_ == null) {
        searchResultBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            Proxy.SearchResult, Proxy.SearchResult.Builder, Proxy.SearchResultOrBuilder>(
                getSearchResult(),
                getParentForChildren(),
                isClean());
        searchResult_ = null;
      }
      return searchResultBuilder_;
    }
    @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:SearchResponse)
  }

  // @@protoc_insertion_point(class_scope:SearchResponse)
  private static final Proxy.SearchResponse DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new Proxy.SearchResponse();
  }

  public static Proxy.SearchResponse getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

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

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

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

  @java.lang.Override
  public Proxy.SearchResponse getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}

