/** * * * <pre> * Optional. The geo location of this conversational query. * </pre> * * <code>.google.type.LatLng geo_location = 2;</code> */ public com.google.type.LatLng getGeoLocation() { return geoLocation_ == null ? com.google.type.LatLng.getDefaultInstance() : geoLocation_; } /**
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (hasLatLng()) { hash = (37 * hash) + LAT_LNG_FIELD_NUMBER; hash = (53 * hash) + getLatLng().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
private static int compareGeoPoints(Value left, Value right) { int cmp = Double.compare( left.getGeoPointValue().getLatitude(), right.getGeoPointValue().getLatitude()); if (cmp != 0) { return cmp; } else { return Double.compare( left.getGeoPointValue().getLongitude(), right.getGeoPointValue().getLongitude()); } }
protected com.google.type.LatLng toPb() { return com.google.type.LatLng.newBuilder() .setLatitude(latitude) .setLongitude(longitude) .build(); } }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.cloud.vision.v1.LocationInfo)) { return super.equals(obj); } com.google.cloud.vision.v1.LocationInfo other = (com.google.cloud.vision.v1.LocationInfo) obj; boolean result = true; result = result && (hasLatLng() == other.hasLatLng()); if (hasLatLng()) { result = result && getLatLng().equals(other.getLatLng()); } result = result && unknownFields.equals(other.unknownFields); return result; }
public Builder mergeFrom(com.google.type.LatLng other) { if (other == com.google.type.LatLng.getDefaultInstance()) return this; if (other.getLatitude() != 0D) { setLatitude(other.getLatitude()); } if (other.getLongitude() != 0D) { setLongitude(other.getLongitude()); } onChanged(); return this; }
public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(com.google.type.LatLng prototype) {
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + LATITUDE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( java.lang.Double.doubleToLongBits(getLatitude())); hash = (37 * hash) + LONGITUDE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( java.lang.Double.doubleToLongBits(getLongitude())); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
LatLng toProto() { LatLng.Builder latLngBuilder = LatLng.newBuilder(); latLngBuilder.setLatitude(latitude); latLngBuilder.setLongitude(longitude); return latLngBuilder.build(); }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.cloud.vision.v1p3beta1.LocationInfo)) { return super.equals(obj); } com.google.cloud.vision.v1p3beta1.LocationInfo other = (com.google.cloud.vision.v1p3beta1.LocationInfo) obj; boolean result = true; result = result && (hasLatLng() == other.hasLatLng()); if (hasLatLng()) { result = result && getLatLng().equals(other.getLatLng()); } result = result && unknownFields.equals(other.unknownFields); return result; }
public static Builder newBuilder(com.google.type.LatLng prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } public Builder toBuilder() {
subBuilder = minLatLng_.toBuilder(); minLatLng_ = input.readMessage(com.google.type.LatLng.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(minLatLng_); subBuilder = maxLatLng_.toBuilder(); maxLatLng_ = input.readMessage(com.google.type.LatLng.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(maxLatLng_);
/** * * * <pre> * lat/long location coordinates. * </pre> * * <code>.google.type.LatLng lat_lng = 1;</code> */ public Builder mergeLatLng(com.google.type.LatLng value) { if (latLngBuilder_ == null) { if (latLng_ != null) { latLng_ = com.google.type.LatLng.newBuilder(latLng_).mergeFrom(value).buildPartial(); } else { latLng_ = value; } onChanged(); } else { latLngBuilder_.mergeFrom(value); } return this; } /**
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.cloud.vision.v1p2beta1.LocationInfo)) { return super.equals(obj); } com.google.cloud.vision.v1p2beta1.LocationInfo other = (com.google.cloud.vision.v1p2beta1.LocationInfo) obj; boolean result = true; result = result && (hasLatLng() == other.hasLatLng()); if (hasLatLng()) { result = result && getLatLng().equals(other.getLatLng()); } result = result && unknownFields.equals(other.unknownFields); return result; }
/** * * * <pre> * lat/long location coordinates. * </pre> * * <code>.google.type.LatLng lat_lng = 1;</code> */ public com.google.type.LatLng getLatLng() { return latLng_ == null ? com.google.type.LatLng.getDefaultInstance() : latLng_; } /**
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (hasLatLng()) { hash = (37 * hash) + LAT_LNG_FIELD_NUMBER; hash = (53 * hash) + getLatLng().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
@Override protected LatLng getValue(com.google.datastore.v1.Value from) { return new LatLng( from.getGeoPointValue().getLatitude(), from.getGeoPointValue().getLongitude()); }