com.google.maps.places.v1.SearchNearbyRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of proto-google-maps-places-v1 Show documentation
Show all versions of proto-google-maps-places-v1 Show documentation
Proto library for google-maps-places
/*
* 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 Search Nearby.
*
*
* Protobuf type {@code google.maps.places.v1.SearchNearbyRequest}
*/
public final class SearchNearbyRequest extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.maps.places.v1.SearchNearbyRequest)
SearchNearbyRequestOrBuilder {
private static final long serialVersionUID = 0L;
// Use SearchNearbyRequest.newBuilder() to construct.
private SearchNearbyRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private SearchNearbyRequest() {
languageCode_ = "";
regionCode_ = "";
includedTypes_ = com.google.protobuf.LazyStringArrayList.emptyList();
excludedTypes_ = com.google.protobuf.LazyStringArrayList.emptyList();
includedPrimaryTypes_ = com.google.protobuf.LazyStringArrayList.emptyList();
excludedPrimaryTypes_ = com.google.protobuf.LazyStringArrayList.emptyList();
rankPreference_ = 0;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new SearchNearbyRequest();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.maps.places.v1.PlacesServiceProto
.internal_static_google_maps_places_v1_SearchNearbyRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.maps.places.v1.PlacesServiceProto
.internal_static_google_maps_places_v1_SearchNearbyRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.maps.places.v1.SearchNearbyRequest.class,
com.google.maps.places.v1.SearchNearbyRequest.Builder.class);
}
/**
*
*
*
* How results will be ranked in the response.
*
*
* Protobuf enum {@code google.maps.places.v1.SearchNearbyRequest.RankPreference}
*/
public enum RankPreference implements com.google.protobuf.ProtocolMessageEnum {
/**
*
*
*
* RankPreference value not set. Will use rank by POPULARITY by default.
*
*
* RANK_PREFERENCE_UNSPECIFIED = 0;
*/
RANK_PREFERENCE_UNSPECIFIED(0),
/**
*
*
*
* Ranks results by distance.
*
*
* DISTANCE = 1;
*/
DISTANCE(1),
/**
*
*
*
* Ranks results by popularity.
*
*
* POPULARITY = 2;
*/
POPULARITY(2),
UNRECOGNIZED(-1),
;
/**
*
*
*
* RankPreference value not set. Will use rank by POPULARITY by default.
*
*
* 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 popularity.
*
*
* POPULARITY = 2;
*/
public static final int POPULARITY_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 POPULARITY;
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.SearchNearbyRequest.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.SearchNearbyRequest.RankPreference)
}
public interface LocationRestrictionOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.maps.places.v1.SearchNearbyRequest.LocationRestriction)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* 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.SearchNearbyRequest.LocationRestriction.TypeCase getTypeCase();
}
/**
*
*
*
* The region to search.
*
*
* Protobuf type {@code google.maps.places.v1.SearchNearbyRequest.LocationRestriction}
*/
public static final class LocationRestriction extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.maps.places.v1.SearchNearbyRequest.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_SearchNearbyRequest_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_SearchNearbyRequest_LocationRestriction_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.maps.places.v1.SearchNearbyRequest.LocationRestriction.class,
com.google.maps.places.v1.SearchNearbyRequest.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 {
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 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 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_ == 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_ == 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.SearchNearbyRequest.LocationRestriction)) {
return super.equals(obj);
}
com.google.maps.places.v1.SearchNearbyRequest.LocationRestriction other =
(com.google.maps.places.v1.SearchNearbyRequest.LocationRestriction) obj;
if (!getTypeCase().equals(other.getTypeCase())) return false;
switch (typeCase_) {
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 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.SearchNearbyRequest.LocationRestriction parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.maps.places.v1.SearchNearbyRequest.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.SearchNearbyRequest.LocationRestriction parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.maps.places.v1.SearchNearbyRequest.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.SearchNearbyRequest.LocationRestriction parseFrom(
byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.maps.places.v1.SearchNearbyRequest.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.SearchNearbyRequest.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.SearchNearbyRequest.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.SearchNearbyRequest.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.SearchNearbyRequest.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.SearchNearbyRequest.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.SearchNearbyRequest.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.SearchNearbyRequest.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.
*
*
* Protobuf type {@code google.maps.places.v1.SearchNearbyRequest.LocationRestriction}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.maps.places.v1.SearchNearbyRequest.LocationRestriction)
com.google.maps.places.v1.SearchNearbyRequest.LocationRestrictionOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.maps.places.v1.PlacesServiceProto
.internal_static_google_maps_places_v1_SearchNearbyRequest_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_SearchNearbyRequest_LocationRestriction_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.maps.places.v1.SearchNearbyRequest.LocationRestriction.class,
com.google.maps.places.v1.SearchNearbyRequest.LocationRestriction.Builder.class);
}
// Construct using
// com.google.maps.places.v1.SearchNearbyRequest.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 (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_SearchNearbyRequest_LocationRestriction_descriptor;
}
@java.lang.Override
public com.google.maps.places.v1.SearchNearbyRequest.LocationRestriction
getDefaultInstanceForType() {
return com.google.maps.places.v1.SearchNearbyRequest.LocationRestriction
.getDefaultInstance();
}
@java.lang.Override
public com.google.maps.places.v1.SearchNearbyRequest.LocationRestriction build() {
com.google.maps.places.v1.SearchNearbyRequest.LocationRestriction result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.maps.places.v1.SearchNearbyRequest.LocationRestriction buildPartial() {
com.google.maps.places.v1.SearchNearbyRequest.LocationRestriction result =
new com.google.maps.places.v1.SearchNearbyRequest.LocationRestriction(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
buildPartialOneofs(result);
onBuilt();
return result;
}
private void buildPartial0(
com.google.maps.places.v1.SearchNearbyRequest.LocationRestriction result) {
int from_bitField0_ = bitField0_;
}
private void buildPartialOneofs(
com.google.maps.places.v1.SearchNearbyRequest.LocationRestriction result) {
result.typeCase_ = typeCase_;
result.type_ = this.type_;
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.SearchNearbyRequest.LocationRestriction) {
return mergeFrom(
(com.google.maps.places.v1.SearchNearbyRequest.LocationRestriction) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(
com.google.maps.places.v1.SearchNearbyRequest.LocationRestriction other) {
if (other
== com.google.maps.places.v1.SearchNearbyRequest.LocationRestriction
.getDefaultInstance()) return this;
switch (other.getTypeCase()) {
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 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.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.SearchNearbyRequest.LocationRestriction)
}
// @@protoc_insertion_point(class_scope:google.maps.places.v1.SearchNearbyRequest.LocationRestriction)
private static final com.google.maps.places.v1.SearchNearbyRequest.LocationRestriction
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.maps.places.v1.SearchNearbyRequest.LocationRestriction();
}
public static com.google.maps.places.v1.SearchNearbyRequest.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.SearchNearbyRequest.LocationRestriction
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public static final int LANGUAGE_CODE_FIELD_NUMBER = 1;
@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 = 1;
*
* @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 = 1;
*
* @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 = 2;
@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 = 2;
*
* @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 = 2;
*
* @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 INCLUDED_TYPES_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList includedTypes_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
*
*
* Included Place type (eg, "restaurant" or "gas_station") from
* https://developers.google.com/places/supported_types.
*
* If there are any conflicting types, i.e. a type appears in both
* included_types and excluded_types, an INVALID_ARGUMENT error is
* returned.
*
* If a Place type is specified with multiple type restrictions, only places
* that satisfy all of the restrictions are returned. For example, if we
* have {included_types = ["restaurant"], excluded_primary_types =
* ["restaurant"]}, the returned places are POIs that provide "restaurant"
* related services but do not operate primarily as "restaurants".
*
*
* repeated string included_types = 3;
*
* @return A list containing the includedTypes.
*/
public com.google.protobuf.ProtocolStringList getIncludedTypesList() {
return includedTypes_;
}
/**
*
*
*
* Included Place type (eg, "restaurant" or "gas_station") from
* https://developers.google.com/places/supported_types.
*
* If there are any conflicting types, i.e. a type appears in both
* included_types and excluded_types, an INVALID_ARGUMENT error is
* returned.
*
* If a Place type is specified with multiple type restrictions, only places
* that satisfy all of the restrictions are returned. For example, if we
* have {included_types = ["restaurant"], excluded_primary_types =
* ["restaurant"]}, the returned places are POIs that provide "restaurant"
* related services but do not operate primarily as "restaurants".
*
*
* repeated string included_types = 3;
*
* @return The count of includedTypes.
*/
public int getIncludedTypesCount() {
return includedTypes_.size();
}
/**
*
*
*
* Included Place type (eg, "restaurant" or "gas_station") from
* https://developers.google.com/places/supported_types.
*
* If there are any conflicting types, i.e. a type appears in both
* included_types and excluded_types, an INVALID_ARGUMENT error is
* returned.
*
* If a Place type is specified with multiple type restrictions, only places
* that satisfy all of the restrictions are returned. For example, if we
* have {included_types = ["restaurant"], excluded_primary_types =
* ["restaurant"]}, the returned places are POIs that provide "restaurant"
* related services but do not operate primarily as "restaurants".
*
*
* repeated string included_types = 3;
*
* @param index The index of the element to return.
* @return The includedTypes at the given index.
*/
public java.lang.String getIncludedTypes(int index) {
return includedTypes_.get(index);
}
/**
*
*
*
* Included Place type (eg, "restaurant" or "gas_station") from
* https://developers.google.com/places/supported_types.
*
* If there are any conflicting types, i.e. a type appears in both
* included_types and excluded_types, an INVALID_ARGUMENT error is
* returned.
*
* If a Place type is specified with multiple type restrictions, only places
* that satisfy all of the restrictions are returned. For example, if we
* have {included_types = ["restaurant"], excluded_primary_types =
* ["restaurant"]}, the returned places are POIs that provide "restaurant"
* related services but do not operate primarily as "restaurants".
*
*
* repeated string included_types = 3;
*
* @param index The index of the value to return.
* @return The bytes of the includedTypes at the given index.
*/
public com.google.protobuf.ByteString getIncludedTypesBytes(int index) {
return includedTypes_.getByteString(index);
}
public static final int EXCLUDED_TYPES_FIELD_NUMBER = 4;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList excludedTypes_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
*
*
* Excluded Place type (eg, "restaurant" or "gas_station") from
* https://developers.google.com/places/supported_types.
*
* If the client provides both included_types (e.g. restaurant) and
* excluded_types (e.g. cafe), then the response should include places that
* are restaurant but not cafe. The response includes places that match at
* least one of the included_types and none of the excluded_types.
*
* If there are any conflicting types, i.e. a type appears in both
* included_types and excluded_types, an INVALID_ARGUMENT error is returned.
*
* If a Place type is specified with multiple type restrictions, only places
* that satisfy all of the restrictions are returned. For example, if we
* have {included_types = ["restaurant"], excluded_primary_types =
* ["restaurant"]}, the returned places are POIs that provide "restaurant"
* related services but do not operate primarily as "restaurants".
*
*
* repeated string excluded_types = 4;
*
* @return A list containing the excludedTypes.
*/
public com.google.protobuf.ProtocolStringList getExcludedTypesList() {
return excludedTypes_;
}
/**
*
*
*
* Excluded Place type (eg, "restaurant" or "gas_station") from
* https://developers.google.com/places/supported_types.
*
* If the client provides both included_types (e.g. restaurant) and
* excluded_types (e.g. cafe), then the response should include places that
* are restaurant but not cafe. The response includes places that match at
* least one of the included_types and none of the excluded_types.
*
* If there are any conflicting types, i.e. a type appears in both
* included_types and excluded_types, an INVALID_ARGUMENT error is returned.
*
* If a Place type is specified with multiple type restrictions, only places
* that satisfy all of the restrictions are returned. For example, if we
* have {included_types = ["restaurant"], excluded_primary_types =
* ["restaurant"]}, the returned places are POIs that provide "restaurant"
* related services but do not operate primarily as "restaurants".
*
*
* repeated string excluded_types = 4;
*
* @return The count of excludedTypes.
*/
public int getExcludedTypesCount() {
return excludedTypes_.size();
}
/**
*
*
*
* Excluded Place type (eg, "restaurant" or "gas_station") from
* https://developers.google.com/places/supported_types.
*
* If the client provides both included_types (e.g. restaurant) and
* excluded_types (e.g. cafe), then the response should include places that
* are restaurant but not cafe. The response includes places that match at
* least one of the included_types and none of the excluded_types.
*
* If there are any conflicting types, i.e. a type appears in both
* included_types and excluded_types, an INVALID_ARGUMENT error is returned.
*
* If a Place type is specified with multiple type restrictions, only places
* that satisfy all of the restrictions are returned. For example, if we
* have {included_types = ["restaurant"], excluded_primary_types =
* ["restaurant"]}, the returned places are POIs that provide "restaurant"
* related services but do not operate primarily as "restaurants".
*
*
* repeated string excluded_types = 4;
*
* @param index The index of the element to return.
* @return The excludedTypes at the given index.
*/
public java.lang.String getExcludedTypes(int index) {
return excludedTypes_.get(index);
}
/**
*
*
*
* Excluded Place type (eg, "restaurant" or "gas_station") from
* https://developers.google.com/places/supported_types.
*
* If the client provides both included_types (e.g. restaurant) and
* excluded_types (e.g. cafe), then the response should include places that
* are restaurant but not cafe. The response includes places that match at
* least one of the included_types and none of the excluded_types.
*
* If there are any conflicting types, i.e. a type appears in both
* included_types and excluded_types, an INVALID_ARGUMENT error is returned.
*
* If a Place type is specified with multiple type restrictions, only places
* that satisfy all of the restrictions are returned. For example, if we
* have {included_types = ["restaurant"], excluded_primary_types =
* ["restaurant"]}, the returned places are POIs that provide "restaurant"
* related services but do not operate primarily as "restaurants".
*
*
* repeated string excluded_types = 4;
*
* @param index The index of the value to return.
* @return The bytes of the excludedTypes at the given index.
*/
public com.google.protobuf.ByteString getExcludedTypesBytes(int index) {
return excludedTypes_.getByteString(index);
}
public static final int INCLUDED_PRIMARY_TYPES_FIELD_NUMBER = 5;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList includedPrimaryTypes_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
*
*
* Included primary Place type (e.g. "restaurant" or "gas_station") from
* https://developers.google.com/places/supported_types.
*
* If there are any conflicting primary types, i.e. a type appears in both
* included_primary_types and excluded_primary_types, an INVALID_ARGUMENT
* error is returned.
*
* If a Place type is specified with multiple type restrictions, only places
* that satisfy all of the restrictions are returned. For example, if we
* have {included_types = ["restaurant"], excluded_primary_types =
* ["restaurant"]}, the returned places are POIs that provide "restaurant"
* related services but do not operate primarily as "restaurants".
*
*
* repeated string included_primary_types = 5;
*
* @return A list containing the includedPrimaryTypes.
*/
public com.google.protobuf.ProtocolStringList getIncludedPrimaryTypesList() {
return includedPrimaryTypes_;
}
/**
*
*
*
* Included primary Place type (e.g. "restaurant" or "gas_station") from
* https://developers.google.com/places/supported_types.
*
* If there are any conflicting primary types, i.e. a type appears in both
* included_primary_types and excluded_primary_types, an INVALID_ARGUMENT
* error is returned.
*
* If a Place type is specified with multiple type restrictions, only places
* that satisfy all of the restrictions are returned. For example, if we
* have {included_types = ["restaurant"], excluded_primary_types =
* ["restaurant"]}, the returned places are POIs that provide "restaurant"
* related services but do not operate primarily as "restaurants".
*
*
* repeated string included_primary_types = 5;
*
* @return The count of includedPrimaryTypes.
*/
public int getIncludedPrimaryTypesCount() {
return includedPrimaryTypes_.size();
}
/**
*
*
*
* Included primary Place type (e.g. "restaurant" or "gas_station") from
* https://developers.google.com/places/supported_types.
*
* If there are any conflicting primary types, i.e. a type appears in both
* included_primary_types and excluded_primary_types, an INVALID_ARGUMENT
* error is returned.
*
* If a Place type is specified with multiple type restrictions, only places
* that satisfy all of the restrictions are returned. For example, if we
* have {included_types = ["restaurant"], excluded_primary_types =
* ["restaurant"]}, the returned places are POIs that provide "restaurant"
* related services but do not operate primarily as "restaurants".
*
*
* repeated string included_primary_types = 5;
*
* @param index The index of the element to return.
* @return The includedPrimaryTypes at the given index.
*/
public java.lang.String getIncludedPrimaryTypes(int index) {
return includedPrimaryTypes_.get(index);
}
/**
*
*
*
* Included primary Place type (e.g. "restaurant" or "gas_station") from
* https://developers.google.com/places/supported_types.
*
* If there are any conflicting primary types, i.e. a type appears in both
* included_primary_types and excluded_primary_types, an INVALID_ARGUMENT
* error is returned.
*
* If a Place type is specified with multiple type restrictions, only places
* that satisfy all of the restrictions are returned. For example, if we
* have {included_types = ["restaurant"], excluded_primary_types =
* ["restaurant"]}, the returned places are POIs that provide "restaurant"
* related services but do not operate primarily as "restaurants".
*
*
* repeated string included_primary_types = 5;
*
* @param index The index of the value to return.
* @return The bytes of the includedPrimaryTypes at the given index.
*/
public com.google.protobuf.ByteString getIncludedPrimaryTypesBytes(int index) {
return includedPrimaryTypes_.getByteString(index);
}
public static final int EXCLUDED_PRIMARY_TYPES_FIELD_NUMBER = 6;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList excludedPrimaryTypes_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
*
*
* Excluded primary Place type (e.g. "restaurant" or "gas_station") from
* https://developers.google.com/places/supported_types.
*
* If there are any conflicting primary types, i.e. a type appears in both
* included_primary_types and excluded_primary_types, an INVALID_ARGUMENT
* error is returned.
*
* If a Place type is specified with multiple type restrictions, only places
* that satisfy all of the restrictions are returned. For example, if we
* have {included_types = ["restaurant"], excluded_primary_types =
* ["restaurant"]}, the returned places are POIs that provide "restaurant"
* related services but do not operate primarily as "restaurants".
*
*
* repeated string excluded_primary_types = 6;
*
* @return A list containing the excludedPrimaryTypes.
*/
public com.google.protobuf.ProtocolStringList getExcludedPrimaryTypesList() {
return excludedPrimaryTypes_;
}
/**
*
*
*
* Excluded primary Place type (e.g. "restaurant" or "gas_station") from
* https://developers.google.com/places/supported_types.
*
* If there are any conflicting primary types, i.e. a type appears in both
* included_primary_types and excluded_primary_types, an INVALID_ARGUMENT
* error is returned.
*
* If a Place type is specified with multiple type restrictions, only places
* that satisfy all of the restrictions are returned. For example, if we
* have {included_types = ["restaurant"], excluded_primary_types =
* ["restaurant"]}, the returned places are POIs that provide "restaurant"
* related services but do not operate primarily as "restaurants".
*
*
* repeated string excluded_primary_types = 6;
*
* @return The count of excludedPrimaryTypes.
*/
public int getExcludedPrimaryTypesCount() {
return excludedPrimaryTypes_.size();
}
/**
*
*
*
* Excluded primary Place type (e.g. "restaurant" or "gas_station") from
* https://developers.google.com/places/supported_types.
*
* If there are any conflicting primary types, i.e. a type appears in both
* included_primary_types and excluded_primary_types, an INVALID_ARGUMENT
* error is returned.
*
* If a Place type is specified with multiple type restrictions, only places
* that satisfy all of the restrictions are returned. For example, if we
* have {included_types = ["restaurant"], excluded_primary_types =
* ["restaurant"]}, the returned places are POIs that provide "restaurant"
* related services but do not operate primarily as "restaurants".
*
*
* repeated string excluded_primary_types = 6;
*
* @param index The index of the element to return.
* @return The excludedPrimaryTypes at the given index.
*/
public java.lang.String getExcludedPrimaryTypes(int index) {
return excludedPrimaryTypes_.get(index);
}
/**
*
*
*
* Excluded primary Place type (e.g. "restaurant" or "gas_station") from
* https://developers.google.com/places/supported_types.
*
* If there are any conflicting primary types, i.e. a type appears in both
* included_primary_types and excluded_primary_types, an INVALID_ARGUMENT
* error is returned.
*
* If a Place type is specified with multiple type restrictions, only places
* that satisfy all of the restrictions are returned. For example, if we
* have {included_types = ["restaurant"], excluded_primary_types =
* ["restaurant"]}, the returned places are POIs that provide "restaurant"
* related services but do not operate primarily as "restaurants".
*
*
* repeated string excluded_primary_types = 6;
*
* @param index The index of the value to return.
* @return The bytes of the excludedPrimaryTypes at the given index.
*/
public com.google.protobuf.ByteString getExcludedPrimaryTypesBytes(int index) {
return excludedPrimaryTypes_.getByteString(index);
}
public static final int MAX_RESULT_COUNT_FIELD_NUMBER = 7;
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 = 7;
*
* @return The maxResultCount.
*/
@java.lang.Override
public int getMaxResultCount() {
return maxResultCount_;
}
public static final int LOCATION_RESTRICTION_FIELD_NUMBER = 8;
private com.google.maps.places.v1.SearchNearbyRequest.LocationRestriction locationRestriction_;
/**
*
*
*
* Required. The region to search.
*
*
*
* .google.maps.places.v1.SearchNearbyRequest.LocationRestriction location_restriction = 8 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return Whether the locationRestriction field is set.
*/
@java.lang.Override
public boolean hasLocationRestriction() {
return locationRestriction_ != null;
}
/**
*
*
*
* Required. The region to search.
*
*
*
* .google.maps.places.v1.SearchNearbyRequest.LocationRestriction location_restriction = 8 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return The locationRestriction.
*/
@java.lang.Override
public com.google.maps.places.v1.SearchNearbyRequest.LocationRestriction
getLocationRestriction() {
return locationRestriction_ == null
? com.google.maps.places.v1.SearchNearbyRequest.LocationRestriction.getDefaultInstance()
: locationRestriction_;
}
/**
*
*
*
* Required. The region to search.
*
*
*
* .google.maps.places.v1.SearchNearbyRequest.LocationRestriction location_restriction = 8 [(.google.api.field_behavior) = REQUIRED];
*
*/
@java.lang.Override
public com.google.maps.places.v1.SearchNearbyRequest.LocationRestrictionOrBuilder
getLocationRestrictionOrBuilder() {
return locationRestriction_ == null
? com.google.maps.places.v1.SearchNearbyRequest.LocationRestriction.getDefaultInstance()
: locationRestriction_;
}
public static final int RANK_PREFERENCE_FIELD_NUMBER = 9;
private int rankPreference_ = 0;
/**
*
*
*
* How results will be ranked in the response.
*
*
* .google.maps.places.v1.SearchNearbyRequest.RankPreference rank_preference = 9;
*
* @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.SearchNearbyRequest.RankPreference rank_preference = 9;
*
* @return The rankPreference.
*/
@java.lang.Override
public com.google.maps.places.v1.SearchNearbyRequest.RankPreference getRankPreference() {
com.google.maps.places.v1.SearchNearbyRequest.RankPreference result =
com.google.maps.places.v1.SearchNearbyRequest.RankPreference.forNumber(rankPreference_);
return result == null
? com.google.maps.places.v1.SearchNearbyRequest.RankPreference.UNRECOGNIZED
: result;
}
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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, languageCode_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(regionCode_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, regionCode_);
}
for (int i = 0; i < includedTypes_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, includedTypes_.getRaw(i));
}
for (int i = 0; i < excludedTypes_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, excludedTypes_.getRaw(i));
}
for (int i = 0; i < includedPrimaryTypes_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(
output, 5, includedPrimaryTypes_.getRaw(i));
}
for (int i = 0; i < excludedPrimaryTypes_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(
output, 6, excludedPrimaryTypes_.getRaw(i));
}
if (maxResultCount_ != 0) {
output.writeInt32(7, maxResultCount_);
}
if (locationRestriction_ != null) {
output.writeMessage(8, getLocationRestriction());
}
if (rankPreference_
!= com.google.maps.places.v1.SearchNearbyRequest.RankPreference.RANK_PREFERENCE_UNSPECIFIED
.getNumber()) {
output.writeEnum(9, rankPreference_);
}
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(languageCode_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, languageCode_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(regionCode_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, regionCode_);
}
{
int dataSize = 0;
for (int i = 0; i < includedTypes_.size(); i++) {
dataSize += computeStringSizeNoTag(includedTypes_.getRaw(i));
}
size += dataSize;
size += 1 * getIncludedTypesList().size();
}
{
int dataSize = 0;
for (int i = 0; i < excludedTypes_.size(); i++) {
dataSize += computeStringSizeNoTag(excludedTypes_.getRaw(i));
}
size += dataSize;
size += 1 * getExcludedTypesList().size();
}
{
int dataSize = 0;
for (int i = 0; i < includedPrimaryTypes_.size(); i++) {
dataSize += computeStringSizeNoTag(includedPrimaryTypes_.getRaw(i));
}
size += dataSize;
size += 1 * getIncludedPrimaryTypesList().size();
}
{
int dataSize = 0;
for (int i = 0; i < excludedPrimaryTypes_.size(); i++) {
dataSize += computeStringSizeNoTag(excludedPrimaryTypes_.getRaw(i));
}
size += dataSize;
size += 1 * getExcludedPrimaryTypesList().size();
}
if (maxResultCount_ != 0) {
size += com.google.protobuf.CodedOutputStream.computeInt32Size(7, maxResultCount_);
}
if (locationRestriction_ != null) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getLocationRestriction());
}
if (rankPreference_
!= com.google.maps.places.v1.SearchNearbyRequest.RankPreference.RANK_PREFERENCE_UNSPECIFIED
.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(9, rankPreference_);
}
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.SearchNearbyRequest)) {
return super.equals(obj);
}
com.google.maps.places.v1.SearchNearbyRequest other =
(com.google.maps.places.v1.SearchNearbyRequest) obj;
if (!getLanguageCode().equals(other.getLanguageCode())) return false;
if (!getRegionCode().equals(other.getRegionCode())) return false;
if (!getIncludedTypesList().equals(other.getIncludedTypesList())) return false;
if (!getExcludedTypesList().equals(other.getExcludedTypesList())) return false;
if (!getIncludedPrimaryTypesList().equals(other.getIncludedPrimaryTypesList())) return false;
if (!getExcludedPrimaryTypesList().equals(other.getExcludedPrimaryTypesList())) return false;
if (getMaxResultCount() != other.getMaxResultCount()) return false;
if (hasLocationRestriction() != other.hasLocationRestriction()) return false;
if (hasLocationRestriction()) {
if (!getLocationRestriction().equals(other.getLocationRestriction())) return false;
}
if (rankPreference_ != other.rankPreference_) 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) + LANGUAGE_CODE_FIELD_NUMBER;
hash = (53 * hash) + getLanguageCode().hashCode();
hash = (37 * hash) + REGION_CODE_FIELD_NUMBER;
hash = (53 * hash) + getRegionCode().hashCode();
if (getIncludedTypesCount() > 0) {
hash = (37 * hash) + INCLUDED_TYPES_FIELD_NUMBER;
hash = (53 * hash) + getIncludedTypesList().hashCode();
}
if (getExcludedTypesCount() > 0) {
hash = (37 * hash) + EXCLUDED_TYPES_FIELD_NUMBER;
hash = (53 * hash) + getExcludedTypesList().hashCode();
}
if (getIncludedPrimaryTypesCount() > 0) {
hash = (37 * hash) + INCLUDED_PRIMARY_TYPES_FIELD_NUMBER;
hash = (53 * hash) + getIncludedPrimaryTypesList().hashCode();
}
if (getExcludedPrimaryTypesCount() > 0) {
hash = (37 * hash) + EXCLUDED_PRIMARY_TYPES_FIELD_NUMBER;
hash = (53 * hash) + getExcludedPrimaryTypesList().hashCode();
}
hash = (37 * hash) + MAX_RESULT_COUNT_FIELD_NUMBER;
hash = (53 * hash) + getMaxResultCount();
if (hasLocationRestriction()) {
hash = (37 * hash) + LOCATION_RESTRICTION_FIELD_NUMBER;
hash = (53 * hash) + getLocationRestriction().hashCode();
}
hash = (37 * hash) + RANK_PREFERENCE_FIELD_NUMBER;
hash = (53 * hash) + rankPreference_;
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.maps.places.v1.SearchNearbyRequest parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.maps.places.v1.SearchNearbyRequest 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.SearchNearbyRequest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.maps.places.v1.SearchNearbyRequest 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.SearchNearbyRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.maps.places.v1.SearchNearbyRequest 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.SearchNearbyRequest parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.maps.places.v1.SearchNearbyRequest 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.SearchNearbyRequest parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.maps.places.v1.SearchNearbyRequest 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.SearchNearbyRequest 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.SearchNearbyRequest 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.SearchNearbyRequest 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 Search Nearby.
*
*
* Protobuf type {@code google.maps.places.v1.SearchNearbyRequest}
*/
public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.maps.places.v1.SearchNearbyRequest)
com.google.maps.places.v1.SearchNearbyRequestOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.maps.places.v1.PlacesServiceProto
.internal_static_google_maps_places_v1_SearchNearbyRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.maps.places.v1.PlacesServiceProto
.internal_static_google_maps_places_v1_SearchNearbyRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.maps.places.v1.SearchNearbyRequest.class,
com.google.maps.places.v1.SearchNearbyRequest.Builder.class);
}
// Construct using com.google.maps.places.v1.SearchNearbyRequest.newBuilder()
private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
languageCode_ = "";
regionCode_ = "";
includedTypes_ = com.google.protobuf.LazyStringArrayList.emptyList();
excludedTypes_ = com.google.protobuf.LazyStringArrayList.emptyList();
includedPrimaryTypes_ = com.google.protobuf.LazyStringArrayList.emptyList();
excludedPrimaryTypes_ = com.google.protobuf.LazyStringArrayList.emptyList();
maxResultCount_ = 0;
locationRestriction_ = null;
if (locationRestrictionBuilder_ != null) {
locationRestrictionBuilder_.dispose();
locationRestrictionBuilder_ = null;
}
rankPreference_ = 0;
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_SearchNearbyRequest_descriptor;
}
@java.lang.Override
public com.google.maps.places.v1.SearchNearbyRequest getDefaultInstanceForType() {
return com.google.maps.places.v1.SearchNearbyRequest.getDefaultInstance();
}
@java.lang.Override
public com.google.maps.places.v1.SearchNearbyRequest build() {
com.google.maps.places.v1.SearchNearbyRequest result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.maps.places.v1.SearchNearbyRequest buildPartial() {
com.google.maps.places.v1.SearchNearbyRequest result =
new com.google.maps.places.v1.SearchNearbyRequest(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(com.google.maps.places.v1.SearchNearbyRequest result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.languageCode_ = languageCode_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.regionCode_ = regionCode_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
includedTypes_.makeImmutable();
result.includedTypes_ = includedTypes_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
excludedTypes_.makeImmutable();
result.excludedTypes_ = excludedTypes_;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
includedPrimaryTypes_.makeImmutable();
result.includedPrimaryTypes_ = includedPrimaryTypes_;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
excludedPrimaryTypes_.makeImmutable();
result.excludedPrimaryTypes_ = excludedPrimaryTypes_;
}
if (((from_bitField0_ & 0x00000040) != 0)) {
result.maxResultCount_ = maxResultCount_;
}
if (((from_bitField0_ & 0x00000080) != 0)) {
result.locationRestriction_ =
locationRestrictionBuilder_ == null
? locationRestriction_
: locationRestrictionBuilder_.build();
}
if (((from_bitField0_ & 0x00000100) != 0)) {
result.rankPreference_ = rankPreference_;
}
}
@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.SearchNearbyRequest) {
return mergeFrom((com.google.maps.places.v1.SearchNearbyRequest) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.maps.places.v1.SearchNearbyRequest other) {
if (other == com.google.maps.places.v1.SearchNearbyRequest.getDefaultInstance()) return this;
if (!other.getLanguageCode().isEmpty()) {
languageCode_ = other.languageCode_;
bitField0_ |= 0x00000001;
onChanged();
}
if (!other.getRegionCode().isEmpty()) {
regionCode_ = other.regionCode_;
bitField0_ |= 0x00000002;
onChanged();
}
if (!other.includedTypes_.isEmpty()) {
if (includedTypes_.isEmpty()) {
includedTypes_ = other.includedTypes_;
bitField0_ |= 0x00000004;
} else {
ensureIncludedTypesIsMutable();
includedTypes_.addAll(other.includedTypes_);
}
onChanged();
}
if (!other.excludedTypes_.isEmpty()) {
if (excludedTypes_.isEmpty()) {
excludedTypes_ = other.excludedTypes_;
bitField0_ |= 0x00000008;
} else {
ensureExcludedTypesIsMutable();
excludedTypes_.addAll(other.excludedTypes_);
}
onChanged();
}
if (!other.includedPrimaryTypes_.isEmpty()) {
if (includedPrimaryTypes_.isEmpty()) {
includedPrimaryTypes_ = other.includedPrimaryTypes_;
bitField0_ |= 0x00000010;
} else {
ensureIncludedPrimaryTypesIsMutable();
includedPrimaryTypes_.addAll(other.includedPrimaryTypes_);
}
onChanged();
}
if (!other.excludedPrimaryTypes_.isEmpty()) {
if (excludedPrimaryTypes_.isEmpty()) {
excludedPrimaryTypes_ = other.excludedPrimaryTypes_;
bitField0_ |= 0x00000020;
} else {
ensureExcludedPrimaryTypesIsMutable();
excludedPrimaryTypes_.addAll(other.excludedPrimaryTypes_);
}
onChanged();
}
if (other.getMaxResultCount() != 0) {
setMaxResultCount(other.getMaxResultCount());
}
if (other.hasLocationRestriction()) {
mergeLocationRestriction(other.getLocationRestriction());
}
if (other.rankPreference_ != 0) {
setRankPreferenceValue(other.getRankPreferenceValue());
}
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:
{
languageCode_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18:
{
regionCode_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
case 26:
{
java.lang.String s = input.readStringRequireUtf8();
ensureIncludedTypesIsMutable();
includedTypes_.add(s);
break;
} // case 26
case 34:
{
java.lang.String s = input.readStringRequireUtf8();
ensureExcludedTypesIsMutable();
excludedTypes_.add(s);
break;
} // case 34
case 42:
{
java.lang.String s = input.readStringRequireUtf8();
ensureIncludedPrimaryTypesIsMutable();
includedPrimaryTypes_.add(s);
break;
} // case 42
case 50:
{
java.lang.String s = input.readStringRequireUtf8();
ensureExcludedPrimaryTypesIsMutable();
excludedPrimaryTypes_.add(s);
break;
} // case 50
case 56:
{
maxResultCount_ = input.readInt32();
bitField0_ |= 0x00000040;
break;
} // case 56
case 66:
{
input.readMessage(
getLocationRestrictionFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000080;
break;
} // case 66
case 72:
{
rankPreference_ = input.readEnum();
bitField0_ |= 0x00000100;
break;
} // case 72
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 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 = 1;
*
* @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 = 1;
*
* @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 = 1;
*
* @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_ |= 0x00000001;
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 = 1;
*
* @return This builder for chaining.
*/
public Builder clearLanguageCode() {
languageCode_ = getDefaultInstance().getLanguageCode();
bitField0_ = (bitField0_ & ~0x00000001);
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 = 1;
*
* @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_ |= 0x00000001;
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 = 2;
*
* @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 = 2;
*
* @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 = 2;
*
* @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_ |= 0x00000002;
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 = 2;
*
* @return This builder for chaining.
*/
public Builder clearRegionCode() {
regionCode_ = getDefaultInstance().getRegionCode();
bitField0_ = (bitField0_ & ~0x00000002);
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 = 2;
*
* @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_ |= 0x00000002;
onChanged();
return this;
}
private com.google.protobuf.LazyStringArrayList includedTypes_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureIncludedTypesIsMutable() {
if (!includedTypes_.isModifiable()) {
includedTypes_ = new com.google.protobuf.LazyStringArrayList(includedTypes_);
}
bitField0_ |= 0x00000004;
}
/**
*
*
*
* Included Place type (eg, "restaurant" or "gas_station") from
* https://developers.google.com/places/supported_types.
*
* If there are any conflicting types, i.e. a type appears in both
* included_types and excluded_types, an INVALID_ARGUMENT error is
* returned.
*
* If a Place type is specified with multiple type restrictions, only places
* that satisfy all of the restrictions are returned. For example, if we
* have {included_types = ["restaurant"], excluded_primary_types =
* ["restaurant"]}, the returned places are POIs that provide "restaurant"
* related services but do not operate primarily as "restaurants".
*
*
* repeated string included_types = 3;
*
* @return A list containing the includedTypes.
*/
public com.google.protobuf.ProtocolStringList getIncludedTypesList() {
includedTypes_.makeImmutable();
return includedTypes_;
}
/**
*
*
*
* Included Place type (eg, "restaurant" or "gas_station") from
* https://developers.google.com/places/supported_types.
*
* If there are any conflicting types, i.e. a type appears in both
* included_types and excluded_types, an INVALID_ARGUMENT error is
* returned.
*
* If a Place type is specified with multiple type restrictions, only places
* that satisfy all of the restrictions are returned. For example, if we
* have {included_types = ["restaurant"], excluded_primary_types =
* ["restaurant"]}, the returned places are POIs that provide "restaurant"
* related services but do not operate primarily as "restaurants".
*
*
* repeated string included_types = 3;
*
* @return The count of includedTypes.
*/
public int getIncludedTypesCount() {
return includedTypes_.size();
}
/**
*
*
*
* Included Place type (eg, "restaurant" or "gas_station") from
* https://developers.google.com/places/supported_types.
*
* If there are any conflicting types, i.e. a type appears in both
* included_types and excluded_types, an INVALID_ARGUMENT error is
* returned.
*
* If a Place type is specified with multiple type restrictions, only places
* that satisfy all of the restrictions are returned. For example, if we
* have {included_types = ["restaurant"], excluded_primary_types =
* ["restaurant"]}, the returned places are POIs that provide "restaurant"
* related services but do not operate primarily as "restaurants".
*
*
* repeated string included_types = 3;
*
* @param index The index of the element to return.
* @return The includedTypes at the given index.
*/
public java.lang.String getIncludedTypes(int index) {
return includedTypes_.get(index);
}
/**
*
*
*
* Included Place type (eg, "restaurant" or "gas_station") from
* https://developers.google.com/places/supported_types.
*
* If there are any conflicting types, i.e. a type appears in both
* included_types and excluded_types, an INVALID_ARGUMENT error is
* returned.
*
* If a Place type is specified with multiple type restrictions, only places
* that satisfy all of the restrictions are returned. For example, if we
* have {included_types = ["restaurant"], excluded_primary_types =
* ["restaurant"]}, the returned places are POIs that provide "restaurant"
* related services but do not operate primarily as "restaurants".
*
*
* repeated string included_types = 3;
*
* @param index The index of the value to return.
* @return The bytes of the includedTypes at the given index.
*/
public com.google.protobuf.ByteString getIncludedTypesBytes(int index) {
return includedTypes_.getByteString(index);
}
/**
*
*
*
* Included Place type (eg, "restaurant" or "gas_station") from
* https://developers.google.com/places/supported_types.
*
* If there are any conflicting types, i.e. a type appears in both
* included_types and excluded_types, an INVALID_ARGUMENT error is
* returned.
*
* If a Place type is specified with multiple type restrictions, only places
* that satisfy all of the restrictions are returned. For example, if we
* have {included_types = ["restaurant"], excluded_primary_types =
* ["restaurant"]}, the returned places are POIs that provide "restaurant"
* related services but do not operate primarily as "restaurants".
*
*
* repeated string included_types = 3;
*
* @param index The index to set the value at.
* @param value The includedTypes to set.
* @return This builder for chaining.
*/
public Builder setIncludedTypes(int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureIncludedTypesIsMutable();
includedTypes_.set(index, value);
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* Included Place type (eg, "restaurant" or "gas_station") from
* https://developers.google.com/places/supported_types.
*
* If there are any conflicting types, i.e. a type appears in both
* included_types and excluded_types, an INVALID_ARGUMENT error is
* returned.
*
* If a Place type is specified with multiple type restrictions, only places
* that satisfy all of the restrictions are returned. For example, if we
* have {included_types = ["restaurant"], excluded_primary_types =
* ["restaurant"]}, the returned places are POIs that provide "restaurant"
* related services but do not operate primarily as "restaurants".
*
*
* repeated string included_types = 3;
*
* @param value The includedTypes to add.
* @return This builder for chaining.
*/
public Builder addIncludedTypes(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureIncludedTypesIsMutable();
includedTypes_.add(value);
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* Included Place type (eg, "restaurant" or "gas_station") from
* https://developers.google.com/places/supported_types.
*
* If there are any conflicting types, i.e. a type appears in both
* included_types and excluded_types, an INVALID_ARGUMENT error is
* returned.
*
* If a Place type is specified with multiple type restrictions, only places
* that satisfy all of the restrictions are returned. For example, if we
* have {included_types = ["restaurant"], excluded_primary_types =
* ["restaurant"]}, the returned places are POIs that provide "restaurant"
* related services but do not operate primarily as "restaurants".
*
*
* repeated string included_types = 3;
*
* @param values The includedTypes to add.
* @return This builder for chaining.
*/
public Builder addAllIncludedTypes(java.lang.Iterable values) {
ensureIncludedTypesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, includedTypes_);
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* Included Place type (eg, "restaurant" or "gas_station") from
* https://developers.google.com/places/supported_types.
*
* If there are any conflicting types, i.e. a type appears in both
* included_types and excluded_types, an INVALID_ARGUMENT error is
* returned.
*
* If a Place type is specified with multiple type restrictions, only places
* that satisfy all of the restrictions are returned. For example, if we
* have {included_types = ["restaurant"], excluded_primary_types =
* ["restaurant"]}, the returned places are POIs that provide "restaurant"
* related services but do not operate primarily as "restaurants".
*
*
* repeated string included_types = 3;
*
* @return This builder for chaining.
*/
public Builder clearIncludedTypes() {
includedTypes_ = com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);
;
onChanged();
return this;
}
/**
*
*
*
* Included Place type (eg, "restaurant" or "gas_station") from
* https://developers.google.com/places/supported_types.
*
* If there are any conflicting types, i.e. a type appears in both
* included_types and excluded_types, an INVALID_ARGUMENT error is
* returned.
*
* If a Place type is specified with multiple type restrictions, only places
* that satisfy all of the restrictions are returned. For example, if we
* have {included_types = ["restaurant"], excluded_primary_types =
* ["restaurant"]}, the returned places are POIs that provide "restaurant"
* related services but do not operate primarily as "restaurants".
*
*
* repeated string included_types = 3;
*
* @param value The bytes of the includedTypes to add.
* @return This builder for chaining.
*/
public Builder addIncludedTypesBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureIncludedTypesIsMutable();
includedTypes_.add(value);
bitField0_ |= 0x00000004;
onChanged();
return this;
}
private com.google.protobuf.LazyStringArrayList excludedTypes_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureExcludedTypesIsMutable() {
if (!excludedTypes_.isModifiable()) {
excludedTypes_ = new com.google.protobuf.LazyStringArrayList(excludedTypes_);
}
bitField0_ |= 0x00000008;
}
/**
*
*
*
* Excluded Place type (eg, "restaurant" or "gas_station") from
* https://developers.google.com/places/supported_types.
*
* If the client provides both included_types (e.g. restaurant) and
* excluded_types (e.g. cafe), then the response should include places that
* are restaurant but not cafe. The response includes places that match at
* least one of the included_types and none of the excluded_types.
*
* If there are any conflicting types, i.e. a type appears in both
* included_types and excluded_types, an INVALID_ARGUMENT error is returned.
*
* If a Place type is specified with multiple type restrictions, only places
* that satisfy all of the restrictions are returned. For example, if we
* have {included_types = ["restaurant"], excluded_primary_types =
* ["restaurant"]}, the returned places are POIs that provide "restaurant"
* related services but do not operate primarily as "restaurants".
*
*
* repeated string excluded_types = 4;
*
* @return A list containing the excludedTypes.
*/
public com.google.protobuf.ProtocolStringList getExcludedTypesList() {
excludedTypes_.makeImmutable();
return excludedTypes_;
}
/**
*
*
*
* Excluded Place type (eg, "restaurant" or "gas_station") from
* https://developers.google.com/places/supported_types.
*
* If the client provides both included_types (e.g. restaurant) and
* excluded_types (e.g. cafe), then the response should include places that
* are restaurant but not cafe. The response includes places that match at
* least one of the included_types and none of the excluded_types.
*
* If there are any conflicting types, i.e. a type appears in both
* included_types and excluded_types, an INVALID_ARGUMENT error is returned.
*
* If a Place type is specified with multiple type restrictions, only places
* that satisfy all of the restrictions are returned. For example, if we
* have {included_types = ["restaurant"], excluded_primary_types =
* ["restaurant"]}, the returned places are POIs that provide "restaurant"
* related services but do not operate primarily as "restaurants".
*
*
* repeated string excluded_types = 4;
*
* @return The count of excludedTypes.
*/
public int getExcludedTypesCount() {
return excludedTypes_.size();
}
/**
*
*
*
* Excluded Place type (eg, "restaurant" or "gas_station") from
* https://developers.google.com/places/supported_types.
*
* If the client provides both included_types (e.g. restaurant) and
* excluded_types (e.g. cafe), then the response should include places that
* are restaurant but not cafe. The response includes places that match at
* least one of the included_types and none of the excluded_types.
*
* If there are any conflicting types, i.e. a type appears in both
* included_types and excluded_types, an INVALID_ARGUMENT error is returned.
*
* If a Place type is specified with multiple type restrictions, only places
* that satisfy all of the restrictions are returned. For example, if we
* have {included_types = ["restaurant"], excluded_primary_types =
* ["restaurant"]}, the returned places are POIs that provide "restaurant"
* related services but do not operate primarily as "restaurants".
*
*
* repeated string excluded_types = 4;
*
* @param index The index of the element to return.
* @return The excludedTypes at the given index.
*/
public java.lang.String getExcludedTypes(int index) {
return excludedTypes_.get(index);
}
/**
*
*
*
* Excluded Place type (eg, "restaurant" or "gas_station") from
* https://developers.google.com/places/supported_types.
*
* If the client provides both included_types (e.g. restaurant) and
* excluded_types (e.g. cafe), then the response should include places that
* are restaurant but not cafe. The response includes places that match at
* least one of the included_types and none of the excluded_types.
*
* If there are any conflicting types, i.e. a type appears in both
* included_types and excluded_types, an INVALID_ARGUMENT error is returned.
*
* If a Place type is specified with multiple type restrictions, only places
* that satisfy all of the restrictions are returned. For example, if we
* have {included_types = ["restaurant"], excluded_primary_types =
* ["restaurant"]}, the returned places are POIs that provide "restaurant"
* related services but do not operate primarily as "restaurants".
*
*
* repeated string excluded_types = 4;
*
* @param index The index of the value to return.
* @return The bytes of the excludedTypes at the given index.
*/
public com.google.protobuf.ByteString getExcludedTypesBytes(int index) {
return excludedTypes_.getByteString(index);
}
/**
*
*
*
* Excluded Place type (eg, "restaurant" or "gas_station") from
* https://developers.google.com/places/supported_types.
*
* If the client provides both included_types (e.g. restaurant) and
* excluded_types (e.g. cafe), then the response should include places that
* are restaurant but not cafe. The response includes places that match at
* least one of the included_types and none of the excluded_types.
*
* If there are any conflicting types, i.e. a type appears in both
* included_types and excluded_types, an INVALID_ARGUMENT error is returned.
*
* If a Place type is specified with multiple type restrictions, only places
* that satisfy all of the restrictions are returned. For example, if we
* have {included_types = ["restaurant"], excluded_primary_types =
* ["restaurant"]}, the returned places are POIs that provide "restaurant"
* related services but do not operate primarily as "restaurants".
*
*
* repeated string excluded_types = 4;
*
* @param index The index to set the value at.
* @param value The excludedTypes to set.
* @return This builder for chaining.
*/
public Builder setExcludedTypes(int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureExcludedTypesIsMutable();
excludedTypes_.set(index, value);
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* Excluded Place type (eg, "restaurant" or "gas_station") from
* https://developers.google.com/places/supported_types.
*
* If the client provides both included_types (e.g. restaurant) and
* excluded_types (e.g. cafe), then the response should include places that
* are restaurant but not cafe. The response includes places that match at
* least one of the included_types and none of the excluded_types.
*
* If there are any conflicting types, i.e. a type appears in both
* included_types and excluded_types, an INVALID_ARGUMENT error is returned.
*
* If a Place type is specified with multiple type restrictions, only places
* that satisfy all of the restrictions are returned. For example, if we
* have {included_types = ["restaurant"], excluded_primary_types =
* ["restaurant"]}, the returned places are POIs that provide "restaurant"
* related services but do not operate primarily as "restaurants".
*
*
* repeated string excluded_types = 4;
*
* @param value The excludedTypes to add.
* @return This builder for chaining.
*/
public Builder addExcludedTypes(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureExcludedTypesIsMutable();
excludedTypes_.add(value);
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* Excluded Place type (eg, "restaurant" or "gas_station") from
* https://developers.google.com/places/supported_types.
*
* If the client provides both included_types (e.g. restaurant) and
* excluded_types (e.g. cafe), then the response should include places that
* are restaurant but not cafe. The response includes places that match at
* least one of the included_types and none of the excluded_types.
*
* If there are any conflicting types, i.e. a type appears in both
* included_types and excluded_types, an INVALID_ARGUMENT error is returned.
*
* If a Place type is specified with multiple type restrictions, only places
* that satisfy all of the restrictions are returned. For example, if we
* have {included_types = ["restaurant"], excluded_primary_types =
* ["restaurant"]}, the returned places are POIs that provide "restaurant"
* related services but do not operate primarily as "restaurants".
*
*
* repeated string excluded_types = 4;
*
* @param values The excludedTypes to add.
* @return This builder for chaining.
*/
public Builder addAllExcludedTypes(java.lang.Iterable values) {
ensureExcludedTypesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, excludedTypes_);
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* Excluded Place type (eg, "restaurant" or "gas_station") from
* https://developers.google.com/places/supported_types.
*
* If the client provides both included_types (e.g. restaurant) and
* excluded_types (e.g. cafe), then the response should include places that
* are restaurant but not cafe. The response includes places that match at
* least one of the included_types and none of the excluded_types.
*
* If there are any conflicting types, i.e. a type appears in both
* included_types and excluded_types, an INVALID_ARGUMENT error is returned.
*
* If a Place type is specified with multiple type restrictions, only places
* that satisfy all of the restrictions are returned. For example, if we
* have {included_types = ["restaurant"], excluded_primary_types =
* ["restaurant"]}, the returned places are POIs that provide "restaurant"
* related services but do not operate primarily as "restaurants".
*
*
* repeated string excluded_types = 4;
*
* @return This builder for chaining.
*/
public Builder clearExcludedTypes() {
excludedTypes_ = com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00000008);
;
onChanged();
return this;
}
/**
*
*
*
* Excluded Place type (eg, "restaurant" or "gas_station") from
* https://developers.google.com/places/supported_types.
*
* If the client provides both included_types (e.g. restaurant) and
* excluded_types (e.g. cafe), then the response should include places that
* are restaurant but not cafe. The response includes places that match at
* least one of the included_types and none of the excluded_types.
*
* If there are any conflicting types, i.e. a type appears in both
* included_types and excluded_types, an INVALID_ARGUMENT error is returned.
*
* If a Place type is specified with multiple type restrictions, only places
* that satisfy all of the restrictions are returned. For example, if we
* have {included_types = ["restaurant"], excluded_primary_types =
* ["restaurant"]}, the returned places are POIs that provide "restaurant"
* related services but do not operate primarily as "restaurants".
*
*
* repeated string excluded_types = 4;
*
* @param value The bytes of the excludedTypes to add.
* @return This builder for chaining.
*/
public Builder addExcludedTypesBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureExcludedTypesIsMutable();
excludedTypes_.add(value);
bitField0_ |= 0x00000008;
onChanged();
return this;
}
private com.google.protobuf.LazyStringArrayList includedPrimaryTypes_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureIncludedPrimaryTypesIsMutable() {
if (!includedPrimaryTypes_.isModifiable()) {
includedPrimaryTypes_ = new com.google.protobuf.LazyStringArrayList(includedPrimaryTypes_);
}
bitField0_ |= 0x00000010;
}
/**
*
*
*
* Included primary Place type (e.g. "restaurant" or "gas_station") from
* https://developers.google.com/places/supported_types.
*
* If there are any conflicting primary types, i.e. a type appears in both
* included_primary_types and excluded_primary_types, an INVALID_ARGUMENT
* error is returned.
*
* If a Place type is specified with multiple type restrictions, only places
* that satisfy all of the restrictions are returned. For example, if we
* have {included_types = ["restaurant"], excluded_primary_types =
* ["restaurant"]}, the returned places are POIs that provide "restaurant"
* related services but do not operate primarily as "restaurants".
*
*
* repeated string included_primary_types = 5;
*
* @return A list containing the includedPrimaryTypes.
*/
public com.google.protobuf.ProtocolStringList getIncludedPrimaryTypesList() {
includedPrimaryTypes_.makeImmutable();
return includedPrimaryTypes_;
}
/**
*
*
*
* Included primary Place type (e.g. "restaurant" or "gas_station") from
* https://developers.google.com/places/supported_types.
*
* If there are any conflicting primary types, i.e. a type appears in both
* included_primary_types and excluded_primary_types, an INVALID_ARGUMENT
* error is returned.
*
* If a Place type is specified with multiple type restrictions, only places
* that satisfy all of the restrictions are returned. For example, if we
* have {included_types = ["restaurant"], excluded_primary_types =
* ["restaurant"]}, the returned places are POIs that provide "restaurant"
* related services but do not operate primarily as "restaurants".
*
*
* repeated string included_primary_types = 5;
*
* @return The count of includedPrimaryTypes.
*/
public int getIncludedPrimaryTypesCount() {
return includedPrimaryTypes_.size();
}
/**
*
*
*
* Included primary Place type (e.g. "restaurant" or "gas_station") from
* https://developers.google.com/places/supported_types.
*
* If there are any conflicting primary types, i.e. a type appears in both
* included_primary_types and excluded_primary_types, an INVALID_ARGUMENT
* error is returned.
*
* If a Place type is specified with multiple type restrictions, only places
* that satisfy all of the restrictions are returned. For example, if we
* have {included_types = ["restaurant"], excluded_primary_types =
* ["restaurant"]}, the returned places are POIs that provide "restaurant"
* related services but do not operate primarily as "restaurants".
*
*
* repeated string included_primary_types = 5;
*
* @param index The index of the element to return.
* @return The includedPrimaryTypes at the given index.
*/
public java.lang.String getIncludedPrimaryTypes(int index) {
return includedPrimaryTypes_.get(index);
}
/**
*
*
*
* Included primary Place type (e.g. "restaurant" or "gas_station") from
* https://developers.google.com/places/supported_types.
*
* If there are any conflicting primary types, i.e. a type appears in both
* included_primary_types and excluded_primary_types, an INVALID_ARGUMENT
* error is returned.
*
* If a Place type is specified with multiple type restrictions, only places
* that satisfy all of the restrictions are returned. For example, if we
* have {included_types = ["restaurant"], excluded_primary_types =
* ["restaurant"]}, the returned places are POIs that provide "restaurant"
* related services but do not operate primarily as "restaurants".
*
*
* repeated string included_primary_types = 5;
*
* @param index The index of the value to return.
* @return The bytes of the includedPrimaryTypes at the given index.
*/
public com.google.protobuf.ByteString getIncludedPrimaryTypesBytes(int index) {
return includedPrimaryTypes_.getByteString(index);
}
/**
*
*
*
* Included primary Place type (e.g. "restaurant" or "gas_station") from
* https://developers.google.com/places/supported_types.
*
* If there are any conflicting primary types, i.e. a type appears in both
* included_primary_types and excluded_primary_types, an INVALID_ARGUMENT
* error is returned.
*
* If a Place type is specified with multiple type restrictions, only places
* that satisfy all of the restrictions are returned. For example, if we
* have {included_types = ["restaurant"], excluded_primary_types =
* ["restaurant"]}, the returned places are POIs that provide "restaurant"
* related services but do not operate primarily as "restaurants".
*
*
* repeated string included_primary_types = 5;
*
* @param index The index to set the value at.
* @param value The includedPrimaryTypes to set.
* @return This builder for chaining.
*/
public Builder setIncludedPrimaryTypes(int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureIncludedPrimaryTypesIsMutable();
includedPrimaryTypes_.set(index, value);
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*
*
* Included primary Place type (e.g. "restaurant" or "gas_station") from
* https://developers.google.com/places/supported_types.
*
* If there are any conflicting primary types, i.e. a type appears in both
* included_primary_types and excluded_primary_types, an INVALID_ARGUMENT
* error is returned.
*
* If a Place type is specified with multiple type restrictions, only places
* that satisfy all of the restrictions are returned. For example, if we
* have {included_types = ["restaurant"], excluded_primary_types =
* ["restaurant"]}, the returned places are POIs that provide "restaurant"
* related services but do not operate primarily as "restaurants".
*
*
* repeated string included_primary_types = 5;
*
* @param value The includedPrimaryTypes to add.
* @return This builder for chaining.
*/
public Builder addIncludedPrimaryTypes(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureIncludedPrimaryTypesIsMutable();
includedPrimaryTypes_.add(value);
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*
*
* Included primary Place type (e.g. "restaurant" or "gas_station") from
* https://developers.google.com/places/supported_types.
*
* If there are any conflicting primary types, i.e. a type appears in both
* included_primary_types and excluded_primary_types, an INVALID_ARGUMENT
* error is returned.
*
* If a Place type is specified with multiple type restrictions, only places
* that satisfy all of the restrictions are returned. For example, if we
* have {included_types = ["restaurant"], excluded_primary_types =
* ["restaurant"]}, the returned places are POIs that provide "restaurant"
* related services but do not operate primarily as "restaurants".
*
*
* repeated string included_primary_types = 5;
*
* @param values The includedPrimaryTypes to add.
* @return This builder for chaining.
*/
public Builder addAllIncludedPrimaryTypes(java.lang.Iterable values) {
ensureIncludedPrimaryTypesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, includedPrimaryTypes_);
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*
*
* Included primary Place type (e.g. "restaurant" or "gas_station") from
* https://developers.google.com/places/supported_types.
*
* If there are any conflicting primary types, i.e. a type appears in both
* included_primary_types and excluded_primary_types, an INVALID_ARGUMENT
* error is returned.
*
* If a Place type is specified with multiple type restrictions, only places
* that satisfy all of the restrictions are returned. For example, if we
* have {included_types = ["restaurant"], excluded_primary_types =
* ["restaurant"]}, the returned places are POIs that provide "restaurant"
* related services but do not operate primarily as "restaurants".
*
*
* repeated string included_primary_types = 5;
*
* @return This builder for chaining.
*/
public Builder clearIncludedPrimaryTypes() {
includedPrimaryTypes_ = com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00000010);
;
onChanged();
return this;
}
/**
*
*
*
* Included primary Place type (e.g. "restaurant" or "gas_station") from
* https://developers.google.com/places/supported_types.
*
* If there are any conflicting primary types, i.e. a type appears in both
* included_primary_types and excluded_primary_types, an INVALID_ARGUMENT
* error is returned.
*
* If a Place type is specified with multiple type restrictions, only places
* that satisfy all of the restrictions are returned. For example, if we
* have {included_types = ["restaurant"], excluded_primary_types =
* ["restaurant"]}, the returned places are POIs that provide "restaurant"
* related services but do not operate primarily as "restaurants".
*
*
* repeated string included_primary_types = 5;
*
* @param value The bytes of the includedPrimaryTypes to add.
* @return This builder for chaining.
*/
public Builder addIncludedPrimaryTypesBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureIncludedPrimaryTypesIsMutable();
includedPrimaryTypes_.add(value);
bitField0_ |= 0x00000010;
onChanged();
return this;
}
private com.google.protobuf.LazyStringArrayList excludedPrimaryTypes_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureExcludedPrimaryTypesIsMutable() {
if (!excludedPrimaryTypes_.isModifiable()) {
excludedPrimaryTypes_ = new com.google.protobuf.LazyStringArrayList(excludedPrimaryTypes_);
}
bitField0_ |= 0x00000020;
}
/**
*
*
*
* Excluded primary Place type (e.g. "restaurant" or "gas_station") from
* https://developers.google.com/places/supported_types.
*
* If there are any conflicting primary types, i.e. a type appears in both
* included_primary_types and excluded_primary_types, an INVALID_ARGUMENT
* error is returned.
*
* If a Place type is specified with multiple type restrictions, only places
* that satisfy all of the restrictions are returned. For example, if we
* have {included_types = ["restaurant"], excluded_primary_types =
* ["restaurant"]}, the returned places are POIs that provide "restaurant"
* related services but do not operate primarily as "restaurants".
*
*
* repeated string excluded_primary_types = 6;
*
* @return A list containing the excludedPrimaryTypes.
*/
public com.google.protobuf.ProtocolStringList getExcludedPrimaryTypesList() {
excludedPrimaryTypes_.makeImmutable();
return excludedPrimaryTypes_;
}
/**
*
*
*
* Excluded primary Place type (e.g. "restaurant" or "gas_station") from
* https://developers.google.com/places/supported_types.
*
* If there are any conflicting primary types, i.e. a type appears in both
* included_primary_types and excluded_primary_types, an INVALID_ARGUMENT
* error is returned.
*
* If a Place type is specified with multiple type restrictions, only places
* that satisfy all of the restrictions are returned. For example, if we
* have {included_types = ["restaurant"], excluded_primary_types =
* ["restaurant"]}, the returned places are POIs that provide "restaurant"
* related services but do not operate primarily as "restaurants".
*
*
* repeated string excluded_primary_types = 6;
*
* @return The count of excludedPrimaryTypes.
*/
public int getExcludedPrimaryTypesCount() {
return excludedPrimaryTypes_.size();
}
/**
*
*
*
* Excluded primary Place type (e.g. "restaurant" or "gas_station") from
* https://developers.google.com/places/supported_types.
*
* If there are any conflicting primary types, i.e. a type appears in both
* included_primary_types and excluded_primary_types, an INVALID_ARGUMENT
* error is returned.
*
* If a Place type is specified with multiple type restrictions, only places
* that satisfy all of the restrictions are returned. For example, if we
* have {included_types = ["restaurant"], excluded_primary_types =
* ["restaurant"]}, the returned places are POIs that provide "restaurant"
* related services but do not operate primarily as "restaurants".
*
*
* repeated string excluded_primary_types = 6;
*
* @param index The index of the element to return.
* @return The excludedPrimaryTypes at the given index.
*/
public java.lang.String getExcludedPrimaryTypes(int index) {
return excludedPrimaryTypes_.get(index);
}
/**
*
*
*
* Excluded primary Place type (e.g. "restaurant" or "gas_station") from
* https://developers.google.com/places/supported_types.
*
* If there are any conflicting primary types, i.e. a type appears in both
* included_primary_types and excluded_primary_types, an INVALID_ARGUMENT
* error is returned.
*
* If a Place type is specified with multiple type restrictions, only places
* that satisfy all of the restrictions are returned. For example, if we
* have {included_types = ["restaurant"], excluded_primary_types =
* ["restaurant"]}, the returned places are POIs that provide "restaurant"
* related services but do not operate primarily as "restaurants".
*
*
* repeated string excluded_primary_types = 6;
*
* @param index The index of the value to return.
* @return The bytes of the excludedPrimaryTypes at the given index.
*/
public com.google.protobuf.ByteString getExcludedPrimaryTypesBytes(int index) {
return excludedPrimaryTypes_.getByteString(index);
}
/**
*
*
*
* Excluded primary Place type (e.g. "restaurant" or "gas_station") from
* https://developers.google.com/places/supported_types.
*
* If there are any conflicting primary types, i.e. a type appears in both
* included_primary_types and excluded_primary_types, an INVALID_ARGUMENT
* error is returned.
*
* If a Place type is specified with multiple type restrictions, only places
* that satisfy all of the restrictions are returned. For example, if we
* have {included_types = ["restaurant"], excluded_primary_types =
* ["restaurant"]}, the returned places are POIs that provide "restaurant"
* related services but do not operate primarily as "restaurants".
*
*
* repeated string excluded_primary_types = 6;
*
* @param index The index to set the value at.
* @param value The excludedPrimaryTypes to set.
* @return This builder for chaining.
*/
public Builder setExcludedPrimaryTypes(int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureExcludedPrimaryTypesIsMutable();
excludedPrimaryTypes_.set(index, value);
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
*
*
* Excluded primary Place type (e.g. "restaurant" or "gas_station") from
* https://developers.google.com/places/supported_types.
*
* If there are any conflicting primary types, i.e. a type appears in both
* included_primary_types and excluded_primary_types, an INVALID_ARGUMENT
* error is returned.
*
* If a Place type is specified with multiple type restrictions, only places
* that satisfy all of the restrictions are returned. For example, if we
* have {included_types = ["restaurant"], excluded_primary_types =
* ["restaurant"]}, the returned places are POIs that provide "restaurant"
* related services but do not operate primarily as "restaurants".
*
*
* repeated string excluded_primary_types = 6;
*
* @param value The excludedPrimaryTypes to add.
* @return This builder for chaining.
*/
public Builder addExcludedPrimaryTypes(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureExcludedPrimaryTypesIsMutable();
excludedPrimaryTypes_.add(value);
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
*
*
* Excluded primary Place type (e.g. "restaurant" or "gas_station") from
* https://developers.google.com/places/supported_types.
*
* If there are any conflicting primary types, i.e. a type appears in both
* included_primary_types and excluded_primary_types, an INVALID_ARGUMENT
* error is returned.
*
* If a Place type is specified with multiple type restrictions, only places
* that satisfy all of the restrictions are returned. For example, if we
* have {included_types = ["restaurant"], excluded_primary_types =
* ["restaurant"]}, the returned places are POIs that provide "restaurant"
* related services but do not operate primarily as "restaurants".
*
*
* repeated string excluded_primary_types = 6;
*
* @param values The excludedPrimaryTypes to add.
* @return This builder for chaining.
*/
public Builder addAllExcludedPrimaryTypes(java.lang.Iterable values) {
ensureExcludedPrimaryTypesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, excludedPrimaryTypes_);
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
*
*
* Excluded primary Place type (e.g. "restaurant" or "gas_station") from
* https://developers.google.com/places/supported_types.
*
* If there are any conflicting primary types, i.e. a type appears in both
* included_primary_types and excluded_primary_types, an INVALID_ARGUMENT
* error is returned.
*
* If a Place type is specified with multiple type restrictions, only places
* that satisfy all of the restrictions are returned. For example, if we
* have {included_types = ["restaurant"], excluded_primary_types =
* ["restaurant"]}, the returned places are POIs that provide "restaurant"
* related services but do not operate primarily as "restaurants".
*
*
* repeated string excluded_primary_types = 6;
*
* @return This builder for chaining.
*/
public Builder clearExcludedPrimaryTypes() {
excludedPrimaryTypes_ = com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00000020);
;
onChanged();
return this;
}
/**
*
*
*
* Excluded primary Place type (e.g. "restaurant" or "gas_station") from
* https://developers.google.com/places/supported_types.
*
* If there are any conflicting primary types, i.e. a type appears in both
* included_primary_types and excluded_primary_types, an INVALID_ARGUMENT
* error is returned.
*
* If a Place type is specified with multiple type restrictions, only places
* that satisfy all of the restrictions are returned. For example, if we
* have {included_types = ["restaurant"], excluded_primary_types =
* ["restaurant"]}, the returned places are POIs that provide "restaurant"
* related services but do not operate primarily as "restaurants".
*
*
* repeated string excluded_primary_types = 6;
*
* @param value The bytes of the excludedPrimaryTypes to add.
* @return This builder for chaining.
*/
public Builder addExcludedPrimaryTypesBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureExcludedPrimaryTypesIsMutable();
excludedPrimaryTypes_.add(value);
bitField0_ |= 0x00000020;
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 = 7;
*
* @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 = 7;
*
* @param value The maxResultCount to set.
* @return This builder for chaining.
*/
public Builder setMaxResultCount(int value) {
maxResultCount_ = value;
bitField0_ |= 0x00000040;
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 = 7;
*
* @return This builder for chaining.
*/
public Builder clearMaxResultCount() {
bitField0_ = (bitField0_ & ~0x00000040);
maxResultCount_ = 0;
onChanged();
return this;
}
private com.google.maps.places.v1.SearchNearbyRequest.LocationRestriction locationRestriction_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.maps.places.v1.SearchNearbyRequest.LocationRestriction,
com.google.maps.places.v1.SearchNearbyRequest.LocationRestriction.Builder,
com.google.maps.places.v1.SearchNearbyRequest.LocationRestrictionOrBuilder>
locationRestrictionBuilder_;
/**
*
*
*
* Required. The region to search.
*
*
*
* .google.maps.places.v1.SearchNearbyRequest.LocationRestriction location_restriction = 8 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return Whether the locationRestriction field is set.
*/
public boolean hasLocationRestriction() {
return ((bitField0_ & 0x00000080) != 0);
}
/**
*
*
*
* Required. The region to search.
*
*
*
* .google.maps.places.v1.SearchNearbyRequest.LocationRestriction location_restriction = 8 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return The locationRestriction.
*/
public com.google.maps.places.v1.SearchNearbyRequest.LocationRestriction
getLocationRestriction() {
if (locationRestrictionBuilder_ == null) {
return locationRestriction_ == null
? com.google.maps.places.v1.SearchNearbyRequest.LocationRestriction.getDefaultInstance()
: locationRestriction_;
} else {
return locationRestrictionBuilder_.getMessage();
}
}
/**
*
*
*
* Required. The region to search.
*
*
*
* .google.maps.places.v1.SearchNearbyRequest.LocationRestriction location_restriction = 8 [(.google.api.field_behavior) = REQUIRED];
*
*/
public Builder setLocationRestriction(
com.google.maps.places.v1.SearchNearbyRequest.LocationRestriction value) {
if (locationRestrictionBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
locationRestriction_ = value;
} else {
locationRestrictionBuilder_.setMessage(value);
}
bitField0_ |= 0x00000080;
onChanged();
return this;
}
/**
*
*
*
* Required. The region to search.
*
*
*
* .google.maps.places.v1.SearchNearbyRequest.LocationRestriction location_restriction = 8 [(.google.api.field_behavior) = REQUIRED];
*
*/
public Builder setLocationRestriction(
com.google.maps.places.v1.SearchNearbyRequest.LocationRestriction.Builder builderForValue) {
if (locationRestrictionBuilder_ == null) {
locationRestriction_ = builderForValue.build();
} else {
locationRestrictionBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000080;
onChanged();
return this;
}
/**
*
*
*
* Required. The region to search.
*
*
*
* .google.maps.places.v1.SearchNearbyRequest.LocationRestriction location_restriction = 8 [(.google.api.field_behavior) = REQUIRED];
*
*/
public Builder mergeLocationRestriction(
com.google.maps.places.v1.SearchNearbyRequest.LocationRestriction value) {
if (locationRestrictionBuilder_ == null) {
if (((bitField0_ & 0x00000080) != 0)
&& locationRestriction_ != null
&& locationRestriction_
!= com.google.maps.places.v1.SearchNearbyRequest.LocationRestriction
.getDefaultInstance()) {
getLocationRestrictionBuilder().mergeFrom(value);
} else {
locationRestriction_ = value;
}
} else {
locationRestrictionBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000080;
onChanged();
return this;
}
/**
*
*
*
* Required. The region to search.
*
*
*
* .google.maps.places.v1.SearchNearbyRequest.LocationRestriction location_restriction = 8 [(.google.api.field_behavior) = REQUIRED];
*
*/
public Builder clearLocationRestriction() {
bitField0_ = (bitField0_ & ~0x00000080);
locationRestriction_ = null;
if (locationRestrictionBuilder_ != null) {
locationRestrictionBuilder_.dispose();
locationRestrictionBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Required. The region to search.
*
*
*
* .google.maps.places.v1.SearchNearbyRequest.LocationRestriction location_restriction = 8 [(.google.api.field_behavior) = REQUIRED];
*
*/
public com.google.maps.places.v1.SearchNearbyRequest.LocationRestriction.Builder
getLocationRestrictionBuilder() {
bitField0_ |= 0x00000080;
onChanged();
return getLocationRestrictionFieldBuilder().getBuilder();
}
/**
*
*
*
* Required. The region to search.
*
*
*
* .google.maps.places.v1.SearchNearbyRequest.LocationRestriction location_restriction = 8 [(.google.api.field_behavior) = REQUIRED];
*
*/
public com.google.maps.places.v1.SearchNearbyRequest.LocationRestrictionOrBuilder
getLocationRestrictionOrBuilder() {
if (locationRestrictionBuilder_ != null) {
return locationRestrictionBuilder_.getMessageOrBuilder();
} else {
return locationRestriction_ == null
? com.google.maps.places.v1.SearchNearbyRequest.LocationRestriction.getDefaultInstance()
: locationRestriction_;
}
}
/**
*
*
*
* Required. The region to search.
*
*
*
* .google.maps.places.v1.SearchNearbyRequest.LocationRestriction location_restriction = 8 [(.google.api.field_behavior) = REQUIRED];
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.maps.places.v1.SearchNearbyRequest.LocationRestriction,
com.google.maps.places.v1.SearchNearbyRequest.LocationRestriction.Builder,
com.google.maps.places.v1.SearchNearbyRequest.LocationRestrictionOrBuilder>
getLocationRestrictionFieldBuilder() {
if (locationRestrictionBuilder_ == null) {
locationRestrictionBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.maps.places.v1.SearchNearbyRequest.LocationRestriction,
com.google.maps.places.v1.SearchNearbyRequest.LocationRestriction.Builder,
com.google.maps.places.v1.SearchNearbyRequest.LocationRestrictionOrBuilder>(
getLocationRestriction(), getParentForChildren(), isClean());
locationRestriction_ = null;
}
return locationRestrictionBuilder_;
}
private int rankPreference_ = 0;
/**
*
*
*
* How results will be ranked in the response.
*
*
* .google.maps.places.v1.SearchNearbyRequest.RankPreference rank_preference = 9;
*
* @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.SearchNearbyRequest.RankPreference rank_preference = 9;
*
* @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_ |= 0x00000100;
onChanged();
return this;
}
/**
*
*
*
* How results will be ranked in the response.
*
*
* .google.maps.places.v1.SearchNearbyRequest.RankPreference rank_preference = 9;
*
* @return The rankPreference.
*/
@java.lang.Override
public com.google.maps.places.v1.SearchNearbyRequest.RankPreference getRankPreference() {
com.google.maps.places.v1.SearchNearbyRequest.RankPreference result =
com.google.maps.places.v1.SearchNearbyRequest.RankPreference.forNumber(rankPreference_);
return result == null
? com.google.maps.places.v1.SearchNearbyRequest.RankPreference.UNRECOGNIZED
: result;
}
/**
*
*
*
* How results will be ranked in the response.
*
*
* .google.maps.places.v1.SearchNearbyRequest.RankPreference rank_preference = 9;
*
* @param value The rankPreference to set.
* @return This builder for chaining.
*/
public Builder setRankPreference(
com.google.maps.places.v1.SearchNearbyRequest.RankPreference value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000100;
rankPreference_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
*
* How results will be ranked in the response.
*
*
* .google.maps.places.v1.SearchNearbyRequest.RankPreference rank_preference = 9;
*
* @return This builder for chaining.
*/
public Builder clearRankPreference() {
bitField0_ = (bitField0_ & ~0x00000100);
rankPreference_ = 0;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.maps.places.v1.SearchNearbyRequest)
}
// @@protoc_insertion_point(class_scope:google.maps.places.v1.SearchNearbyRequest)
private static final com.google.maps.places.v1.SearchNearbyRequest DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.maps.places.v1.SearchNearbyRequest();
}
public static com.google.maps.places.v1.SearchNearbyRequest getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public SearchNearbyRequest 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.SearchNearbyRequest getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}