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

com.google.maps.places.v1.SearchTextRequest Maven / Gradle / Ivy

There is a newer version: 0.22.0
Show newest version
/*
 * Copyright 2023 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/maps/places/v1/places_service.proto

package com.google.maps.places.v1;

/**
 *
 *
 * 
 * Request proto for SearchText.
 * 
* * Protobuf type {@code google.maps.places.v1.SearchTextRequest} */ public final class SearchTextRequest extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.maps.places.v1.SearchTextRequest) SearchTextRequestOrBuilder { private static final long serialVersionUID = 0L; // Use SearchTextRequest.newBuilder() to construct. private SearchTextRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private SearchTextRequest() { textQuery_ = ""; languageCode_ = ""; regionCode_ = ""; rankPreference_ = 0; includedType_ = ""; priceLevels_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new SearchTextRequest(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.maps.places.v1.PlacesServiceProto .internal_static_google_maps_places_v1_SearchTextRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.maps.places.v1.PlacesServiceProto .internal_static_google_maps_places_v1_SearchTextRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.maps.places.v1.SearchTextRequest.class, com.google.maps.places.v1.SearchTextRequest.Builder.class); } /** * * *
   * How results will be ranked in the response.
   * 
* * Protobuf enum {@code google.maps.places.v1.SearchTextRequest.RankPreference} */ public enum RankPreference implements com.google.protobuf.ProtocolMessageEnum { /** * * *
     * RankPreference value not set. Will default to DISTANCE.
     * 
* * RANK_PREFERENCE_UNSPECIFIED = 0; */ RANK_PREFERENCE_UNSPECIFIED(0), /** * * *
     * Ranks results by distance.
     * 
* * DISTANCE = 1; */ DISTANCE(1), /** * * *
     * Ranks results by relevance. Sort order determined by normal ranking
     * stack. See SortRefinement::RELEVANCE.
     * 
* * RELEVANCE = 2; */ RELEVANCE(2), UNRECOGNIZED(-1), ; /** * * *
     * RankPreference value not set. Will default to DISTANCE.
     * 
* * RANK_PREFERENCE_UNSPECIFIED = 0; */ public static final int RANK_PREFERENCE_UNSPECIFIED_VALUE = 0; /** * * *
     * Ranks results by distance.
     * 
* * DISTANCE = 1; */ public static final int DISTANCE_VALUE = 1; /** * * *
     * Ranks results by relevance. Sort order determined by normal ranking
     * stack. See SortRefinement::RELEVANCE.
     * 
* * RELEVANCE = 2; */ public static final int RELEVANCE_VALUE = 2; public final int getNumber() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalArgumentException( "Can't get the number of an unknown enum value."); } return value; } /** * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static RankPreference valueOf(int value) { return forNumber(value); } /** * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. */ public static RankPreference forNumber(int value) { switch (value) { case 0: return RANK_PREFERENCE_UNSPECIFIED; case 1: return DISTANCE; case 2: return RELEVANCE; default: return null; } } public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; } private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { public RankPreference findValueByNumber(int number) { return RankPreference.forNumber(number); } }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalStateException( "Can't get the descriptor of an unrecognized enum value."); } return getDescriptor().getValues().get(ordinal()); } public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { return getDescriptor(); } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.google.maps.places.v1.SearchTextRequest.getDescriptor().getEnumTypes().get(0); } private static final RankPreference[] VALUES = values(); public static RankPreference valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); } if (desc.getIndex() == -1) { return UNRECOGNIZED; } return VALUES[desc.getIndex()]; } private final int value; private RankPreference(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:google.maps.places.v1.SearchTextRequest.RankPreference) } public interface LocationBiasOrBuilder extends // @@protoc_insertion_point(interface_extends:google.maps.places.v1.SearchTextRequest.LocationBias) com.google.protobuf.MessageOrBuilder { /** * * *
     * A rectangle box defined by northeast and southwest corner.
     * 
* * .google.geo.type.Viewport rectangle = 1; * * @return Whether the rectangle field is set. */ boolean hasRectangle(); /** * * *
     * A rectangle box defined by northeast and southwest corner.
     * 
* * .google.geo.type.Viewport rectangle = 1; * * @return The rectangle. */ com.google.geo.type.Viewport getRectangle(); /** * * *
     * A rectangle box defined by northeast and southwest corner.
     * 
* * .google.geo.type.Viewport rectangle = 1; */ com.google.geo.type.ViewportOrBuilder getRectangleOrBuilder(); /** * * *
     * A circle defined by center point and radius.
     * 
* * .google.maps.places.v1.Circle circle = 2; * * @return Whether the circle field is set. */ boolean hasCircle(); /** * * *
     * A circle defined by center point and radius.
     * 
* * .google.maps.places.v1.Circle circle = 2; * * @return The circle. */ com.google.maps.places.v1.Circle getCircle(); /** * * *
     * A circle defined by center point and radius.
     * 
* * .google.maps.places.v1.Circle circle = 2; */ com.google.maps.places.v1.CircleOrBuilder getCircleOrBuilder(); com.google.maps.places.v1.SearchTextRequest.LocationBias.TypeCase getTypeCase(); } /** * * *
   * The region to search. This location serves as a bias which means results
   * around given location might be returned.
   * 
* * Protobuf type {@code google.maps.places.v1.SearchTextRequest.LocationBias} */ public static final class LocationBias extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.maps.places.v1.SearchTextRequest.LocationBias) LocationBiasOrBuilder { private static final long serialVersionUID = 0L; // Use LocationBias.newBuilder() to construct. private LocationBias(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private LocationBias() {} @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new LocationBias(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.maps.places.v1.PlacesServiceProto .internal_static_google_maps_places_v1_SearchTextRequest_LocationBias_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.maps.places.v1.PlacesServiceProto .internal_static_google_maps_places_v1_SearchTextRequest_LocationBias_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.maps.places.v1.SearchTextRequest.LocationBias.class, com.google.maps.places.v1.SearchTextRequest.LocationBias.Builder.class); } private int typeCase_ = 0; @SuppressWarnings("serial") private java.lang.Object type_; public enum TypeCase implements com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { RECTANGLE(1), CIRCLE(2), TYPE_NOT_SET(0); private final int value; private TypeCase(int value) { this.value = value; } /** * @param value The number of the enum to look for. * @return The enum associated with the given number. * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static TypeCase valueOf(int value) { return forNumber(value); } public static TypeCase forNumber(int value) { switch (value) { case 1: return RECTANGLE; case 2: return CIRCLE; case 0: return TYPE_NOT_SET; default: return null; } } public int getNumber() { return this.value; } }; public TypeCase getTypeCase() { return TypeCase.forNumber(typeCase_); } public static final int RECTANGLE_FIELD_NUMBER = 1; /** * * *
     * A rectangle box defined by northeast and southwest corner.
     * 
* * .google.geo.type.Viewport rectangle = 1; * * @return Whether the rectangle field is set. */ @java.lang.Override public boolean hasRectangle() { return typeCase_ == 1; } /** * * *
     * A rectangle box defined by northeast and southwest corner.
     * 
* * .google.geo.type.Viewport rectangle = 1; * * @return The rectangle. */ @java.lang.Override public com.google.geo.type.Viewport getRectangle() { if (typeCase_ == 1) { return (com.google.geo.type.Viewport) type_; } return com.google.geo.type.Viewport.getDefaultInstance(); } /** * * *
     * A rectangle box defined by northeast and southwest corner.
     * 
* * .google.geo.type.Viewport rectangle = 1; */ @java.lang.Override public com.google.geo.type.ViewportOrBuilder getRectangleOrBuilder() { if (typeCase_ == 1) { return (com.google.geo.type.Viewport) type_; } return com.google.geo.type.Viewport.getDefaultInstance(); } public static final int CIRCLE_FIELD_NUMBER = 2; /** * * *
     * A circle defined by center point and radius.
     * 
* * .google.maps.places.v1.Circle circle = 2; * * @return Whether the circle field is set. */ @java.lang.Override public boolean hasCircle() { return typeCase_ == 2; } /** * * *
     * A circle defined by center point and radius.
     * 
* * .google.maps.places.v1.Circle circle = 2; * * @return The circle. */ @java.lang.Override public com.google.maps.places.v1.Circle getCircle() { if (typeCase_ == 2) { return (com.google.maps.places.v1.Circle) type_; } return com.google.maps.places.v1.Circle.getDefaultInstance(); } /** * * *
     * A circle defined by center point and radius.
     * 
* * .google.maps.places.v1.Circle circle = 2; */ @java.lang.Override public com.google.maps.places.v1.CircleOrBuilder getCircleOrBuilder() { if (typeCase_ == 2) { return (com.google.maps.places.v1.Circle) type_; } return com.google.maps.places.v1.Circle.getDefaultInstance(); } 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 (typeCase_ == 1) { output.writeMessage(1, (com.google.geo.type.Viewport) type_); } if (typeCase_ == 2) { output.writeMessage(2, (com.google.maps.places.v1.Circle) type_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (typeCase_ == 1) { size += com.google.protobuf.CodedOutputStream.computeMessageSize( 1, (com.google.geo.type.Viewport) type_); } if (typeCase_ == 2) { size += com.google.protobuf.CodedOutputStream.computeMessageSize( 2, (com.google.maps.places.v1.Circle) type_); } size += getUnknownFields().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.google.maps.places.v1.SearchTextRequest.LocationBias)) { return super.equals(obj); } com.google.maps.places.v1.SearchTextRequest.LocationBias other = (com.google.maps.places.v1.SearchTextRequest.LocationBias) obj; if (!getTypeCase().equals(other.getTypeCase())) return false; switch (typeCase_) { case 1: if (!getRectangle().equals(other.getRectangle())) return false; break; case 2: if (!getCircle().equals(other.getCircle())) return false; break; case 0: default: } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); switch (typeCase_) { case 1: hash = (37 * hash) + RECTANGLE_FIELD_NUMBER; hash = (53 * hash) + getRectangle().hashCode(); break; case 2: hash = (37 * hash) + CIRCLE_FIELD_NUMBER; hash = (53 * hash) + getCircle().hashCode(); break; case 0: default: } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.maps.places.v1.SearchTextRequest.LocationBias parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.maps.places.v1.SearchTextRequest.LocationBias parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.maps.places.v1.SearchTextRequest.LocationBias parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.maps.places.v1.SearchTextRequest.LocationBias parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.maps.places.v1.SearchTextRequest.LocationBias parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.maps.places.v1.SearchTextRequest.LocationBias parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.maps.places.v1.SearchTextRequest.LocationBias parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.maps.places.v1.SearchTextRequest.LocationBias 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.google.maps.places.v1.SearchTextRequest.LocationBias parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.maps.places.v1.SearchTextRequest.LocationBias 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.google.maps.places.v1.SearchTextRequest.LocationBias parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.maps.places.v1.SearchTextRequest.LocationBias 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.google.maps.places.v1.SearchTextRequest.LocationBias 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; } /** * * *
     * The region to search. This location serves as a bias which means results
     * around given location might be returned.
     * 
* * Protobuf type {@code google.maps.places.v1.SearchTextRequest.LocationBias} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.maps.places.v1.SearchTextRequest.LocationBias) com.google.maps.places.v1.SearchTextRequest.LocationBiasOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.maps.places.v1.PlacesServiceProto .internal_static_google_maps_places_v1_SearchTextRequest_LocationBias_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.maps.places.v1.PlacesServiceProto .internal_static_google_maps_places_v1_SearchTextRequest_LocationBias_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.maps.places.v1.SearchTextRequest.LocationBias.class, com.google.maps.places.v1.SearchTextRequest.LocationBias.Builder.class); } // Construct using com.google.maps.places.v1.SearchTextRequest.LocationBias.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; if (rectangleBuilder_ != null) { rectangleBuilder_.clear(); } if (circleBuilder_ != null) { circleBuilder_.clear(); } typeCase_ = 0; type_ = null; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.maps.places.v1.PlacesServiceProto .internal_static_google_maps_places_v1_SearchTextRequest_LocationBias_descriptor; } @java.lang.Override public com.google.maps.places.v1.SearchTextRequest.LocationBias getDefaultInstanceForType() { return com.google.maps.places.v1.SearchTextRequest.LocationBias.getDefaultInstance(); } @java.lang.Override public com.google.maps.places.v1.SearchTextRequest.LocationBias build() { com.google.maps.places.v1.SearchTextRequest.LocationBias result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.maps.places.v1.SearchTextRequest.LocationBias buildPartial() { com.google.maps.places.v1.SearchTextRequest.LocationBias result = new com.google.maps.places.v1.SearchTextRequest.LocationBias(this); if (bitField0_ != 0) { buildPartial0(result); } buildPartialOneofs(result); onBuilt(); return result; } private void buildPartial0(com.google.maps.places.v1.SearchTextRequest.LocationBias result) { int from_bitField0_ = bitField0_; } private void buildPartialOneofs( com.google.maps.places.v1.SearchTextRequest.LocationBias result) { result.typeCase_ = typeCase_; result.type_ = this.type_; if (typeCase_ == 1 && rectangleBuilder_ != null) { result.type_ = rectangleBuilder_.build(); } if (typeCase_ == 2 && circleBuilder_ != null) { result.type_ = circleBuilder_.build(); } } @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.google.maps.places.v1.SearchTextRequest.LocationBias) { return mergeFrom((com.google.maps.places.v1.SearchTextRequest.LocationBias) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.maps.places.v1.SearchTextRequest.LocationBias other) { if (other == com.google.maps.places.v1.SearchTextRequest.LocationBias.getDefaultInstance()) return this; switch (other.getTypeCase()) { case RECTANGLE: { mergeRectangle(other.getRectangle()); break; } case CIRCLE: { mergeCircle(other.getCircle()); break; } case TYPE_NOT_SET: { break; } } this.mergeUnknownFields(other.getUnknownFields()); 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 { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { input.readMessage(getRectangleFieldBuilder().getBuilder(), extensionRegistry); typeCase_ = 1; break; } // case 10 case 18: { input.readMessage(getCircleFieldBuilder().getBuilder(), extensionRegistry); typeCase_ = 2; break; } // case 18 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int typeCase_ = 0; private java.lang.Object type_; public TypeCase getTypeCase() { return TypeCase.forNumber(typeCase_); } public Builder clearType() { typeCase_ = 0; type_ = null; onChanged(); return this; } private int bitField0_; private com.google.protobuf.SingleFieldBuilderV3< com.google.geo.type.Viewport, com.google.geo.type.Viewport.Builder, com.google.geo.type.ViewportOrBuilder> rectangleBuilder_; /** * * *
       * A rectangle box defined by northeast and southwest corner.
       * 
* * .google.geo.type.Viewport rectangle = 1; * * @return Whether the rectangle field is set. */ @java.lang.Override public boolean hasRectangle() { return typeCase_ == 1; } /** * * *
       * A rectangle box defined by northeast and southwest corner.
       * 
* * .google.geo.type.Viewport rectangle = 1; * * @return The rectangle. */ @java.lang.Override public com.google.geo.type.Viewport getRectangle() { if (rectangleBuilder_ == null) { if (typeCase_ == 1) { return (com.google.geo.type.Viewport) type_; } return com.google.geo.type.Viewport.getDefaultInstance(); } else { if (typeCase_ == 1) { return rectangleBuilder_.getMessage(); } return com.google.geo.type.Viewport.getDefaultInstance(); } } /** * * *
       * A rectangle box defined by northeast and southwest corner.
       * 
* * .google.geo.type.Viewport rectangle = 1; */ public Builder setRectangle(com.google.geo.type.Viewport value) { if (rectangleBuilder_ == null) { if (value == null) { throw new NullPointerException(); } type_ = value; onChanged(); } else { rectangleBuilder_.setMessage(value); } typeCase_ = 1; return this; } /** * * *
       * A rectangle box defined by northeast and southwest corner.
       * 
* * .google.geo.type.Viewport rectangle = 1; */ public Builder setRectangle(com.google.geo.type.Viewport.Builder builderForValue) { if (rectangleBuilder_ == null) { type_ = builderForValue.build(); onChanged(); } else { rectangleBuilder_.setMessage(builderForValue.build()); } typeCase_ = 1; return this; } /** * * *
       * A rectangle box defined by northeast and southwest corner.
       * 
* * .google.geo.type.Viewport rectangle = 1; */ public Builder mergeRectangle(com.google.geo.type.Viewport value) { if (rectangleBuilder_ == null) { if (typeCase_ == 1 && type_ != com.google.geo.type.Viewport.getDefaultInstance()) { type_ = com.google.geo.type.Viewport.newBuilder((com.google.geo.type.Viewport) type_) .mergeFrom(value) .buildPartial(); } else { type_ = value; } onChanged(); } else { if (typeCase_ == 1) { rectangleBuilder_.mergeFrom(value); } else { rectangleBuilder_.setMessage(value); } } typeCase_ = 1; return this; } /** * * *
       * A rectangle box defined by northeast and southwest corner.
       * 
* * .google.geo.type.Viewport rectangle = 1; */ public Builder clearRectangle() { if (rectangleBuilder_ == null) { if (typeCase_ == 1) { typeCase_ = 0; type_ = null; onChanged(); } } else { if (typeCase_ == 1) { typeCase_ = 0; type_ = null; } rectangleBuilder_.clear(); } return this; } /** * * *
       * A rectangle box defined by northeast and southwest corner.
       * 
* * .google.geo.type.Viewport rectangle = 1; */ public com.google.geo.type.Viewport.Builder getRectangleBuilder() { return getRectangleFieldBuilder().getBuilder(); } /** * * *
       * A rectangle box defined by northeast and southwest corner.
       * 
* * .google.geo.type.Viewport rectangle = 1; */ @java.lang.Override public com.google.geo.type.ViewportOrBuilder getRectangleOrBuilder() { if ((typeCase_ == 1) && (rectangleBuilder_ != null)) { return rectangleBuilder_.getMessageOrBuilder(); } else { if (typeCase_ == 1) { return (com.google.geo.type.Viewport) type_; } return com.google.geo.type.Viewport.getDefaultInstance(); } } /** * * *
       * A rectangle box defined by northeast and southwest corner.
       * 
* * .google.geo.type.Viewport rectangle = 1; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.geo.type.Viewport, com.google.geo.type.Viewport.Builder, com.google.geo.type.ViewportOrBuilder> getRectangleFieldBuilder() { if (rectangleBuilder_ == null) { if (!(typeCase_ == 1)) { type_ = com.google.geo.type.Viewport.getDefaultInstance(); } rectangleBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.geo.type.Viewport, com.google.geo.type.Viewport.Builder, com.google.geo.type.ViewportOrBuilder>( (com.google.geo.type.Viewport) type_, getParentForChildren(), isClean()); type_ = null; } typeCase_ = 1; onChanged(); return rectangleBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< com.google.maps.places.v1.Circle, com.google.maps.places.v1.Circle.Builder, com.google.maps.places.v1.CircleOrBuilder> circleBuilder_; /** * * *
       * A circle defined by center point and radius.
       * 
* * .google.maps.places.v1.Circle circle = 2; * * @return Whether the circle field is set. */ @java.lang.Override public boolean hasCircle() { return typeCase_ == 2; } /** * * *
       * A circle defined by center point and radius.
       * 
* * .google.maps.places.v1.Circle circle = 2; * * @return The circle. */ @java.lang.Override public com.google.maps.places.v1.Circle getCircle() { if (circleBuilder_ == null) { if (typeCase_ == 2) { return (com.google.maps.places.v1.Circle) type_; } return com.google.maps.places.v1.Circle.getDefaultInstance(); } else { if (typeCase_ == 2) { return circleBuilder_.getMessage(); } return com.google.maps.places.v1.Circle.getDefaultInstance(); } } /** * * *
       * A circle defined by center point and radius.
       * 
* * .google.maps.places.v1.Circle circle = 2; */ public Builder setCircle(com.google.maps.places.v1.Circle value) { if (circleBuilder_ == null) { if (value == null) { throw new NullPointerException(); } type_ = value; onChanged(); } else { circleBuilder_.setMessage(value); } typeCase_ = 2; return this; } /** * * *
       * A circle defined by center point and radius.
       * 
* * .google.maps.places.v1.Circle circle = 2; */ public Builder setCircle(com.google.maps.places.v1.Circle.Builder builderForValue) { if (circleBuilder_ == null) { type_ = builderForValue.build(); onChanged(); } else { circleBuilder_.setMessage(builderForValue.build()); } typeCase_ = 2; return this; } /** * * *
       * A circle defined by center point and radius.
       * 
* * .google.maps.places.v1.Circle circle = 2; */ public Builder mergeCircle(com.google.maps.places.v1.Circle value) { if (circleBuilder_ == null) { if (typeCase_ == 2 && type_ != com.google.maps.places.v1.Circle.getDefaultInstance()) { type_ = com.google.maps.places.v1.Circle.newBuilder( (com.google.maps.places.v1.Circle) type_) .mergeFrom(value) .buildPartial(); } else { type_ = value; } onChanged(); } else { if (typeCase_ == 2) { circleBuilder_.mergeFrom(value); } else { circleBuilder_.setMessage(value); } } typeCase_ = 2; return this; } /** * * *
       * A circle defined by center point and radius.
       * 
* * .google.maps.places.v1.Circle circle = 2; */ public Builder clearCircle() { if (circleBuilder_ == null) { if (typeCase_ == 2) { typeCase_ = 0; type_ = null; onChanged(); } } else { if (typeCase_ == 2) { typeCase_ = 0; type_ = null; } circleBuilder_.clear(); } return this; } /** * * *
       * A circle defined by center point and radius.
       * 
* * .google.maps.places.v1.Circle circle = 2; */ public com.google.maps.places.v1.Circle.Builder getCircleBuilder() { return getCircleFieldBuilder().getBuilder(); } /** * * *
       * A circle defined by center point and radius.
       * 
* * .google.maps.places.v1.Circle circle = 2; */ @java.lang.Override public com.google.maps.places.v1.CircleOrBuilder getCircleOrBuilder() { if ((typeCase_ == 2) && (circleBuilder_ != null)) { return circleBuilder_.getMessageOrBuilder(); } else { if (typeCase_ == 2) { return (com.google.maps.places.v1.Circle) type_; } return com.google.maps.places.v1.Circle.getDefaultInstance(); } } /** * * *
       * A circle defined by center point and radius.
       * 
* * .google.maps.places.v1.Circle circle = 2; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.maps.places.v1.Circle, com.google.maps.places.v1.Circle.Builder, com.google.maps.places.v1.CircleOrBuilder> getCircleFieldBuilder() { if (circleBuilder_ == null) { if (!(typeCase_ == 2)) { type_ = com.google.maps.places.v1.Circle.getDefaultInstance(); } circleBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.maps.places.v1.Circle, com.google.maps.places.v1.Circle.Builder, com.google.maps.places.v1.CircleOrBuilder>( (com.google.maps.places.v1.Circle) type_, getParentForChildren(), isClean()); type_ = null; } typeCase_ = 2; onChanged(); return circleBuilder_; } @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:google.maps.places.v1.SearchTextRequest.LocationBias) } // @@protoc_insertion_point(class_scope:google.maps.places.v1.SearchTextRequest.LocationBias) private static final com.google.maps.places.v1.SearchTextRequest.LocationBias DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.maps.places.v1.SearchTextRequest.LocationBias(); } public static com.google.maps.places.v1.SearchTextRequest.LocationBias getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public LocationBias parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException() .setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public com.google.maps.places.v1.SearchTextRequest.LocationBias getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface LocationRestrictionOrBuilder extends // @@protoc_insertion_point(interface_extends:google.maps.places.v1.SearchTextRequest.LocationRestriction) com.google.protobuf.MessageOrBuilder { /** * * *
     * A rectangle box defined by northeast and southwest corner.
     * 
* * .google.geo.type.Viewport rectangle = 1; * * @return Whether the rectangle field is set. */ boolean hasRectangle(); /** * * *
     * A rectangle box defined by northeast and southwest corner.
     * 
* * .google.geo.type.Viewport rectangle = 1; * * @return The rectangle. */ com.google.geo.type.Viewport getRectangle(); /** * * *
     * A rectangle box defined by northeast and southwest corner.
     * 
* * .google.geo.type.Viewport rectangle = 1; */ com.google.geo.type.ViewportOrBuilder getRectangleOrBuilder(); com.google.maps.places.v1.SearchTextRequest.LocationRestriction.TypeCase getTypeCase(); } /** * * *
   * The region to search. This location serves as a restriction which means
   * results outside given location will not be returned.
   * 
* * Protobuf type {@code google.maps.places.v1.SearchTextRequest.LocationRestriction} */ public static final class LocationRestriction extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.maps.places.v1.SearchTextRequest.LocationRestriction) LocationRestrictionOrBuilder { private static final long serialVersionUID = 0L; // Use LocationRestriction.newBuilder() to construct. private LocationRestriction(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private LocationRestriction() {} @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new LocationRestriction(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.maps.places.v1.PlacesServiceProto .internal_static_google_maps_places_v1_SearchTextRequest_LocationRestriction_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.maps.places.v1.PlacesServiceProto .internal_static_google_maps_places_v1_SearchTextRequest_LocationRestriction_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.maps.places.v1.SearchTextRequest.LocationRestriction.class, com.google.maps.places.v1.SearchTextRequest.LocationRestriction.Builder.class); } private int typeCase_ = 0; @SuppressWarnings("serial") private java.lang.Object type_; public enum TypeCase implements com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { RECTANGLE(1), TYPE_NOT_SET(0); private final int value; private TypeCase(int value) { this.value = value; } /** * @param value The number of the enum to look for. * @return The enum associated with the given number. * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static TypeCase valueOf(int value) { return forNumber(value); } public static TypeCase forNumber(int value) { switch (value) { case 1: return RECTANGLE; case 0: return TYPE_NOT_SET; default: return null; } } public int getNumber() { return this.value; } }; public TypeCase getTypeCase() { return TypeCase.forNumber(typeCase_); } public static final int RECTANGLE_FIELD_NUMBER = 1; /** * * *
     * A rectangle box defined by northeast and southwest corner.
     * 
* * .google.geo.type.Viewport rectangle = 1; * * @return Whether the rectangle field is set. */ @java.lang.Override public boolean hasRectangle() { return typeCase_ == 1; } /** * * *
     * A rectangle box defined by northeast and southwest corner.
     * 
* * .google.geo.type.Viewport rectangle = 1; * * @return The rectangle. */ @java.lang.Override public com.google.geo.type.Viewport getRectangle() { if (typeCase_ == 1) { return (com.google.geo.type.Viewport) type_; } return com.google.geo.type.Viewport.getDefaultInstance(); } /** * * *
     * A rectangle box defined by northeast and southwest corner.
     * 
* * .google.geo.type.Viewport rectangle = 1; */ @java.lang.Override public com.google.geo.type.ViewportOrBuilder getRectangleOrBuilder() { if (typeCase_ == 1) { return (com.google.geo.type.Viewport) type_; } return com.google.geo.type.Viewport.getDefaultInstance(); } 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 (typeCase_ == 1) { output.writeMessage(1, (com.google.geo.type.Viewport) type_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (typeCase_ == 1) { size += com.google.protobuf.CodedOutputStream.computeMessageSize( 1, (com.google.geo.type.Viewport) type_); } size += getUnknownFields().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.google.maps.places.v1.SearchTextRequest.LocationRestriction)) { return super.equals(obj); } com.google.maps.places.v1.SearchTextRequest.LocationRestriction other = (com.google.maps.places.v1.SearchTextRequest.LocationRestriction) obj; if (!getTypeCase().equals(other.getTypeCase())) return false; switch (typeCase_) { case 1: if (!getRectangle().equals(other.getRectangle())) return false; break; case 0: default: } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); switch (typeCase_) { case 1: hash = (37 * hash) + RECTANGLE_FIELD_NUMBER; hash = (53 * hash) + getRectangle().hashCode(); break; case 0: default: } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.maps.places.v1.SearchTextRequest.LocationRestriction parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.maps.places.v1.SearchTextRequest.LocationRestriction parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.maps.places.v1.SearchTextRequest.LocationRestriction parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.maps.places.v1.SearchTextRequest.LocationRestriction parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.maps.places.v1.SearchTextRequest.LocationRestriction parseFrom( byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.maps.places.v1.SearchTextRequest.LocationRestriction parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.maps.places.v1.SearchTextRequest.LocationRestriction parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.maps.places.v1.SearchTextRequest.LocationRestriction 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.google.maps.places.v1.SearchTextRequest.LocationRestriction parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.maps.places.v1.SearchTextRequest.LocationRestriction 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.google.maps.places.v1.SearchTextRequest.LocationRestriction parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.maps.places.v1.SearchTextRequest.LocationRestriction 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.google.maps.places.v1.SearchTextRequest.LocationRestriction 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; } /** * * *
     * The region to search. This location serves as a restriction which means
     * results outside given location will not be returned.
     * 
* * Protobuf type {@code google.maps.places.v1.SearchTextRequest.LocationRestriction} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.maps.places.v1.SearchTextRequest.LocationRestriction) com.google.maps.places.v1.SearchTextRequest.LocationRestrictionOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.maps.places.v1.PlacesServiceProto .internal_static_google_maps_places_v1_SearchTextRequest_LocationRestriction_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.maps.places.v1.PlacesServiceProto .internal_static_google_maps_places_v1_SearchTextRequest_LocationRestriction_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.maps.places.v1.SearchTextRequest.LocationRestriction.class, com.google.maps.places.v1.SearchTextRequest.LocationRestriction.Builder.class); } // Construct using // com.google.maps.places.v1.SearchTextRequest.LocationRestriction.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; if (rectangleBuilder_ != null) { rectangleBuilder_.clear(); } typeCase_ = 0; type_ = null; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.maps.places.v1.PlacesServiceProto .internal_static_google_maps_places_v1_SearchTextRequest_LocationRestriction_descriptor; } @java.lang.Override public com.google.maps.places.v1.SearchTextRequest.LocationRestriction getDefaultInstanceForType() { return com.google.maps.places.v1.SearchTextRequest.LocationRestriction.getDefaultInstance(); } @java.lang.Override public com.google.maps.places.v1.SearchTextRequest.LocationRestriction build() { com.google.maps.places.v1.SearchTextRequest.LocationRestriction result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.maps.places.v1.SearchTextRequest.LocationRestriction buildPartial() { com.google.maps.places.v1.SearchTextRequest.LocationRestriction result = new com.google.maps.places.v1.SearchTextRequest.LocationRestriction(this); if (bitField0_ != 0) { buildPartial0(result); } buildPartialOneofs(result); onBuilt(); return result; } private void buildPartial0( com.google.maps.places.v1.SearchTextRequest.LocationRestriction result) { int from_bitField0_ = bitField0_; } private void buildPartialOneofs( com.google.maps.places.v1.SearchTextRequest.LocationRestriction result) { result.typeCase_ = typeCase_; result.type_ = this.type_; if (typeCase_ == 1 && rectangleBuilder_ != null) { result.type_ = rectangleBuilder_.build(); } } @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.google.maps.places.v1.SearchTextRequest.LocationRestriction) { return mergeFrom((com.google.maps.places.v1.SearchTextRequest.LocationRestriction) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom( com.google.maps.places.v1.SearchTextRequest.LocationRestriction other) { if (other == com.google.maps.places.v1.SearchTextRequest.LocationRestriction.getDefaultInstance()) return this; switch (other.getTypeCase()) { case RECTANGLE: { mergeRectangle(other.getRectangle()); break; } case TYPE_NOT_SET: { break; } } this.mergeUnknownFields(other.getUnknownFields()); 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 { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { input.readMessage(getRectangleFieldBuilder().getBuilder(), extensionRegistry); typeCase_ = 1; break; } // case 10 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int typeCase_ = 0; private java.lang.Object type_; public TypeCase getTypeCase() { return TypeCase.forNumber(typeCase_); } public Builder clearType() { typeCase_ = 0; type_ = null; onChanged(); return this; } private int bitField0_; private com.google.protobuf.SingleFieldBuilderV3< com.google.geo.type.Viewport, com.google.geo.type.Viewport.Builder, com.google.geo.type.ViewportOrBuilder> rectangleBuilder_; /** * * *
       * A rectangle box defined by northeast and southwest corner.
       * 
* * .google.geo.type.Viewport rectangle = 1; * * @return Whether the rectangle field is set. */ @java.lang.Override public boolean hasRectangle() { return typeCase_ == 1; } /** * * *
       * A rectangle box defined by northeast and southwest corner.
       * 
* * .google.geo.type.Viewport rectangle = 1; * * @return The rectangle. */ @java.lang.Override public com.google.geo.type.Viewport getRectangle() { if (rectangleBuilder_ == null) { if (typeCase_ == 1) { return (com.google.geo.type.Viewport) type_; } return com.google.geo.type.Viewport.getDefaultInstance(); } else { if (typeCase_ == 1) { return rectangleBuilder_.getMessage(); } return com.google.geo.type.Viewport.getDefaultInstance(); } } /** * * *
       * A rectangle box defined by northeast and southwest corner.
       * 
* * .google.geo.type.Viewport rectangle = 1; */ public Builder setRectangle(com.google.geo.type.Viewport value) { if (rectangleBuilder_ == null) { if (value == null) { throw new NullPointerException(); } type_ = value; onChanged(); } else { rectangleBuilder_.setMessage(value); } typeCase_ = 1; return this; } /** * * *
       * A rectangle box defined by northeast and southwest corner.
       * 
* * .google.geo.type.Viewport rectangle = 1; */ public Builder setRectangle(com.google.geo.type.Viewport.Builder builderForValue) { if (rectangleBuilder_ == null) { type_ = builderForValue.build(); onChanged(); } else { rectangleBuilder_.setMessage(builderForValue.build()); } typeCase_ = 1; return this; } /** * * *
       * A rectangle box defined by northeast and southwest corner.
       * 
* * .google.geo.type.Viewport rectangle = 1; */ public Builder mergeRectangle(com.google.geo.type.Viewport value) { if (rectangleBuilder_ == null) { if (typeCase_ == 1 && type_ != com.google.geo.type.Viewport.getDefaultInstance()) { type_ = com.google.geo.type.Viewport.newBuilder((com.google.geo.type.Viewport) type_) .mergeFrom(value) .buildPartial(); } else { type_ = value; } onChanged(); } else { if (typeCase_ == 1) { rectangleBuilder_.mergeFrom(value); } else { rectangleBuilder_.setMessage(value); } } typeCase_ = 1; return this; } /** * * *
       * A rectangle box defined by northeast and southwest corner.
       * 
* * .google.geo.type.Viewport rectangle = 1; */ public Builder clearRectangle() { if (rectangleBuilder_ == null) { if (typeCase_ == 1) { typeCase_ = 0; type_ = null; onChanged(); } } else { if (typeCase_ == 1) { typeCase_ = 0; type_ = null; } rectangleBuilder_.clear(); } return this; } /** * * *
       * A rectangle box defined by northeast and southwest corner.
       * 
* * .google.geo.type.Viewport rectangle = 1; */ public com.google.geo.type.Viewport.Builder getRectangleBuilder() { return getRectangleFieldBuilder().getBuilder(); } /** * * *
       * A rectangle box defined by northeast and southwest corner.
       * 
* * .google.geo.type.Viewport rectangle = 1; */ @java.lang.Override public com.google.geo.type.ViewportOrBuilder getRectangleOrBuilder() { if ((typeCase_ == 1) && (rectangleBuilder_ != null)) { return rectangleBuilder_.getMessageOrBuilder(); } else { if (typeCase_ == 1) { return (com.google.geo.type.Viewport) type_; } return com.google.geo.type.Viewport.getDefaultInstance(); } } /** * * *
       * A rectangle box defined by northeast and southwest corner.
       * 
* * .google.geo.type.Viewport rectangle = 1; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.geo.type.Viewport, com.google.geo.type.Viewport.Builder, com.google.geo.type.ViewportOrBuilder> getRectangleFieldBuilder() { if (rectangleBuilder_ == null) { if (!(typeCase_ == 1)) { type_ = com.google.geo.type.Viewport.getDefaultInstance(); } rectangleBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.geo.type.Viewport, com.google.geo.type.Viewport.Builder, com.google.geo.type.ViewportOrBuilder>( (com.google.geo.type.Viewport) type_, getParentForChildren(), isClean()); type_ = null; } typeCase_ = 1; onChanged(); return rectangleBuilder_; } @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:google.maps.places.v1.SearchTextRequest.LocationRestriction) } // @@protoc_insertion_point(class_scope:google.maps.places.v1.SearchTextRequest.LocationRestriction) private static final com.google.maps.places.v1.SearchTextRequest.LocationRestriction DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.maps.places.v1.SearchTextRequest.LocationRestriction(); } public static com.google.maps.places.v1.SearchTextRequest.LocationRestriction getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public LocationRestriction parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException() .setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public com.google.maps.places.v1.SearchTextRequest.LocationRestriction getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public static final int TEXT_QUERY_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object textQuery_ = ""; /** * * *
   * Required. The text query for textual search.
   * 
* * string text_query = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The textQuery. */ @java.lang.Override public java.lang.String getTextQuery() { java.lang.Object ref = textQuery_; 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(); textQuery_ = s; return s; } } /** * * *
   * Required. The text query for textual search.
   * 
* * string text_query = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for textQuery. */ @java.lang.Override public com.google.protobuf.ByteString getTextQueryBytes() { java.lang.Object ref = textQuery_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); textQuery_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int LANGUAGE_CODE_FIELD_NUMBER = 2; @SuppressWarnings("serial") private volatile java.lang.Object languageCode_ = ""; /** * * *
   * Place details will be displayed with the preferred language if available.
   * If the language code is unspecified or unrecognized, place details of any
   * language may be returned, with a preference for English if such details
   * exist.
   *
   * Current list of supported languages:
   * https://developers.google.com/maps/faq#languagesupport.
   * 
* * string language_code = 2; * * @return The languageCode. */ @java.lang.Override public java.lang.String getLanguageCode() { java.lang.Object ref = languageCode_; 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(); languageCode_ = s; return s; } } /** * * *
   * Place details will be displayed with the preferred language if available.
   * If the language code is unspecified or unrecognized, place details of any
   * language may be returned, with a preference for English if such details
   * exist.
   *
   * Current list of supported languages:
   * https://developers.google.com/maps/faq#languagesupport.
   * 
* * string language_code = 2; * * @return The bytes for languageCode. */ @java.lang.Override public com.google.protobuf.ByteString getLanguageCodeBytes() { java.lang.Object ref = languageCode_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); languageCode_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int REGION_CODE_FIELD_NUMBER = 3; @SuppressWarnings("serial") private volatile java.lang.Object regionCode_ = ""; /** * * *
   * The Unicode country/region code (CLDR) of the location where the
   * request is coming from. This parameter is used to display the place
   * details, like region-specific place name, if available. The parameter can
   * affect results based on applicable law.
   *
   * For more information, see
   * http://www.unicode.org/reports/tr35/#unicode_region_subtag.
   *
   *
   * Note that 3-digit region codes are not currently supported.
   * 
* * string region_code = 3; * * @return The regionCode. */ @java.lang.Override public java.lang.String getRegionCode() { java.lang.Object ref = regionCode_; 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(); regionCode_ = s; return s; } } /** * * *
   * The Unicode country/region code (CLDR) of the location where the
   * request is coming from. This parameter is used to display the place
   * details, like region-specific place name, if available. The parameter can
   * affect results based on applicable law.
   *
   * For more information, see
   * http://www.unicode.org/reports/tr35/#unicode_region_subtag.
   *
   *
   * Note that 3-digit region codes are not currently supported.
   * 
* * string region_code = 3; * * @return The bytes for regionCode. */ @java.lang.Override public com.google.protobuf.ByteString getRegionCodeBytes() { java.lang.Object ref = regionCode_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); regionCode_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int RANK_PREFERENCE_FIELD_NUMBER = 4; private int rankPreference_ = 0; /** * * *
   * How results will be ranked in the response.
   * 
* * .google.maps.places.v1.SearchTextRequest.RankPreference rank_preference = 4; * * @return The enum numeric value on the wire for rankPreference. */ @java.lang.Override public int getRankPreferenceValue() { return rankPreference_; } /** * * *
   * How results will be ranked in the response.
   * 
* * .google.maps.places.v1.SearchTextRequest.RankPreference rank_preference = 4; * * @return The rankPreference. */ @java.lang.Override public com.google.maps.places.v1.SearchTextRequest.RankPreference getRankPreference() { com.google.maps.places.v1.SearchTextRequest.RankPreference result = com.google.maps.places.v1.SearchTextRequest.RankPreference.forNumber(rankPreference_); return result == null ? com.google.maps.places.v1.SearchTextRequest.RankPreference.UNRECOGNIZED : result; } public static final int INCLUDED_TYPE_FIELD_NUMBER = 6; @SuppressWarnings("serial") private volatile java.lang.Object includedType_ = ""; /** * * *
   * The requested place type. Full list of types supported:
   * https://developers.google.com/places/supported_types. Only support one
   * included type.
   * 
* * string included_type = 6; * * @return The includedType. */ @java.lang.Override public java.lang.String getIncludedType() { java.lang.Object ref = includedType_; 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(); includedType_ = s; return s; } } /** * * *
   * The requested place type. Full list of types supported:
   * https://developers.google.com/places/supported_types. Only support one
   * included type.
   * 
* * string included_type = 6; * * @return The bytes for includedType. */ @java.lang.Override public com.google.protobuf.ByteString getIncludedTypeBytes() { java.lang.Object ref = includedType_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); includedType_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int OPEN_NOW_FIELD_NUMBER = 7; private boolean openNow_ = false; /** * * *
   * Used to restrict the search to places that are open at a specific time.
   * open_now marks if a business is currently open.
   * 
* * bool open_now = 7; * * @return The openNow. */ @java.lang.Override public boolean getOpenNow() { return openNow_; } public static final int MIN_RATING_FIELD_NUMBER = 9; private double minRating_ = 0D; /** * * *
   * Filter out results whose average user rating is strictly less than this
   * limit. A valid value must be an float between 0 and 5 (inclusively) at a
   * 0.5 cadence i.e. [0, 0.5, 1.0, ... , 5.0] inclusively. This is to keep
   * parity with LocalRefinement_UserRating. The input rating will round up to
   * the nearest 0.5(ceiling). For instance, a rating of 0.6 will eliminate all
   * results with a less than 1.0 rating.
   * 
* * double min_rating = 9; * * @return The minRating. */ @java.lang.Override public double getMinRating() { return minRating_; } public static final int MAX_RESULT_COUNT_FIELD_NUMBER = 10; private int maxResultCount_ = 0; /** * * *
   * Maximum number of results to return. It must be between 1 and 20,
   * inclusively. If the number is unset, it falls back to the upper limit. If
   * the number is set to negative or exceeds the upper limit, an
   * INVALID_ARGUMENT error is returned.
   * 
* * int32 max_result_count = 10; * * @return The maxResultCount. */ @java.lang.Override public int getMaxResultCount() { return maxResultCount_; } public static final int PRICE_LEVELS_FIELD_NUMBER = 11; @SuppressWarnings("serial") private java.util.List priceLevels_; private static final com.google.protobuf.Internal.ListAdapter.Converter< java.lang.Integer, com.google.maps.places.v1.PriceLevel> priceLevels_converter_ = new com.google.protobuf.Internal.ListAdapter.Converter< java.lang.Integer, com.google.maps.places.v1.PriceLevel>() { public com.google.maps.places.v1.PriceLevel convert(java.lang.Integer from) { com.google.maps.places.v1.PriceLevel result = com.google.maps.places.v1.PriceLevel.forNumber(from); return result == null ? com.google.maps.places.v1.PriceLevel.UNRECOGNIZED : result; } }; /** * * *
   * Used to restrict the search to places that are marked as certain price
   * levels. Users can choose any combinations of price levels. Default to
   * select all price levels.
   * 
* * repeated .google.maps.places.v1.PriceLevel price_levels = 11; * * @return A list containing the priceLevels. */ @java.lang.Override public java.util.List getPriceLevelsList() { return new com.google.protobuf.Internal.ListAdapter< java.lang.Integer, com.google.maps.places.v1.PriceLevel>( priceLevels_, priceLevels_converter_); } /** * * *
   * Used to restrict the search to places that are marked as certain price
   * levels. Users can choose any combinations of price levels. Default to
   * select all price levels.
   * 
* * repeated .google.maps.places.v1.PriceLevel price_levels = 11; * * @return The count of priceLevels. */ @java.lang.Override public int getPriceLevelsCount() { return priceLevels_.size(); } /** * * *
   * Used to restrict the search to places that are marked as certain price
   * levels. Users can choose any combinations of price levels. Default to
   * select all price levels.
   * 
* * repeated .google.maps.places.v1.PriceLevel price_levels = 11; * * @param index The index of the element to return. * @return The priceLevels at the given index. */ @java.lang.Override public com.google.maps.places.v1.PriceLevel getPriceLevels(int index) { return priceLevels_converter_.convert(priceLevels_.get(index)); } /** * * *
   * Used to restrict the search to places that are marked as certain price
   * levels. Users can choose any combinations of price levels. Default to
   * select all price levels.
   * 
* * repeated .google.maps.places.v1.PriceLevel price_levels = 11; * * @return A list containing the enum numeric values on the wire for priceLevels. */ @java.lang.Override public java.util.List getPriceLevelsValueList() { return priceLevels_; } /** * * *
   * Used to restrict the search to places that are marked as certain price
   * levels. Users can choose any combinations of price levels. Default to
   * select all price levels.
   * 
* * repeated .google.maps.places.v1.PriceLevel price_levels = 11; * * @param index The index of the value to return. * @return The enum numeric value on the wire of priceLevels at the given index. */ @java.lang.Override public int getPriceLevelsValue(int index) { return priceLevels_.get(index); } private int priceLevelsMemoizedSerializedSize; public static final int STRICT_TYPE_FILTERING_FIELD_NUMBER = 12; private boolean strictTypeFiltering_ = false; /** * * *
   * Used to set strict type filtering for included_type. If set to true, only
   * results of the same type will be returned. Default to false.
   * 
* * bool strict_type_filtering = 12; * * @return The strictTypeFiltering. */ @java.lang.Override public boolean getStrictTypeFiltering() { return strictTypeFiltering_; } public static final int LOCATION_BIAS_FIELD_NUMBER = 13; private com.google.maps.places.v1.SearchTextRequest.LocationBias locationBias_; /** * * *
   * The region to search. This location serves as a bias which means results
   * around given location might be returned. Cannot be set along with
   * location_restriction.
   * 
* * .google.maps.places.v1.SearchTextRequest.LocationBias location_bias = 13; * * @return Whether the locationBias field is set. */ @java.lang.Override public boolean hasLocationBias() { return locationBias_ != null; } /** * * *
   * The region to search. This location serves as a bias which means results
   * around given location might be returned. Cannot be set along with
   * location_restriction.
   * 
* * .google.maps.places.v1.SearchTextRequest.LocationBias location_bias = 13; * * @return The locationBias. */ @java.lang.Override public com.google.maps.places.v1.SearchTextRequest.LocationBias getLocationBias() { return locationBias_ == null ? com.google.maps.places.v1.SearchTextRequest.LocationBias.getDefaultInstance() : locationBias_; } /** * * *
   * The region to search. This location serves as a bias which means results
   * around given location might be returned. Cannot be set along with
   * location_restriction.
   * 
* * .google.maps.places.v1.SearchTextRequest.LocationBias location_bias = 13; */ @java.lang.Override public com.google.maps.places.v1.SearchTextRequest.LocationBiasOrBuilder getLocationBiasOrBuilder() { return locationBias_ == null ? com.google.maps.places.v1.SearchTextRequest.LocationBias.getDefaultInstance() : locationBias_; } public static final int LOCATION_RESTRICTION_FIELD_NUMBER = 14; private com.google.maps.places.v1.SearchTextRequest.LocationRestriction locationRestriction_; /** * * *
   * The region to search. This location serves as a restriction which means
   * results outside given location will not be returned. Cannot be set along
   * with location_bias.
   * 
* * .google.maps.places.v1.SearchTextRequest.LocationRestriction location_restriction = 14; * * * @return Whether the locationRestriction field is set. */ @java.lang.Override public boolean hasLocationRestriction() { return locationRestriction_ != null; } /** * * *
   * The region to search. This location serves as a restriction which means
   * results outside given location will not be returned. Cannot be set along
   * with location_bias.
   * 
* * .google.maps.places.v1.SearchTextRequest.LocationRestriction location_restriction = 14; * * * @return The locationRestriction. */ @java.lang.Override public com.google.maps.places.v1.SearchTextRequest.LocationRestriction getLocationRestriction() { return locationRestriction_ == null ? com.google.maps.places.v1.SearchTextRequest.LocationRestriction.getDefaultInstance() : locationRestriction_; } /** * * *
   * The region to search. This location serves as a restriction which means
   * results outside given location will not be returned. Cannot be set along
   * with location_bias.
   * 
* * .google.maps.places.v1.SearchTextRequest.LocationRestriction location_restriction = 14; * */ @java.lang.Override public com.google.maps.places.v1.SearchTextRequest.LocationRestrictionOrBuilder getLocationRestrictionOrBuilder() { return locationRestriction_ == null ? com.google.maps.places.v1.SearchTextRequest.LocationRestriction.getDefaultInstance() : locationRestriction_; } 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 { getSerializedSize(); if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(textQuery_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, textQuery_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, languageCode_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(regionCode_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, regionCode_); } if (rankPreference_ != com.google.maps.places.v1.SearchTextRequest.RankPreference.RANK_PREFERENCE_UNSPECIFIED .getNumber()) { output.writeEnum(4, rankPreference_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(includedType_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 6, includedType_); } if (openNow_ != false) { output.writeBool(7, openNow_); } if (java.lang.Double.doubleToRawLongBits(minRating_) != 0) { output.writeDouble(9, minRating_); } if (maxResultCount_ != 0) { output.writeInt32(10, maxResultCount_); } if (getPriceLevelsList().size() > 0) { output.writeUInt32NoTag(90); output.writeUInt32NoTag(priceLevelsMemoizedSerializedSize); } for (int i = 0; i < priceLevels_.size(); i++) { output.writeEnumNoTag(priceLevels_.get(i)); } if (strictTypeFiltering_ != false) { output.writeBool(12, strictTypeFiltering_); } if (locationBias_ != null) { output.writeMessage(13, getLocationBias()); } if (locationRestriction_ != null) { output.writeMessage(14, getLocationRestriction()); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(textQuery_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, textQuery_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, languageCode_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(regionCode_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, regionCode_); } if (rankPreference_ != com.google.maps.places.v1.SearchTextRequest.RankPreference.RANK_PREFERENCE_UNSPECIFIED .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, rankPreference_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(includedType_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, includedType_); } if (openNow_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(7, openNow_); } if (java.lang.Double.doubleToRawLongBits(minRating_) != 0) { size += com.google.protobuf.CodedOutputStream.computeDoubleSize(9, minRating_); } if (maxResultCount_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(10, maxResultCount_); } { int dataSize = 0; for (int i = 0; i < priceLevels_.size(); i++) { dataSize += com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(priceLevels_.get(i)); } size += dataSize; if (!getPriceLevelsList().isEmpty()) { size += 1; size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); } priceLevelsMemoizedSerializedSize = dataSize; } if (strictTypeFiltering_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(12, strictTypeFiltering_); } if (locationBias_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, getLocationBias()); } if (locationRestriction_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, getLocationRestriction()); } size += getUnknownFields().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.google.maps.places.v1.SearchTextRequest)) { return super.equals(obj); } com.google.maps.places.v1.SearchTextRequest other = (com.google.maps.places.v1.SearchTextRequest) obj; if (!getTextQuery().equals(other.getTextQuery())) return false; if (!getLanguageCode().equals(other.getLanguageCode())) return false; if (!getRegionCode().equals(other.getRegionCode())) return false; if (rankPreference_ != other.rankPreference_) return false; if (!getIncludedType().equals(other.getIncludedType())) return false; if (getOpenNow() != other.getOpenNow()) return false; if (java.lang.Double.doubleToLongBits(getMinRating()) != java.lang.Double.doubleToLongBits(other.getMinRating())) return false; if (getMaxResultCount() != other.getMaxResultCount()) return false; if (!priceLevels_.equals(other.priceLevels_)) return false; if (getStrictTypeFiltering() != other.getStrictTypeFiltering()) return false; if (hasLocationBias() != other.hasLocationBias()) return false; if (hasLocationBias()) { if (!getLocationBias().equals(other.getLocationBias())) return false; } if (hasLocationRestriction() != other.hasLocationRestriction()) return false; if (hasLocationRestriction()) { if (!getLocationRestriction().equals(other.getLocationRestriction())) return false; } if (!getUnknownFields().equals(other.getUnknownFields())) 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) + TEXT_QUERY_FIELD_NUMBER; hash = (53 * hash) + getTextQuery().hashCode(); hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; hash = (53 * hash) + getLanguageCode().hashCode(); hash = (37 * hash) + REGION_CODE_FIELD_NUMBER; hash = (53 * hash) + getRegionCode().hashCode(); hash = (37 * hash) + RANK_PREFERENCE_FIELD_NUMBER; hash = (53 * hash) + rankPreference_; hash = (37 * hash) + INCLUDED_TYPE_FIELD_NUMBER; hash = (53 * hash) + getIncludedType().hashCode(); hash = (37 * hash) + OPEN_NOW_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getOpenNow()); hash = (37 * hash) + MIN_RATING_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( java.lang.Double.doubleToLongBits(getMinRating())); hash = (37 * hash) + MAX_RESULT_COUNT_FIELD_NUMBER; hash = (53 * hash) + getMaxResultCount(); if (getPriceLevelsCount() > 0) { hash = (37 * hash) + PRICE_LEVELS_FIELD_NUMBER; hash = (53 * hash) + priceLevels_.hashCode(); } hash = (37 * hash) + STRICT_TYPE_FILTERING_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getStrictTypeFiltering()); if (hasLocationBias()) { hash = (37 * hash) + LOCATION_BIAS_FIELD_NUMBER; hash = (53 * hash) + getLocationBias().hashCode(); } if (hasLocationRestriction()) { hash = (37 * hash) + LOCATION_RESTRICTION_FIELD_NUMBER; hash = (53 * hash) + getLocationRestriction().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.maps.places.v1.SearchTextRequest parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.maps.places.v1.SearchTextRequest parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.maps.places.v1.SearchTextRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.maps.places.v1.SearchTextRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.maps.places.v1.SearchTextRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.maps.places.v1.SearchTextRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.maps.places.v1.SearchTextRequest parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.maps.places.v1.SearchTextRequest 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.google.maps.places.v1.SearchTextRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.maps.places.v1.SearchTextRequest 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.google.maps.places.v1.SearchTextRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.maps.places.v1.SearchTextRequest 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.google.maps.places.v1.SearchTextRequest 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; } /** * * *
   * Request proto for SearchText.
   * 
* * Protobuf type {@code google.maps.places.v1.SearchTextRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.maps.places.v1.SearchTextRequest) com.google.maps.places.v1.SearchTextRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.maps.places.v1.PlacesServiceProto .internal_static_google_maps_places_v1_SearchTextRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.maps.places.v1.PlacesServiceProto .internal_static_google_maps_places_v1_SearchTextRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.maps.places.v1.SearchTextRequest.class, com.google.maps.places.v1.SearchTextRequest.Builder.class); } // Construct using com.google.maps.places.v1.SearchTextRequest.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; textQuery_ = ""; languageCode_ = ""; regionCode_ = ""; rankPreference_ = 0; includedType_ = ""; openNow_ = false; minRating_ = 0D; maxResultCount_ = 0; priceLevels_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000100); strictTypeFiltering_ = false; locationBias_ = null; if (locationBiasBuilder_ != null) { locationBiasBuilder_.dispose(); locationBiasBuilder_ = null; } locationRestriction_ = null; if (locationRestrictionBuilder_ != null) { locationRestrictionBuilder_.dispose(); locationRestrictionBuilder_ = null; } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.maps.places.v1.PlacesServiceProto .internal_static_google_maps_places_v1_SearchTextRequest_descriptor; } @java.lang.Override public com.google.maps.places.v1.SearchTextRequest getDefaultInstanceForType() { return com.google.maps.places.v1.SearchTextRequest.getDefaultInstance(); } @java.lang.Override public com.google.maps.places.v1.SearchTextRequest build() { com.google.maps.places.v1.SearchTextRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.maps.places.v1.SearchTextRequest buildPartial() { com.google.maps.places.v1.SearchTextRequest result = new com.google.maps.places.v1.SearchTextRequest(this); buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartialRepeatedFields(com.google.maps.places.v1.SearchTextRequest result) { if (((bitField0_ & 0x00000100) != 0)) { priceLevels_ = java.util.Collections.unmodifiableList(priceLevels_); bitField0_ = (bitField0_ & ~0x00000100); } result.priceLevels_ = priceLevels_; } private void buildPartial0(com.google.maps.places.v1.SearchTextRequest result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.textQuery_ = textQuery_; } if (((from_bitField0_ & 0x00000002) != 0)) { result.languageCode_ = languageCode_; } if (((from_bitField0_ & 0x00000004) != 0)) { result.regionCode_ = regionCode_; } if (((from_bitField0_ & 0x00000008) != 0)) { result.rankPreference_ = rankPreference_; } if (((from_bitField0_ & 0x00000010) != 0)) { result.includedType_ = includedType_; } if (((from_bitField0_ & 0x00000020) != 0)) { result.openNow_ = openNow_; } if (((from_bitField0_ & 0x00000040) != 0)) { result.minRating_ = minRating_; } if (((from_bitField0_ & 0x00000080) != 0)) { result.maxResultCount_ = maxResultCount_; } if (((from_bitField0_ & 0x00000200) != 0)) { result.strictTypeFiltering_ = strictTypeFiltering_; } if (((from_bitField0_ & 0x00000400) != 0)) { result.locationBias_ = locationBiasBuilder_ == null ? locationBias_ : locationBiasBuilder_.build(); } if (((from_bitField0_ & 0x00000800) != 0)) { result.locationRestriction_ = locationRestrictionBuilder_ == null ? locationRestriction_ : locationRestrictionBuilder_.build(); } } @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.google.maps.places.v1.SearchTextRequest) { return mergeFrom((com.google.maps.places.v1.SearchTextRequest) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.maps.places.v1.SearchTextRequest other) { if (other == com.google.maps.places.v1.SearchTextRequest.getDefaultInstance()) return this; if (!other.getTextQuery().isEmpty()) { textQuery_ = other.textQuery_; bitField0_ |= 0x00000001; onChanged(); } if (!other.getLanguageCode().isEmpty()) { languageCode_ = other.languageCode_; bitField0_ |= 0x00000002; onChanged(); } if (!other.getRegionCode().isEmpty()) { regionCode_ = other.regionCode_; bitField0_ |= 0x00000004; onChanged(); } if (other.rankPreference_ != 0) { setRankPreferenceValue(other.getRankPreferenceValue()); } if (!other.getIncludedType().isEmpty()) { includedType_ = other.includedType_; bitField0_ |= 0x00000010; onChanged(); } if (other.getOpenNow() != false) { setOpenNow(other.getOpenNow()); } if (other.getMinRating() != 0D) { setMinRating(other.getMinRating()); } if (other.getMaxResultCount() != 0) { setMaxResultCount(other.getMaxResultCount()); } if (!other.priceLevels_.isEmpty()) { if (priceLevels_.isEmpty()) { priceLevels_ = other.priceLevels_; bitField0_ = (bitField0_ & ~0x00000100); } else { ensurePriceLevelsIsMutable(); priceLevels_.addAll(other.priceLevels_); } onChanged(); } if (other.getStrictTypeFiltering() != false) { setStrictTypeFiltering(other.getStrictTypeFiltering()); } if (other.hasLocationBias()) { mergeLocationBias(other.getLocationBias()); } if (other.hasLocationRestriction()) { mergeLocationRestriction(other.getLocationRestriction()); } this.mergeUnknownFields(other.getUnknownFields()); 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 { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { textQuery_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 10 case 18: { languageCode_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000002; break; } // case 18 case 26: { regionCode_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000004; break; } // case 26 case 32: { rankPreference_ = input.readEnum(); bitField0_ |= 0x00000008; break; } // case 32 case 50: { includedType_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000010; break; } // case 50 case 56: { openNow_ = input.readBool(); bitField0_ |= 0x00000020; break; } // case 56 case 73: { minRating_ = input.readDouble(); bitField0_ |= 0x00000040; break; } // case 73 case 80: { maxResultCount_ = input.readInt32(); bitField0_ |= 0x00000080; break; } // case 80 case 88: { int tmpRaw = input.readEnum(); ensurePriceLevelsIsMutable(); priceLevels_.add(tmpRaw); break; } // case 88 case 90: { int length = input.readRawVarint32(); int oldLimit = input.pushLimit(length); while (input.getBytesUntilLimit() > 0) { int tmpRaw = input.readEnum(); ensurePriceLevelsIsMutable(); priceLevels_.add(tmpRaw); } input.popLimit(oldLimit); break; } // case 90 case 96: { strictTypeFiltering_ = input.readBool(); bitField0_ |= 0x00000200; break; } // case 96 case 106: { input.readMessage(getLocationBiasFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000400; break; } // case 106 case 114: { input.readMessage( getLocationRestrictionFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000800; break; } // case 114 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private java.lang.Object textQuery_ = ""; /** * * *
     * Required. The text query for textual search.
     * 
* * string text_query = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The textQuery. */ public java.lang.String getTextQuery() { java.lang.Object ref = textQuery_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); textQuery_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * Required. The text query for textual search.
     * 
* * string text_query = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for textQuery. */ public com.google.protobuf.ByteString getTextQueryBytes() { java.lang.Object ref = textQuery_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); textQuery_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * Required. The text query for textual search.
     * 
* * string text_query = 1 [(.google.api.field_behavior) = REQUIRED]; * * @param value The textQuery to set. * @return This builder for chaining. */ public Builder setTextQuery(java.lang.String value) { if (value == null) { throw new NullPointerException(); } textQuery_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** * * *
     * Required. The text query for textual search.
     * 
* * string text_query = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return This builder for chaining. */ public Builder clearTextQuery() { textQuery_ = getDefaultInstance().getTextQuery(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** * * *
     * Required. The text query for textual search.
     * 
* * string text_query = 1 [(.google.api.field_behavior) = REQUIRED]; * * @param value The bytes for textQuery to set. * @return This builder for chaining. */ public Builder setTextQueryBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); textQuery_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } private java.lang.Object languageCode_ = ""; /** * * *
     * Place details will be displayed with the preferred language if available.
     * If the language code is unspecified or unrecognized, place details of any
     * language may be returned, with a preference for English if such details
     * exist.
     *
     * Current list of supported languages:
     * https://developers.google.com/maps/faq#languagesupport.
     * 
* * string language_code = 2; * * @return The languageCode. */ public java.lang.String getLanguageCode() { java.lang.Object ref = languageCode_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); languageCode_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * Place details will be displayed with the preferred language if available.
     * If the language code is unspecified or unrecognized, place details of any
     * language may be returned, with a preference for English if such details
     * exist.
     *
     * Current list of supported languages:
     * https://developers.google.com/maps/faq#languagesupport.
     * 
* * string language_code = 2; * * @return The bytes for languageCode. */ public com.google.protobuf.ByteString getLanguageCodeBytes() { java.lang.Object ref = languageCode_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); languageCode_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * Place details will be displayed with the preferred language if available.
     * If the language code is unspecified or unrecognized, place details of any
     * language may be returned, with a preference for English if such details
     * exist.
     *
     * Current list of supported languages:
     * https://developers.google.com/maps/faq#languagesupport.
     * 
* * string language_code = 2; * * @param value The languageCode to set. * @return This builder for chaining. */ public Builder setLanguageCode(java.lang.String value) { if (value == null) { throw new NullPointerException(); } languageCode_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** * * *
     * Place details will be displayed with the preferred language if available.
     * If the language code is unspecified or unrecognized, place details of any
     * language may be returned, with a preference for English if such details
     * exist.
     *
     * Current list of supported languages:
     * https://developers.google.com/maps/faq#languagesupport.
     * 
* * string language_code = 2; * * @return This builder for chaining. */ public Builder clearLanguageCode() { languageCode_ = getDefaultInstance().getLanguageCode(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** * * *
     * Place details will be displayed with the preferred language if available.
     * If the language code is unspecified or unrecognized, place details of any
     * language may be returned, with a preference for English if such details
     * exist.
     *
     * Current list of supported languages:
     * https://developers.google.com/maps/faq#languagesupport.
     * 
* * string language_code = 2; * * @param value The bytes for languageCode to set. * @return This builder for chaining. */ public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); languageCode_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } private java.lang.Object regionCode_ = ""; /** * * *
     * The Unicode country/region code (CLDR) of the location where the
     * request is coming from. This parameter is used to display the place
     * details, like region-specific place name, if available. The parameter can
     * affect results based on applicable law.
     *
     * For more information, see
     * http://www.unicode.org/reports/tr35/#unicode_region_subtag.
     *
     *
     * Note that 3-digit region codes are not currently supported.
     * 
* * string region_code = 3; * * @return The regionCode. */ public java.lang.String getRegionCode() { java.lang.Object ref = regionCode_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); regionCode_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * The Unicode country/region code (CLDR) of the location where the
     * request is coming from. This parameter is used to display the place
     * details, like region-specific place name, if available. The parameter can
     * affect results based on applicable law.
     *
     * For more information, see
     * http://www.unicode.org/reports/tr35/#unicode_region_subtag.
     *
     *
     * Note that 3-digit region codes are not currently supported.
     * 
* * string region_code = 3; * * @return The bytes for regionCode. */ public com.google.protobuf.ByteString getRegionCodeBytes() { java.lang.Object ref = regionCode_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); regionCode_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * The Unicode country/region code (CLDR) of the location where the
     * request is coming from. This parameter is used to display the place
     * details, like region-specific place name, if available. The parameter can
     * affect results based on applicable law.
     *
     * For more information, see
     * http://www.unicode.org/reports/tr35/#unicode_region_subtag.
     *
     *
     * Note that 3-digit region codes are not currently supported.
     * 
* * string region_code = 3; * * @param value The regionCode to set. * @return This builder for chaining. */ public Builder setRegionCode(java.lang.String value) { if (value == null) { throw new NullPointerException(); } regionCode_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } /** * * *
     * The Unicode country/region code (CLDR) of the location where the
     * request is coming from. This parameter is used to display the place
     * details, like region-specific place name, if available. The parameter can
     * affect results based on applicable law.
     *
     * For more information, see
     * http://www.unicode.org/reports/tr35/#unicode_region_subtag.
     *
     *
     * Note that 3-digit region codes are not currently supported.
     * 
* * string region_code = 3; * * @return This builder for chaining. */ public Builder clearRegionCode() { regionCode_ = getDefaultInstance().getRegionCode(); bitField0_ = (bitField0_ & ~0x00000004); onChanged(); return this; } /** * * *
     * The Unicode country/region code (CLDR) of the location where the
     * request is coming from. This parameter is used to display the place
     * details, like region-specific place name, if available. The parameter can
     * affect results based on applicable law.
     *
     * For more information, see
     * http://www.unicode.org/reports/tr35/#unicode_region_subtag.
     *
     *
     * Note that 3-digit region codes are not currently supported.
     * 
* * string region_code = 3; * * @param value The bytes for regionCode to set. * @return This builder for chaining. */ public Builder setRegionCodeBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); regionCode_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } private int rankPreference_ = 0; /** * * *
     * How results will be ranked in the response.
     * 
* * .google.maps.places.v1.SearchTextRequest.RankPreference rank_preference = 4; * * @return The enum numeric value on the wire for rankPreference. */ @java.lang.Override public int getRankPreferenceValue() { return rankPreference_; } /** * * *
     * How results will be ranked in the response.
     * 
* * .google.maps.places.v1.SearchTextRequest.RankPreference rank_preference = 4; * * @param value The enum numeric value on the wire for rankPreference to set. * @return This builder for chaining. */ public Builder setRankPreferenceValue(int value) { rankPreference_ = value; bitField0_ |= 0x00000008; onChanged(); return this; } /** * * *
     * How results will be ranked in the response.
     * 
* * .google.maps.places.v1.SearchTextRequest.RankPreference rank_preference = 4; * * @return The rankPreference. */ @java.lang.Override public com.google.maps.places.v1.SearchTextRequest.RankPreference getRankPreference() { com.google.maps.places.v1.SearchTextRequest.RankPreference result = com.google.maps.places.v1.SearchTextRequest.RankPreference.forNumber(rankPreference_); return result == null ? com.google.maps.places.v1.SearchTextRequest.RankPreference.UNRECOGNIZED : result; } /** * * *
     * How results will be ranked in the response.
     * 
* * .google.maps.places.v1.SearchTextRequest.RankPreference rank_preference = 4; * * @param value The rankPreference to set. * @return This builder for chaining. */ public Builder setRankPreference( com.google.maps.places.v1.SearchTextRequest.RankPreference value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000008; rankPreference_ = value.getNumber(); onChanged(); return this; } /** * * *
     * How results will be ranked in the response.
     * 
* * .google.maps.places.v1.SearchTextRequest.RankPreference rank_preference = 4; * * @return This builder for chaining. */ public Builder clearRankPreference() { bitField0_ = (bitField0_ & ~0x00000008); rankPreference_ = 0; onChanged(); return this; } private java.lang.Object includedType_ = ""; /** * * *
     * The requested place type. Full list of types supported:
     * https://developers.google.com/places/supported_types. Only support one
     * included type.
     * 
* * string included_type = 6; * * @return The includedType. */ public java.lang.String getIncludedType() { java.lang.Object ref = includedType_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); includedType_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * The requested place type. Full list of types supported:
     * https://developers.google.com/places/supported_types. Only support one
     * included type.
     * 
* * string included_type = 6; * * @return The bytes for includedType. */ public com.google.protobuf.ByteString getIncludedTypeBytes() { java.lang.Object ref = includedType_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); includedType_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * The requested place type. Full list of types supported:
     * https://developers.google.com/places/supported_types. Only support one
     * included type.
     * 
* * string included_type = 6; * * @param value The includedType to set. * @return This builder for chaining. */ public Builder setIncludedType(java.lang.String value) { if (value == null) { throw new NullPointerException(); } includedType_ = value; bitField0_ |= 0x00000010; onChanged(); return this; } /** * * *
     * The requested place type. Full list of types supported:
     * https://developers.google.com/places/supported_types. Only support one
     * included type.
     * 
* * string included_type = 6; * * @return This builder for chaining. */ public Builder clearIncludedType() { includedType_ = getDefaultInstance().getIncludedType(); bitField0_ = (bitField0_ & ~0x00000010); onChanged(); return this; } /** * * *
     * The requested place type. Full list of types supported:
     * https://developers.google.com/places/supported_types. Only support one
     * included type.
     * 
* * string included_type = 6; * * @param value The bytes for includedType to set. * @return This builder for chaining. */ public Builder setIncludedTypeBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); includedType_ = value; bitField0_ |= 0x00000010; onChanged(); return this; } private boolean openNow_; /** * * *
     * Used to restrict the search to places that are open at a specific time.
     * open_now marks if a business is currently open.
     * 
* * bool open_now = 7; * * @return The openNow. */ @java.lang.Override public boolean getOpenNow() { return openNow_; } /** * * *
     * Used to restrict the search to places that are open at a specific time.
     * open_now marks if a business is currently open.
     * 
* * bool open_now = 7; * * @param value The openNow to set. * @return This builder for chaining. */ public Builder setOpenNow(boolean value) { openNow_ = value; bitField0_ |= 0x00000020; onChanged(); return this; } /** * * *
     * Used to restrict the search to places that are open at a specific time.
     * open_now marks if a business is currently open.
     * 
* * bool open_now = 7; * * @return This builder for chaining. */ public Builder clearOpenNow() { bitField0_ = (bitField0_ & ~0x00000020); openNow_ = false; onChanged(); return this; } private double minRating_; /** * * *
     * Filter out results whose average user rating is strictly less than this
     * limit. A valid value must be an float between 0 and 5 (inclusively) at a
     * 0.5 cadence i.e. [0, 0.5, 1.0, ... , 5.0] inclusively. This is to keep
     * parity with LocalRefinement_UserRating. The input rating will round up to
     * the nearest 0.5(ceiling). For instance, a rating of 0.6 will eliminate all
     * results with a less than 1.0 rating.
     * 
* * double min_rating = 9; * * @return The minRating. */ @java.lang.Override public double getMinRating() { return minRating_; } /** * * *
     * Filter out results whose average user rating is strictly less than this
     * limit. A valid value must be an float between 0 and 5 (inclusively) at a
     * 0.5 cadence i.e. [0, 0.5, 1.0, ... , 5.0] inclusively. This is to keep
     * parity with LocalRefinement_UserRating. The input rating will round up to
     * the nearest 0.5(ceiling). For instance, a rating of 0.6 will eliminate all
     * results with a less than 1.0 rating.
     * 
* * double min_rating = 9; * * @param value The minRating to set. * @return This builder for chaining. */ public Builder setMinRating(double value) { minRating_ = value; bitField0_ |= 0x00000040; onChanged(); return this; } /** * * *
     * Filter out results whose average user rating is strictly less than this
     * limit. A valid value must be an float between 0 and 5 (inclusively) at a
     * 0.5 cadence i.e. [0, 0.5, 1.0, ... , 5.0] inclusively. This is to keep
     * parity with LocalRefinement_UserRating. The input rating will round up to
     * the nearest 0.5(ceiling). For instance, a rating of 0.6 will eliminate all
     * results with a less than 1.0 rating.
     * 
* * double min_rating = 9; * * @return This builder for chaining. */ public Builder clearMinRating() { bitField0_ = (bitField0_ & ~0x00000040); minRating_ = 0D; onChanged(); return this; } private int maxResultCount_; /** * * *
     * Maximum number of results to return. It must be between 1 and 20,
     * inclusively. If the number is unset, it falls back to the upper limit. If
     * the number is set to negative or exceeds the upper limit, an
     * INVALID_ARGUMENT error is returned.
     * 
* * int32 max_result_count = 10; * * @return The maxResultCount. */ @java.lang.Override public int getMaxResultCount() { return maxResultCount_; } /** * * *
     * Maximum number of results to return. It must be between 1 and 20,
     * inclusively. If the number is unset, it falls back to the upper limit. If
     * the number is set to negative or exceeds the upper limit, an
     * INVALID_ARGUMENT error is returned.
     * 
* * int32 max_result_count = 10; * * @param value The maxResultCount to set. * @return This builder for chaining. */ public Builder setMaxResultCount(int value) { maxResultCount_ = value; bitField0_ |= 0x00000080; onChanged(); return this; } /** * * *
     * Maximum number of results to return. It must be between 1 and 20,
     * inclusively. If the number is unset, it falls back to the upper limit. If
     * the number is set to negative or exceeds the upper limit, an
     * INVALID_ARGUMENT error is returned.
     * 
* * int32 max_result_count = 10; * * @return This builder for chaining. */ public Builder clearMaxResultCount() { bitField0_ = (bitField0_ & ~0x00000080); maxResultCount_ = 0; onChanged(); return this; } private java.util.List priceLevels_ = java.util.Collections.emptyList(); private void ensurePriceLevelsIsMutable() { if (!((bitField0_ & 0x00000100) != 0)) { priceLevels_ = new java.util.ArrayList(priceLevels_); bitField0_ |= 0x00000100; } } /** * * *
     * Used to restrict the search to places that are marked as certain price
     * levels. Users can choose any combinations of price levels. Default to
     * select all price levels.
     * 
* * repeated .google.maps.places.v1.PriceLevel price_levels = 11; * * @return A list containing the priceLevels. */ public java.util.List getPriceLevelsList() { return new com.google.protobuf.Internal.ListAdapter< java.lang.Integer, com.google.maps.places.v1.PriceLevel>( priceLevels_, priceLevels_converter_); } /** * * *
     * Used to restrict the search to places that are marked as certain price
     * levels. Users can choose any combinations of price levels. Default to
     * select all price levels.
     * 
* * repeated .google.maps.places.v1.PriceLevel price_levels = 11; * * @return The count of priceLevels. */ public int getPriceLevelsCount() { return priceLevels_.size(); } /** * * *
     * Used to restrict the search to places that are marked as certain price
     * levels. Users can choose any combinations of price levels. Default to
     * select all price levels.
     * 
* * repeated .google.maps.places.v1.PriceLevel price_levels = 11; * * @param index The index of the element to return. * @return The priceLevels at the given index. */ public com.google.maps.places.v1.PriceLevel getPriceLevels(int index) { return priceLevels_converter_.convert(priceLevels_.get(index)); } /** * * *
     * Used to restrict the search to places that are marked as certain price
     * levels. Users can choose any combinations of price levels. Default to
     * select all price levels.
     * 
* * repeated .google.maps.places.v1.PriceLevel price_levels = 11; * * @param index The index to set the value at. * @param value The priceLevels to set. * @return This builder for chaining. */ public Builder setPriceLevels(int index, com.google.maps.places.v1.PriceLevel value) { if (value == null) { throw new NullPointerException(); } ensurePriceLevelsIsMutable(); priceLevels_.set(index, value.getNumber()); onChanged(); return this; } /** * * *
     * Used to restrict the search to places that are marked as certain price
     * levels. Users can choose any combinations of price levels. Default to
     * select all price levels.
     * 
* * repeated .google.maps.places.v1.PriceLevel price_levels = 11; * * @param value The priceLevels to add. * @return This builder for chaining. */ public Builder addPriceLevels(com.google.maps.places.v1.PriceLevel value) { if (value == null) { throw new NullPointerException(); } ensurePriceLevelsIsMutable(); priceLevels_.add(value.getNumber()); onChanged(); return this; } /** * * *
     * Used to restrict the search to places that are marked as certain price
     * levels. Users can choose any combinations of price levels. Default to
     * select all price levels.
     * 
* * repeated .google.maps.places.v1.PriceLevel price_levels = 11; * * @param values The priceLevels to add. * @return This builder for chaining. */ public Builder addAllPriceLevels( java.lang.Iterable values) { ensurePriceLevelsIsMutable(); for (com.google.maps.places.v1.PriceLevel value : values) { priceLevels_.add(value.getNumber()); } onChanged(); return this; } /** * * *
     * Used to restrict the search to places that are marked as certain price
     * levels. Users can choose any combinations of price levels. Default to
     * select all price levels.
     * 
* * repeated .google.maps.places.v1.PriceLevel price_levels = 11; * * @return This builder for chaining. */ public Builder clearPriceLevels() { priceLevels_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000100); onChanged(); return this; } /** * * *
     * Used to restrict the search to places that are marked as certain price
     * levels. Users can choose any combinations of price levels. Default to
     * select all price levels.
     * 
* * repeated .google.maps.places.v1.PriceLevel price_levels = 11; * * @return A list containing the enum numeric values on the wire for priceLevels. */ public java.util.List getPriceLevelsValueList() { return java.util.Collections.unmodifiableList(priceLevels_); } /** * * *
     * Used to restrict the search to places that are marked as certain price
     * levels. Users can choose any combinations of price levels. Default to
     * select all price levels.
     * 
* * repeated .google.maps.places.v1.PriceLevel price_levels = 11; * * @param index The index of the value to return. * @return The enum numeric value on the wire of priceLevels at the given index. */ public int getPriceLevelsValue(int index) { return priceLevels_.get(index); } /** * * *
     * Used to restrict the search to places that are marked as certain price
     * levels. Users can choose any combinations of price levels. Default to
     * select all price levels.
     * 
* * repeated .google.maps.places.v1.PriceLevel price_levels = 11; * * @param index The index to set the value at. * @param value The enum numeric value on the wire for priceLevels to set. * @return This builder for chaining. */ public Builder setPriceLevelsValue(int index, int value) { ensurePriceLevelsIsMutable(); priceLevels_.set(index, value); onChanged(); return this; } /** * * *
     * Used to restrict the search to places that are marked as certain price
     * levels. Users can choose any combinations of price levels. Default to
     * select all price levels.
     * 
* * repeated .google.maps.places.v1.PriceLevel price_levels = 11; * * @param value The enum numeric value on the wire for priceLevels to add. * @return This builder for chaining. */ public Builder addPriceLevelsValue(int value) { ensurePriceLevelsIsMutable(); priceLevels_.add(value); onChanged(); return this; } /** * * *
     * Used to restrict the search to places that are marked as certain price
     * levels. Users can choose any combinations of price levels. Default to
     * select all price levels.
     * 
* * repeated .google.maps.places.v1.PriceLevel price_levels = 11; * * @param values The enum numeric values on the wire for priceLevels to add. * @return This builder for chaining. */ public Builder addAllPriceLevelsValue(java.lang.Iterable values) { ensurePriceLevelsIsMutable(); for (int value : values) { priceLevels_.add(value); } onChanged(); return this; } private boolean strictTypeFiltering_; /** * * *
     * Used to set strict type filtering for included_type. If set to true, only
     * results of the same type will be returned. Default to false.
     * 
* * bool strict_type_filtering = 12; * * @return The strictTypeFiltering. */ @java.lang.Override public boolean getStrictTypeFiltering() { return strictTypeFiltering_; } /** * * *
     * Used to set strict type filtering for included_type. If set to true, only
     * results of the same type will be returned. Default to false.
     * 
* * bool strict_type_filtering = 12; * * @param value The strictTypeFiltering to set. * @return This builder for chaining. */ public Builder setStrictTypeFiltering(boolean value) { strictTypeFiltering_ = value; bitField0_ |= 0x00000200; onChanged(); return this; } /** * * *
     * Used to set strict type filtering for included_type. If set to true, only
     * results of the same type will be returned. Default to false.
     * 
* * bool strict_type_filtering = 12; * * @return This builder for chaining. */ public Builder clearStrictTypeFiltering() { bitField0_ = (bitField0_ & ~0x00000200); strictTypeFiltering_ = false; onChanged(); return this; } private com.google.maps.places.v1.SearchTextRequest.LocationBias locationBias_; private com.google.protobuf.SingleFieldBuilderV3< com.google.maps.places.v1.SearchTextRequest.LocationBias, com.google.maps.places.v1.SearchTextRequest.LocationBias.Builder, com.google.maps.places.v1.SearchTextRequest.LocationBiasOrBuilder> locationBiasBuilder_; /** * * *
     * The region to search. This location serves as a bias which means results
     * around given location might be returned. Cannot be set along with
     * location_restriction.
     * 
* * .google.maps.places.v1.SearchTextRequest.LocationBias location_bias = 13; * * @return Whether the locationBias field is set. */ public boolean hasLocationBias() { return ((bitField0_ & 0x00000400) != 0); } /** * * *
     * The region to search. This location serves as a bias which means results
     * around given location might be returned. Cannot be set along with
     * location_restriction.
     * 
* * .google.maps.places.v1.SearchTextRequest.LocationBias location_bias = 13; * * @return The locationBias. */ public com.google.maps.places.v1.SearchTextRequest.LocationBias getLocationBias() { if (locationBiasBuilder_ == null) { return locationBias_ == null ? com.google.maps.places.v1.SearchTextRequest.LocationBias.getDefaultInstance() : locationBias_; } else { return locationBiasBuilder_.getMessage(); } } /** * * *
     * The region to search. This location serves as a bias which means results
     * around given location might be returned. Cannot be set along with
     * location_restriction.
     * 
* * .google.maps.places.v1.SearchTextRequest.LocationBias location_bias = 13; */ public Builder setLocationBias(com.google.maps.places.v1.SearchTextRequest.LocationBias value) { if (locationBiasBuilder_ == null) { if (value == null) { throw new NullPointerException(); } locationBias_ = value; } else { locationBiasBuilder_.setMessage(value); } bitField0_ |= 0x00000400; onChanged(); return this; } /** * * *
     * The region to search. This location serves as a bias which means results
     * around given location might be returned. Cannot be set along with
     * location_restriction.
     * 
* * .google.maps.places.v1.SearchTextRequest.LocationBias location_bias = 13; */ public Builder setLocationBias( com.google.maps.places.v1.SearchTextRequest.LocationBias.Builder builderForValue) { if (locationBiasBuilder_ == null) { locationBias_ = builderForValue.build(); } else { locationBiasBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000400; onChanged(); return this; } /** * * *
     * The region to search. This location serves as a bias which means results
     * around given location might be returned. Cannot be set along with
     * location_restriction.
     * 
* * .google.maps.places.v1.SearchTextRequest.LocationBias location_bias = 13; */ public Builder mergeLocationBias( com.google.maps.places.v1.SearchTextRequest.LocationBias value) { if (locationBiasBuilder_ == null) { if (((bitField0_ & 0x00000400) != 0) && locationBias_ != null && locationBias_ != com.google.maps.places.v1.SearchTextRequest.LocationBias.getDefaultInstance()) { getLocationBiasBuilder().mergeFrom(value); } else { locationBias_ = value; } } else { locationBiasBuilder_.mergeFrom(value); } bitField0_ |= 0x00000400; onChanged(); return this; } /** * * *
     * The region to search. This location serves as a bias which means results
     * around given location might be returned. Cannot be set along with
     * location_restriction.
     * 
* * .google.maps.places.v1.SearchTextRequest.LocationBias location_bias = 13; */ public Builder clearLocationBias() { bitField0_ = (bitField0_ & ~0x00000400); locationBias_ = null; if (locationBiasBuilder_ != null) { locationBiasBuilder_.dispose(); locationBiasBuilder_ = null; } onChanged(); return this; } /** * * *
     * The region to search. This location serves as a bias which means results
     * around given location might be returned. Cannot be set along with
     * location_restriction.
     * 
* * .google.maps.places.v1.SearchTextRequest.LocationBias location_bias = 13; */ public com.google.maps.places.v1.SearchTextRequest.LocationBias.Builder getLocationBiasBuilder() { bitField0_ |= 0x00000400; onChanged(); return getLocationBiasFieldBuilder().getBuilder(); } /** * * *
     * The region to search. This location serves as a bias which means results
     * around given location might be returned. Cannot be set along with
     * location_restriction.
     * 
* * .google.maps.places.v1.SearchTextRequest.LocationBias location_bias = 13; */ public com.google.maps.places.v1.SearchTextRequest.LocationBiasOrBuilder getLocationBiasOrBuilder() { if (locationBiasBuilder_ != null) { return locationBiasBuilder_.getMessageOrBuilder(); } else { return locationBias_ == null ? com.google.maps.places.v1.SearchTextRequest.LocationBias.getDefaultInstance() : locationBias_; } } /** * * *
     * The region to search. This location serves as a bias which means results
     * around given location might be returned. Cannot be set along with
     * location_restriction.
     * 
* * .google.maps.places.v1.SearchTextRequest.LocationBias location_bias = 13; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.maps.places.v1.SearchTextRequest.LocationBias, com.google.maps.places.v1.SearchTextRequest.LocationBias.Builder, com.google.maps.places.v1.SearchTextRequest.LocationBiasOrBuilder> getLocationBiasFieldBuilder() { if (locationBiasBuilder_ == null) { locationBiasBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.maps.places.v1.SearchTextRequest.LocationBias, com.google.maps.places.v1.SearchTextRequest.LocationBias.Builder, com.google.maps.places.v1.SearchTextRequest.LocationBiasOrBuilder>( getLocationBias(), getParentForChildren(), isClean()); locationBias_ = null; } return locationBiasBuilder_; } private com.google.maps.places.v1.SearchTextRequest.LocationRestriction locationRestriction_; private com.google.protobuf.SingleFieldBuilderV3< com.google.maps.places.v1.SearchTextRequest.LocationRestriction, com.google.maps.places.v1.SearchTextRequest.LocationRestriction.Builder, com.google.maps.places.v1.SearchTextRequest.LocationRestrictionOrBuilder> locationRestrictionBuilder_; /** * * *
     * The region to search. This location serves as a restriction which means
     * results outside given location will not be returned. Cannot be set along
     * with location_bias.
     * 
* * .google.maps.places.v1.SearchTextRequest.LocationRestriction location_restriction = 14; * * * @return Whether the locationRestriction field is set. */ public boolean hasLocationRestriction() { return ((bitField0_ & 0x00000800) != 0); } /** * * *
     * The region to search. This location serves as a restriction which means
     * results outside given location will not be returned. Cannot be set along
     * with location_bias.
     * 
* * .google.maps.places.v1.SearchTextRequest.LocationRestriction location_restriction = 14; * * * @return The locationRestriction. */ public com.google.maps.places.v1.SearchTextRequest.LocationRestriction getLocationRestriction() { if (locationRestrictionBuilder_ == null) { return locationRestriction_ == null ? com.google.maps.places.v1.SearchTextRequest.LocationRestriction.getDefaultInstance() : locationRestriction_; } else { return locationRestrictionBuilder_.getMessage(); } } /** * * *
     * The region to search. This location serves as a restriction which means
     * results outside given location will not be returned. Cannot be set along
     * with location_bias.
     * 
* * .google.maps.places.v1.SearchTextRequest.LocationRestriction location_restriction = 14; * */ public Builder setLocationRestriction( com.google.maps.places.v1.SearchTextRequest.LocationRestriction value) { if (locationRestrictionBuilder_ == null) { if (value == null) { throw new NullPointerException(); } locationRestriction_ = value; } else { locationRestrictionBuilder_.setMessage(value); } bitField0_ |= 0x00000800; onChanged(); return this; } /** * * *
     * The region to search. This location serves as a restriction which means
     * results outside given location will not be returned. Cannot be set along
     * with location_bias.
     * 
* * .google.maps.places.v1.SearchTextRequest.LocationRestriction location_restriction = 14; * */ public Builder setLocationRestriction( com.google.maps.places.v1.SearchTextRequest.LocationRestriction.Builder builderForValue) { if (locationRestrictionBuilder_ == null) { locationRestriction_ = builderForValue.build(); } else { locationRestrictionBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000800; onChanged(); return this; } /** * * *
     * The region to search. This location serves as a restriction which means
     * results outside given location will not be returned. Cannot be set along
     * with location_bias.
     * 
* * .google.maps.places.v1.SearchTextRequest.LocationRestriction location_restriction = 14; * */ public Builder mergeLocationRestriction( com.google.maps.places.v1.SearchTextRequest.LocationRestriction value) { if (locationRestrictionBuilder_ == null) { if (((bitField0_ & 0x00000800) != 0) && locationRestriction_ != null && locationRestriction_ != com.google.maps.places.v1.SearchTextRequest.LocationRestriction .getDefaultInstance()) { getLocationRestrictionBuilder().mergeFrom(value); } else { locationRestriction_ = value; } } else { locationRestrictionBuilder_.mergeFrom(value); } bitField0_ |= 0x00000800; onChanged(); return this; } /** * * *
     * The region to search. This location serves as a restriction which means
     * results outside given location will not be returned. Cannot be set along
     * with location_bias.
     * 
* * .google.maps.places.v1.SearchTextRequest.LocationRestriction location_restriction = 14; * */ public Builder clearLocationRestriction() { bitField0_ = (bitField0_ & ~0x00000800); locationRestriction_ = null; if (locationRestrictionBuilder_ != null) { locationRestrictionBuilder_.dispose(); locationRestrictionBuilder_ = null; } onChanged(); return this; } /** * * *
     * The region to search. This location serves as a restriction which means
     * results outside given location will not be returned. Cannot be set along
     * with location_bias.
     * 
* * .google.maps.places.v1.SearchTextRequest.LocationRestriction location_restriction = 14; * */ public com.google.maps.places.v1.SearchTextRequest.LocationRestriction.Builder getLocationRestrictionBuilder() { bitField0_ |= 0x00000800; onChanged(); return getLocationRestrictionFieldBuilder().getBuilder(); } /** * * *
     * The region to search. This location serves as a restriction which means
     * results outside given location will not be returned. Cannot be set along
     * with location_bias.
     * 
* * .google.maps.places.v1.SearchTextRequest.LocationRestriction location_restriction = 14; * */ public com.google.maps.places.v1.SearchTextRequest.LocationRestrictionOrBuilder getLocationRestrictionOrBuilder() { if (locationRestrictionBuilder_ != null) { return locationRestrictionBuilder_.getMessageOrBuilder(); } else { return locationRestriction_ == null ? com.google.maps.places.v1.SearchTextRequest.LocationRestriction.getDefaultInstance() : locationRestriction_; } } /** * * *
     * The region to search. This location serves as a restriction which means
     * results outside given location will not be returned. Cannot be set along
     * with location_bias.
     * 
* * .google.maps.places.v1.SearchTextRequest.LocationRestriction location_restriction = 14; * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.maps.places.v1.SearchTextRequest.LocationRestriction, com.google.maps.places.v1.SearchTextRequest.LocationRestriction.Builder, com.google.maps.places.v1.SearchTextRequest.LocationRestrictionOrBuilder> getLocationRestrictionFieldBuilder() { if (locationRestrictionBuilder_ == null) { locationRestrictionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.maps.places.v1.SearchTextRequest.LocationRestriction, com.google.maps.places.v1.SearchTextRequest.LocationRestriction.Builder, com.google.maps.places.v1.SearchTextRequest.LocationRestrictionOrBuilder>( getLocationRestriction(), getParentForChildren(), isClean()); locationRestriction_ = null; } return locationRestrictionBuilder_; } @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:google.maps.places.v1.SearchTextRequest) } // @@protoc_insertion_point(class_scope:google.maps.places.v1.SearchTextRequest) private static final com.google.maps.places.v1.SearchTextRequest DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.maps.places.v1.SearchTextRequest(); } public static com.google.maps.places.v1.SearchTextRequest getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public SearchTextRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public com.google.maps.places.v1.SearchTextRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy