com.google.maps.places.v1.Review 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/review.proto
package com.google.maps.places.v1;
/**
*
*
*
* Information about a review of a place.
*
*
* Protobuf type {@code google.maps.places.v1.Review}
*/
public final class Review extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.maps.places.v1.Review)
ReviewOrBuilder {
private static final long serialVersionUID = 0L;
// Use Review.newBuilder() to construct.
private Review(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private Review() {
name_ = "";
relativePublishTimeDescription_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new Review();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.maps.places.v1.ReviewProto
.internal_static_google_maps_places_v1_Review_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.maps.places.v1.ReviewProto
.internal_static_google_maps_places_v1_Review_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.maps.places.v1.Review.class, com.google.maps.places.v1.Review.Builder.class);
}
public static final int NAME_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object name_ = "";
/**
*
*
*
* Output only. A reference representing this place review which may be used
* to look up this place review again (a.k.a. the API "resource" name:
* places/{place_id}/reviews/{review}).
*
*
* string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The name.
*/
@java.lang.Override
public java.lang.String getName() {
java.lang.Object ref = name_;
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();
name_ = s;
return s;
}
}
/**
*
*
*
* Output only. A reference representing this place review which may be used
* to look up this place review again (a.k.a. the API "resource" name:
* places/{place_id}/reviews/{review}).
*
*
* string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The bytes for name.
*/
@java.lang.Override
public com.google.protobuf.ByteString getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int RELATIVE_PUBLISH_TIME_DESCRIPTION_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object relativePublishTimeDescription_ = "";
/**
*
*
*
* Output only. A string of formatted recent time, expressing the review time
* relative to the current time in a form appropriate for the language and
* country.
*
*
*
* string relative_publish_time_description = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The relativePublishTimeDescription.
*/
@java.lang.Override
public java.lang.String getRelativePublishTimeDescription() {
java.lang.Object ref = relativePublishTimeDescription_;
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();
relativePublishTimeDescription_ = s;
return s;
}
}
/**
*
*
*
* Output only. A string of formatted recent time, expressing the review time
* relative to the current time in a form appropriate for the language and
* country.
*
*
*
* string relative_publish_time_description = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The bytes for relativePublishTimeDescription.
*/
@java.lang.Override
public com.google.protobuf.ByteString getRelativePublishTimeDescriptionBytes() {
java.lang.Object ref = relativePublishTimeDescription_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
relativePublishTimeDescription_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int TEXT_FIELD_NUMBER = 9;
private com.google.type.LocalizedText text_;
/**
*
*
*
* Output only. The localized text of the review.
*
*
* .google.type.LocalizedText text = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return Whether the text field is set.
*/
@java.lang.Override
public boolean hasText() {
return text_ != null;
}
/**
*
*
*
* Output only. The localized text of the review.
*
*
* .google.type.LocalizedText text = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The text.
*/
@java.lang.Override
public com.google.type.LocalizedText getText() {
return text_ == null ? com.google.type.LocalizedText.getDefaultInstance() : text_;
}
/**
*
*
*
* Output only. The localized text of the review.
*
*
* .google.type.LocalizedText text = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
@java.lang.Override
public com.google.type.LocalizedTextOrBuilder getTextOrBuilder() {
return text_ == null ? com.google.type.LocalizedText.getDefaultInstance() : text_;
}
public static final int ORIGINAL_TEXT_FIELD_NUMBER = 12;
private com.google.type.LocalizedText originalText_;
/**
*
*
*
* Output only. The review text in its original language.
*
*
*
* .google.type.LocalizedText original_text = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return Whether the originalText field is set.
*/
@java.lang.Override
public boolean hasOriginalText() {
return originalText_ != null;
}
/**
*
*
*
* Output only. The review text in its original language.
*
*
*
* .google.type.LocalizedText original_text = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The originalText.
*/
@java.lang.Override
public com.google.type.LocalizedText getOriginalText() {
return originalText_ == null
? com.google.type.LocalizedText.getDefaultInstance()
: originalText_;
}
/**
*
*
*
* Output only. The review text in its original language.
*
*
*
* .google.type.LocalizedText original_text = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
@java.lang.Override
public com.google.type.LocalizedTextOrBuilder getOriginalTextOrBuilder() {
return originalText_ == null
? com.google.type.LocalizedText.getDefaultInstance()
: originalText_;
}
public static final int RATING_FIELD_NUMBER = 7;
private double rating_ = 0D;
/**
*
*
*
* Output only. A number between 1.0 and 5.0, a.k.a. the number of stars.
*
*
* double rating = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The rating.
*/
@java.lang.Override
public double getRating() {
return rating_;
}
public static final int AUTHOR_ATTRIBUTION_FIELD_NUMBER = 13;
private com.google.maps.places.v1.AuthorAttribution authorAttribution_;
/**
*
*
*
* Output only. This review's author.
*
*
*
* .google.maps.places.v1.AuthorAttribution author_attribution = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return Whether the authorAttribution field is set.
*/
@java.lang.Override
public boolean hasAuthorAttribution() {
return authorAttribution_ != null;
}
/**
*
*
*
* Output only. This review's author.
*
*
*
* .google.maps.places.v1.AuthorAttribution author_attribution = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The authorAttribution.
*/
@java.lang.Override
public com.google.maps.places.v1.AuthorAttribution getAuthorAttribution() {
return authorAttribution_ == null
? com.google.maps.places.v1.AuthorAttribution.getDefaultInstance()
: authorAttribution_;
}
/**
*
*
*
* Output only. This review's author.
*
*
*
* .google.maps.places.v1.AuthorAttribution author_attribution = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
@java.lang.Override
public com.google.maps.places.v1.AuthorAttributionOrBuilder getAuthorAttributionOrBuilder() {
return authorAttribution_ == null
? com.google.maps.places.v1.AuthorAttribution.getDefaultInstance()
: authorAttribution_;
}
public static final int PUBLISH_TIME_FIELD_NUMBER = 14;
private com.google.protobuf.Timestamp publishTime_;
/**
*
*
*
* Output only. Timestamp for the review.
*
*
*
* .google.protobuf.Timestamp publish_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return Whether the publishTime field is set.
*/
@java.lang.Override
public boolean hasPublishTime() {
return publishTime_ != null;
}
/**
*
*
*
* Output only. Timestamp for the review.
*
*
*
* .google.protobuf.Timestamp publish_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The publishTime.
*/
@java.lang.Override
public com.google.protobuf.Timestamp getPublishTime() {
return publishTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : publishTime_;
}
/**
*
*
*
* Output only. Timestamp for the review.
*
*
*
* .google.protobuf.Timestamp publish_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
@java.lang.Override
public com.google.protobuf.TimestampOrBuilder getPublishTimeOrBuilder() {
return publishTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : publishTime_;
}
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(name_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(relativePublishTimeDescription_)) {
com.google.protobuf.GeneratedMessageV3.writeString(
output, 2, relativePublishTimeDescription_);
}
if (java.lang.Double.doubleToRawLongBits(rating_) != 0) {
output.writeDouble(7, rating_);
}
if (text_ != null) {
output.writeMessage(9, getText());
}
if (originalText_ != null) {
output.writeMessage(12, getOriginalText());
}
if (authorAttribution_ != null) {
output.writeMessage(13, getAuthorAttribution());
}
if (publishTime_ != null) {
output.writeMessage(14, getPublishTime());
}
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(name_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(relativePublishTimeDescription_)) {
size +=
com.google.protobuf.GeneratedMessageV3.computeStringSize(
2, relativePublishTimeDescription_);
}
if (java.lang.Double.doubleToRawLongBits(rating_) != 0) {
size += com.google.protobuf.CodedOutputStream.computeDoubleSize(7, rating_);
}
if (text_ != null) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getText());
}
if (originalText_ != null) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getOriginalText());
}
if (authorAttribution_ != null) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, getAuthorAttribution());
}
if (publishTime_ != null) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, getPublishTime());
}
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.Review)) {
return super.equals(obj);
}
com.google.maps.places.v1.Review other = (com.google.maps.places.v1.Review) obj;
if (!getName().equals(other.getName())) return false;
if (!getRelativePublishTimeDescription().equals(other.getRelativePublishTimeDescription()))
return false;
if (hasText() != other.hasText()) return false;
if (hasText()) {
if (!getText().equals(other.getText())) return false;
}
if (hasOriginalText() != other.hasOriginalText()) return false;
if (hasOriginalText()) {
if (!getOriginalText().equals(other.getOriginalText())) return false;
}
if (java.lang.Double.doubleToLongBits(getRating())
!= java.lang.Double.doubleToLongBits(other.getRating())) return false;
if (hasAuthorAttribution() != other.hasAuthorAttribution()) return false;
if (hasAuthorAttribution()) {
if (!getAuthorAttribution().equals(other.getAuthorAttribution())) return false;
}
if (hasPublishTime() != other.hasPublishTime()) return false;
if (hasPublishTime()) {
if (!getPublishTime().equals(other.getPublishTime())) 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) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
hash = (37 * hash) + RELATIVE_PUBLISH_TIME_DESCRIPTION_FIELD_NUMBER;
hash = (53 * hash) + getRelativePublishTimeDescription().hashCode();
if (hasText()) {
hash = (37 * hash) + TEXT_FIELD_NUMBER;
hash = (53 * hash) + getText().hashCode();
}
if (hasOriginalText()) {
hash = (37 * hash) + ORIGINAL_TEXT_FIELD_NUMBER;
hash = (53 * hash) + getOriginalText().hashCode();
}
hash = (37 * hash) + RATING_FIELD_NUMBER;
hash =
(53 * hash)
+ com.google.protobuf.Internal.hashLong(java.lang.Double.doubleToLongBits(getRating()));
if (hasAuthorAttribution()) {
hash = (37 * hash) + AUTHOR_ATTRIBUTION_FIELD_NUMBER;
hash = (53 * hash) + getAuthorAttribution().hashCode();
}
if (hasPublishTime()) {
hash = (37 * hash) + PUBLISH_TIME_FIELD_NUMBER;
hash = (53 * hash) + getPublishTime().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.maps.places.v1.Review parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.maps.places.v1.Review 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.Review parseFrom(com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.maps.places.v1.Review 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.Review parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.maps.places.v1.Review 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.Review parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.maps.places.v1.Review 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.Review parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.maps.places.v1.Review 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.Review 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.Review 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.Review 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;
}
/**
*
*
*
* Information about a review of a place.
*
*
* Protobuf type {@code google.maps.places.v1.Review}
*/
public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.maps.places.v1.Review)
com.google.maps.places.v1.ReviewOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.maps.places.v1.ReviewProto
.internal_static_google_maps_places_v1_Review_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.maps.places.v1.ReviewProto
.internal_static_google_maps_places_v1_Review_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.maps.places.v1.Review.class,
com.google.maps.places.v1.Review.Builder.class);
}
// Construct using com.google.maps.places.v1.Review.newBuilder()
private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
name_ = "";
relativePublishTimeDescription_ = "";
text_ = null;
if (textBuilder_ != null) {
textBuilder_.dispose();
textBuilder_ = null;
}
originalText_ = null;
if (originalTextBuilder_ != null) {
originalTextBuilder_.dispose();
originalTextBuilder_ = null;
}
rating_ = 0D;
authorAttribution_ = null;
if (authorAttributionBuilder_ != null) {
authorAttributionBuilder_.dispose();
authorAttributionBuilder_ = null;
}
publishTime_ = null;
if (publishTimeBuilder_ != null) {
publishTimeBuilder_.dispose();
publishTimeBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.maps.places.v1.ReviewProto
.internal_static_google_maps_places_v1_Review_descriptor;
}
@java.lang.Override
public com.google.maps.places.v1.Review getDefaultInstanceForType() {
return com.google.maps.places.v1.Review.getDefaultInstance();
}
@java.lang.Override
public com.google.maps.places.v1.Review build() {
com.google.maps.places.v1.Review result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.maps.places.v1.Review buildPartial() {
com.google.maps.places.v1.Review result = new com.google.maps.places.v1.Review(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(com.google.maps.places.v1.Review result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.name_ = name_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.relativePublishTimeDescription_ = relativePublishTimeDescription_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.text_ = textBuilder_ == null ? text_ : textBuilder_.build();
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.originalText_ =
originalTextBuilder_ == null ? originalText_ : originalTextBuilder_.build();
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.rating_ = rating_;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.authorAttribution_ =
authorAttributionBuilder_ == null
? authorAttribution_
: authorAttributionBuilder_.build();
}
if (((from_bitField0_ & 0x00000040) != 0)) {
result.publishTime_ =
publishTimeBuilder_ == null ? publishTime_ : publishTimeBuilder_.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.Review) {
return mergeFrom((com.google.maps.places.v1.Review) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.maps.places.v1.Review other) {
if (other == com.google.maps.places.v1.Review.getDefaultInstance()) return this;
if (!other.getName().isEmpty()) {
name_ = other.name_;
bitField0_ |= 0x00000001;
onChanged();
}
if (!other.getRelativePublishTimeDescription().isEmpty()) {
relativePublishTimeDescription_ = other.relativePublishTimeDescription_;
bitField0_ |= 0x00000002;
onChanged();
}
if (other.hasText()) {
mergeText(other.getText());
}
if (other.hasOriginalText()) {
mergeOriginalText(other.getOriginalText());
}
if (other.getRating() != 0D) {
setRating(other.getRating());
}
if (other.hasAuthorAttribution()) {
mergeAuthorAttribution(other.getAuthorAttribution());
}
if (other.hasPublishTime()) {
mergePublishTime(other.getPublishTime());
}
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:
{
name_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18:
{
relativePublishTimeDescription_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
case 57:
{
rating_ = input.readDouble();
bitField0_ |= 0x00000010;
break;
} // case 57
case 74:
{
input.readMessage(getTextFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000004;
break;
} // case 74
case 98:
{
input.readMessage(getOriginalTextFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000008;
break;
} // case 98
case 106:
{
input.readMessage(
getAuthorAttributionFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000020;
break;
} // case 106
case 114:
{
input.readMessage(getPublishTimeFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000040;
break;
} // case 114
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object name_ = "";
/**
*
*
*
* Output only. A reference representing this place review which may be used
* to look up this place review again (a.k.a. the API "resource" name:
* places/{place_id}/reviews/{review}).
*
*
* string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The name.
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Output only. A reference representing this place review which may be used
* to look up this place review again (a.k.a. the API "resource" name:
* places/{place_id}/reviews/{review}).
*
*
* string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The bytes for name.
*/
public com.google.protobuf.ByteString getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Output only. A reference representing this place review which may be used
* to look up this place review again (a.k.a. the API "resource" name:
* places/{place_id}/reviews/{review}).
*
*
* string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @param value The name to set.
* @return This builder for chaining.
*/
public Builder setName(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
name_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Output only. A reference representing this place review which may be used
* to look up this place review again (a.k.a. the API "resource" name:
* places/{place_id}/reviews/{review}).
*
*
* string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*
* Output only. A reference representing this place review which may be used
* to look up this place review again (a.k.a. the API "resource" name:
* places/{place_id}/reviews/{review}).
*
*
* string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @param value The bytes for name to set.
* @return This builder for chaining.
*/
public Builder setNameBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
name_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.lang.Object relativePublishTimeDescription_ = "";
/**
*
*
*
* Output only. A string of formatted recent time, expressing the review time
* relative to the current time in a form appropriate for the language and
* country.
*
*
*
* string relative_publish_time_description = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The relativePublishTimeDescription.
*/
public java.lang.String getRelativePublishTimeDescription() {
java.lang.Object ref = relativePublishTimeDescription_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
relativePublishTimeDescription_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Output only. A string of formatted recent time, expressing the review time
* relative to the current time in a form appropriate for the language and
* country.
*
*
*
* string relative_publish_time_description = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The bytes for relativePublishTimeDescription.
*/
public com.google.protobuf.ByteString getRelativePublishTimeDescriptionBytes() {
java.lang.Object ref = relativePublishTimeDescription_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
relativePublishTimeDescription_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Output only. A string of formatted recent time, expressing the review time
* relative to the current time in a form appropriate for the language and
* country.
*
*
*
* string relative_publish_time_description = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @param value The relativePublishTimeDescription to set.
* @return This builder for chaining.
*/
public Builder setRelativePublishTimeDescription(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
relativePublishTimeDescription_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Output only. A string of formatted recent time, expressing the review time
* relative to the current time in a form appropriate for the language and
* country.
*
*
*
* string relative_publish_time_description = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return This builder for chaining.
*/
public Builder clearRelativePublishTimeDescription() {
relativePublishTimeDescription_ = getDefaultInstance().getRelativePublishTimeDescription();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
*
*
* Output only. A string of formatted recent time, expressing the review time
* relative to the current time in a form appropriate for the language and
* country.
*
*
*
* string relative_publish_time_description = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @param value The bytes for relativePublishTimeDescription to set.
* @return This builder for chaining.
*/
public Builder setRelativePublishTimeDescriptionBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
relativePublishTimeDescription_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private com.google.type.LocalizedText text_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.type.LocalizedText,
com.google.type.LocalizedText.Builder,
com.google.type.LocalizedTextOrBuilder>
textBuilder_;
/**
*
*
*
* Output only. The localized text of the review.
*
*
* .google.type.LocalizedText text = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return Whether the text field is set.
*/
public boolean hasText() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
*
*
* Output only. The localized text of the review.
*
*
* .google.type.LocalizedText text = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The text.
*/
public com.google.type.LocalizedText getText() {
if (textBuilder_ == null) {
return text_ == null ? com.google.type.LocalizedText.getDefaultInstance() : text_;
} else {
return textBuilder_.getMessage();
}
}
/**
*
*
*
* Output only. The localized text of the review.
*
*
* .google.type.LocalizedText text = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder setText(com.google.type.LocalizedText value) {
if (textBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
text_ = value;
} else {
textBuilder_.setMessage(value);
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* Output only. The localized text of the review.
*
*
* .google.type.LocalizedText text = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder setText(com.google.type.LocalizedText.Builder builderForValue) {
if (textBuilder_ == null) {
text_ = builderForValue.build();
} else {
textBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* Output only. The localized text of the review.
*
*
* .google.type.LocalizedText text = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder mergeText(com.google.type.LocalizedText value) {
if (textBuilder_ == null) {
if (((bitField0_ & 0x00000004) != 0)
&& text_ != null
&& text_ != com.google.type.LocalizedText.getDefaultInstance()) {
getTextBuilder().mergeFrom(value);
} else {
text_ = value;
}
} else {
textBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* Output only. The localized text of the review.
*
*
* .google.type.LocalizedText text = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder clearText() {
bitField0_ = (bitField0_ & ~0x00000004);
text_ = null;
if (textBuilder_ != null) {
textBuilder_.dispose();
textBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Output only. The localized text of the review.
*
*
* .google.type.LocalizedText text = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public com.google.type.LocalizedText.Builder getTextBuilder() {
bitField0_ |= 0x00000004;
onChanged();
return getTextFieldBuilder().getBuilder();
}
/**
*
*
*
* Output only. The localized text of the review.
*
*
* .google.type.LocalizedText text = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public com.google.type.LocalizedTextOrBuilder getTextOrBuilder() {
if (textBuilder_ != null) {
return textBuilder_.getMessageOrBuilder();
} else {
return text_ == null ? com.google.type.LocalizedText.getDefaultInstance() : text_;
}
}
/**
*
*
*
* Output only. The localized text of the review.
*
*
* .google.type.LocalizedText text = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.type.LocalizedText,
com.google.type.LocalizedText.Builder,
com.google.type.LocalizedTextOrBuilder>
getTextFieldBuilder() {
if (textBuilder_ == null) {
textBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.type.LocalizedText,
com.google.type.LocalizedText.Builder,
com.google.type.LocalizedTextOrBuilder>(
getText(), getParentForChildren(), isClean());
text_ = null;
}
return textBuilder_;
}
private com.google.type.LocalizedText originalText_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.type.LocalizedText,
com.google.type.LocalizedText.Builder,
com.google.type.LocalizedTextOrBuilder>
originalTextBuilder_;
/**
*
*
*
* Output only. The review text in its original language.
*
*
*
* .google.type.LocalizedText original_text = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return Whether the originalText field is set.
*/
public boolean hasOriginalText() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
*
*
* Output only. The review text in its original language.
*
*
*
* .google.type.LocalizedText original_text = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The originalText.
*/
public com.google.type.LocalizedText getOriginalText() {
if (originalTextBuilder_ == null) {
return originalText_ == null
? com.google.type.LocalizedText.getDefaultInstance()
: originalText_;
} else {
return originalTextBuilder_.getMessage();
}
}
/**
*
*
*
* Output only. The review text in its original language.
*
*
*
* .google.type.LocalizedText original_text = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder setOriginalText(com.google.type.LocalizedText value) {
if (originalTextBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
originalText_ = value;
} else {
originalTextBuilder_.setMessage(value);
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* Output only. The review text in its original language.
*
*
*
* .google.type.LocalizedText original_text = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder setOriginalText(com.google.type.LocalizedText.Builder builderForValue) {
if (originalTextBuilder_ == null) {
originalText_ = builderForValue.build();
} else {
originalTextBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* Output only. The review text in its original language.
*
*
*
* .google.type.LocalizedText original_text = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder mergeOriginalText(com.google.type.LocalizedText value) {
if (originalTextBuilder_ == null) {
if (((bitField0_ & 0x00000008) != 0)
&& originalText_ != null
&& originalText_ != com.google.type.LocalizedText.getDefaultInstance()) {
getOriginalTextBuilder().mergeFrom(value);
} else {
originalText_ = value;
}
} else {
originalTextBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* Output only. The review text in its original language.
*
*
*
* .google.type.LocalizedText original_text = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder clearOriginalText() {
bitField0_ = (bitField0_ & ~0x00000008);
originalText_ = null;
if (originalTextBuilder_ != null) {
originalTextBuilder_.dispose();
originalTextBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Output only. The review text in its original language.
*
*
*
* .google.type.LocalizedText original_text = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public com.google.type.LocalizedText.Builder getOriginalTextBuilder() {
bitField0_ |= 0x00000008;
onChanged();
return getOriginalTextFieldBuilder().getBuilder();
}
/**
*
*
*
* Output only. The review text in its original language.
*
*
*
* .google.type.LocalizedText original_text = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public com.google.type.LocalizedTextOrBuilder getOriginalTextOrBuilder() {
if (originalTextBuilder_ != null) {
return originalTextBuilder_.getMessageOrBuilder();
} else {
return originalText_ == null
? com.google.type.LocalizedText.getDefaultInstance()
: originalText_;
}
}
/**
*
*
*
* Output only. The review text in its original language.
*
*
*
* .google.type.LocalizedText original_text = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.type.LocalizedText,
com.google.type.LocalizedText.Builder,
com.google.type.LocalizedTextOrBuilder>
getOriginalTextFieldBuilder() {
if (originalTextBuilder_ == null) {
originalTextBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.type.LocalizedText,
com.google.type.LocalizedText.Builder,
com.google.type.LocalizedTextOrBuilder>(
getOriginalText(), getParentForChildren(), isClean());
originalText_ = null;
}
return originalTextBuilder_;
}
private double rating_;
/**
*
*
*
* Output only. A number between 1.0 and 5.0, a.k.a. the number of stars.
*
*
* double rating = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The rating.
*/
@java.lang.Override
public double getRating() {
return rating_;
}
/**
*
*
*
* Output only. A number between 1.0 and 5.0, a.k.a. the number of stars.
*
*
* double rating = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @param value The rating to set.
* @return This builder for chaining.
*/
public Builder setRating(double value) {
rating_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*
*
* Output only. A number between 1.0 and 5.0, a.k.a. the number of stars.
*
*
* double rating = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return This builder for chaining.
*/
public Builder clearRating() {
bitField0_ = (bitField0_ & ~0x00000010);
rating_ = 0D;
onChanged();
return this;
}
private com.google.maps.places.v1.AuthorAttribution authorAttribution_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.maps.places.v1.AuthorAttribution,
com.google.maps.places.v1.AuthorAttribution.Builder,
com.google.maps.places.v1.AuthorAttributionOrBuilder>
authorAttributionBuilder_;
/**
*
*
*
* Output only. This review's author.
*
*
*
* .google.maps.places.v1.AuthorAttribution author_attribution = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return Whether the authorAttribution field is set.
*/
public boolean hasAuthorAttribution() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
*
*
*
* Output only. This review's author.
*
*
*
* .google.maps.places.v1.AuthorAttribution author_attribution = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The authorAttribution.
*/
public com.google.maps.places.v1.AuthorAttribution getAuthorAttribution() {
if (authorAttributionBuilder_ == null) {
return authorAttribution_ == null
? com.google.maps.places.v1.AuthorAttribution.getDefaultInstance()
: authorAttribution_;
} else {
return authorAttributionBuilder_.getMessage();
}
}
/**
*
*
*
* Output only. This review's author.
*
*
*
* .google.maps.places.v1.AuthorAttribution author_attribution = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder setAuthorAttribution(com.google.maps.places.v1.AuthorAttribution value) {
if (authorAttributionBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
authorAttribution_ = value;
} else {
authorAttributionBuilder_.setMessage(value);
}
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
*
*
* Output only. This review's author.
*
*
*
* .google.maps.places.v1.AuthorAttribution author_attribution = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder setAuthorAttribution(
com.google.maps.places.v1.AuthorAttribution.Builder builderForValue) {
if (authorAttributionBuilder_ == null) {
authorAttribution_ = builderForValue.build();
} else {
authorAttributionBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
*
*
* Output only. This review's author.
*
*
*
* .google.maps.places.v1.AuthorAttribution author_attribution = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder mergeAuthorAttribution(com.google.maps.places.v1.AuthorAttribution value) {
if (authorAttributionBuilder_ == null) {
if (((bitField0_ & 0x00000020) != 0)
&& authorAttribution_ != null
&& authorAttribution_
!= com.google.maps.places.v1.AuthorAttribution.getDefaultInstance()) {
getAuthorAttributionBuilder().mergeFrom(value);
} else {
authorAttribution_ = value;
}
} else {
authorAttributionBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
*
*
* Output only. This review's author.
*
*
*
* .google.maps.places.v1.AuthorAttribution author_attribution = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder clearAuthorAttribution() {
bitField0_ = (bitField0_ & ~0x00000020);
authorAttribution_ = null;
if (authorAttributionBuilder_ != null) {
authorAttributionBuilder_.dispose();
authorAttributionBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Output only. This review's author.
*
*
*
* .google.maps.places.v1.AuthorAttribution author_attribution = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public com.google.maps.places.v1.AuthorAttribution.Builder getAuthorAttributionBuilder() {
bitField0_ |= 0x00000020;
onChanged();
return getAuthorAttributionFieldBuilder().getBuilder();
}
/**
*
*
*
* Output only. This review's author.
*
*
*
* .google.maps.places.v1.AuthorAttribution author_attribution = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public com.google.maps.places.v1.AuthorAttributionOrBuilder getAuthorAttributionOrBuilder() {
if (authorAttributionBuilder_ != null) {
return authorAttributionBuilder_.getMessageOrBuilder();
} else {
return authorAttribution_ == null
? com.google.maps.places.v1.AuthorAttribution.getDefaultInstance()
: authorAttribution_;
}
}
/**
*
*
*
* Output only. This review's author.
*
*
*
* .google.maps.places.v1.AuthorAttribution author_attribution = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.maps.places.v1.AuthorAttribution,
com.google.maps.places.v1.AuthorAttribution.Builder,
com.google.maps.places.v1.AuthorAttributionOrBuilder>
getAuthorAttributionFieldBuilder() {
if (authorAttributionBuilder_ == null) {
authorAttributionBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.maps.places.v1.AuthorAttribution,
com.google.maps.places.v1.AuthorAttribution.Builder,
com.google.maps.places.v1.AuthorAttributionOrBuilder>(
getAuthorAttribution(), getParentForChildren(), isClean());
authorAttribution_ = null;
}
return authorAttributionBuilder_;
}
private com.google.protobuf.Timestamp publishTime_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp,
com.google.protobuf.Timestamp.Builder,
com.google.protobuf.TimestampOrBuilder>
publishTimeBuilder_;
/**
*
*
*
* Output only. Timestamp for the review.
*
*
*
* .google.protobuf.Timestamp publish_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return Whether the publishTime field is set.
*/
public boolean hasPublishTime() {
return ((bitField0_ & 0x00000040) != 0);
}
/**
*
*
*
* Output only. Timestamp for the review.
*
*
*
* .google.protobuf.Timestamp publish_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The publishTime.
*/
public com.google.protobuf.Timestamp getPublishTime() {
if (publishTimeBuilder_ == null) {
return publishTime_ == null
? com.google.protobuf.Timestamp.getDefaultInstance()
: publishTime_;
} else {
return publishTimeBuilder_.getMessage();
}
}
/**
*
*
*
* Output only. Timestamp for the review.
*
*
*
* .google.protobuf.Timestamp publish_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder setPublishTime(com.google.protobuf.Timestamp value) {
if (publishTimeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
publishTime_ = value;
} else {
publishTimeBuilder_.setMessage(value);
}
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
*
*
* Output only. Timestamp for the review.
*
*
*
* .google.protobuf.Timestamp publish_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder setPublishTime(com.google.protobuf.Timestamp.Builder builderForValue) {
if (publishTimeBuilder_ == null) {
publishTime_ = builderForValue.build();
} else {
publishTimeBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
*
*
* Output only. Timestamp for the review.
*
*
*
* .google.protobuf.Timestamp publish_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder mergePublishTime(com.google.protobuf.Timestamp value) {
if (publishTimeBuilder_ == null) {
if (((bitField0_ & 0x00000040) != 0)
&& publishTime_ != null
&& publishTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
getPublishTimeBuilder().mergeFrom(value);
} else {
publishTime_ = value;
}
} else {
publishTimeBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
*
*
* Output only. Timestamp for the review.
*
*
*
* .google.protobuf.Timestamp publish_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder clearPublishTime() {
bitField0_ = (bitField0_ & ~0x00000040);
publishTime_ = null;
if (publishTimeBuilder_ != null) {
publishTimeBuilder_.dispose();
publishTimeBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Output only. Timestamp for the review.
*
*
*
* .google.protobuf.Timestamp publish_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public com.google.protobuf.Timestamp.Builder getPublishTimeBuilder() {
bitField0_ |= 0x00000040;
onChanged();
return getPublishTimeFieldBuilder().getBuilder();
}
/**
*
*
*
* Output only. Timestamp for the review.
*
*
*
* .google.protobuf.Timestamp publish_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public com.google.protobuf.TimestampOrBuilder getPublishTimeOrBuilder() {
if (publishTimeBuilder_ != null) {
return publishTimeBuilder_.getMessageOrBuilder();
} else {
return publishTime_ == null
? com.google.protobuf.Timestamp.getDefaultInstance()
: publishTime_;
}
}
/**
*
*
*
* Output only. Timestamp for the review.
*
*
*
* .google.protobuf.Timestamp publish_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp,
com.google.protobuf.Timestamp.Builder,
com.google.protobuf.TimestampOrBuilder>
getPublishTimeFieldBuilder() {
if (publishTimeBuilder_ == null) {
publishTimeBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp,
com.google.protobuf.Timestamp.Builder,
com.google.protobuf.TimestampOrBuilder>(
getPublishTime(), getParentForChildren(), isClean());
publishTime_ = null;
}
return publishTimeBuilder_;
}
@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.Review)
}
// @@protoc_insertion_point(class_scope:google.maps.places.v1.Review)
private static final com.google.maps.places.v1.Review DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.maps.places.v1.Review();
}
public static com.google.maps.places.v1.Review getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Review 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.Review getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}