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

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

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

package com.google.maps.places.v1;

/**
 *
 *
 * 
 * Information about a photo of a place.
 * 
* * Protobuf type {@code google.maps.places.v1.Photo} */ public final class Photo extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.maps.places.v1.Photo) PhotoOrBuilder { private static final long serialVersionUID = 0L; // Use Photo.newBuilder() to construct. private Photo(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private Photo() { name_ = ""; authorAttributions_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new Photo(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.maps.places.v1.PhotoProto .internal_static_google_maps_places_v1_Photo_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.maps.places.v1.PhotoProto .internal_static_google_maps_places_v1_Photo_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.maps.places.v1.Photo.class, com.google.maps.places.v1.Photo.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 photo which may be used to
   * look up this place photo again (a.k.a. the API "resource" name:
   * places/{place_id}/photos/{photo}).
   * 
* * 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 photo which may be used to
   * look up this place photo again (a.k.a. the API "resource" name:
   * places/{place_id}/photos/{photo}).
   * 
* * 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 WIDTH_PX_FIELD_NUMBER = 2; private int widthPx_ = 0; /** * * *
   * Output only. The maximum available width, in pixels.
   * 
* * int32 width_px = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The widthPx. */ @java.lang.Override public int getWidthPx() { return widthPx_; } public static final int HEIGHT_PX_FIELD_NUMBER = 3; private int heightPx_ = 0; /** * * *
   * Output only. The maximum available height, in pixels.
   * 
* * int32 height_px = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The heightPx. */ @java.lang.Override public int getHeightPx() { return heightPx_; } public static final int AUTHOR_ATTRIBUTIONS_FIELD_NUMBER = 4; @SuppressWarnings("serial") private java.util.List authorAttributions_; /** * * *
   * Output only. This photo's authors.
   * 
* * * repeated .google.maps.places.v1.AuthorAttribution author_attributions = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ @java.lang.Override public java.util.List getAuthorAttributionsList() { return authorAttributions_; } /** * * *
   * Output only. This photo's authors.
   * 
* * * repeated .google.maps.places.v1.AuthorAttribution author_attributions = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ @java.lang.Override public java.util.List getAuthorAttributionsOrBuilderList() { return authorAttributions_; } /** * * *
   * Output only. This photo's authors.
   * 
* * * repeated .google.maps.places.v1.AuthorAttribution author_attributions = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ @java.lang.Override public int getAuthorAttributionsCount() { return authorAttributions_.size(); } /** * * *
   * Output only. This photo's authors.
   * 
* * * repeated .google.maps.places.v1.AuthorAttribution author_attributions = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ @java.lang.Override public com.google.maps.places.v1.AuthorAttribution getAuthorAttributions(int index) { return authorAttributions_.get(index); } /** * * *
   * Output only. This photo's authors.
   * 
* * * repeated .google.maps.places.v1.AuthorAttribution author_attributions = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ @java.lang.Override public com.google.maps.places.v1.AuthorAttributionOrBuilder getAuthorAttributionsOrBuilder( int index) { return authorAttributions_.get(index); } 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 (widthPx_ != 0) { output.writeInt32(2, widthPx_); } if (heightPx_ != 0) { output.writeInt32(3, heightPx_); } for (int i = 0; i < authorAttributions_.size(); i++) { output.writeMessage(4, authorAttributions_.get(i)); } 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 (widthPx_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, widthPx_); } if (heightPx_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, heightPx_); } for (int i = 0; i < authorAttributions_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, authorAttributions_.get(i)); } 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.Photo)) { return super.equals(obj); } com.google.maps.places.v1.Photo other = (com.google.maps.places.v1.Photo) obj; if (!getName().equals(other.getName())) return false; if (getWidthPx() != other.getWidthPx()) return false; if (getHeightPx() != other.getHeightPx()) return false; if (!getAuthorAttributionsList().equals(other.getAuthorAttributionsList())) 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) + WIDTH_PX_FIELD_NUMBER; hash = (53 * hash) + getWidthPx(); hash = (37 * hash) + HEIGHT_PX_FIELD_NUMBER; hash = (53 * hash) + getHeightPx(); if (getAuthorAttributionsCount() > 0) { hash = (37 * hash) + AUTHOR_ATTRIBUTIONS_FIELD_NUMBER; hash = (53 * hash) + getAuthorAttributionsList().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.maps.places.v1.Photo parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.maps.places.v1.Photo 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.Photo parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.maps.places.v1.Photo 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.Photo parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.maps.places.v1.Photo 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.Photo parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.maps.places.v1.Photo 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.Photo parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.maps.places.v1.Photo 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.Photo 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.Photo 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.Photo 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 photo of a place.
   * 
* * Protobuf type {@code google.maps.places.v1.Photo} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.maps.places.v1.Photo) com.google.maps.places.v1.PhotoOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.maps.places.v1.PhotoProto .internal_static_google_maps_places_v1_Photo_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.maps.places.v1.PhotoProto .internal_static_google_maps_places_v1_Photo_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.maps.places.v1.Photo.class, com.google.maps.places.v1.Photo.Builder.class); } // Construct using com.google.maps.places.v1.Photo.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; name_ = ""; widthPx_ = 0; heightPx_ = 0; if (authorAttributionsBuilder_ == null) { authorAttributions_ = java.util.Collections.emptyList(); } else { authorAttributions_ = null; authorAttributionsBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000008); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.maps.places.v1.PhotoProto .internal_static_google_maps_places_v1_Photo_descriptor; } @java.lang.Override public com.google.maps.places.v1.Photo getDefaultInstanceForType() { return com.google.maps.places.v1.Photo.getDefaultInstance(); } @java.lang.Override public com.google.maps.places.v1.Photo build() { com.google.maps.places.v1.Photo result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.maps.places.v1.Photo buildPartial() { com.google.maps.places.v1.Photo result = new com.google.maps.places.v1.Photo(this); buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartialRepeatedFields(com.google.maps.places.v1.Photo result) { if (authorAttributionsBuilder_ == null) { if (((bitField0_ & 0x00000008) != 0)) { authorAttributions_ = java.util.Collections.unmodifiableList(authorAttributions_); bitField0_ = (bitField0_ & ~0x00000008); } result.authorAttributions_ = authorAttributions_; } else { result.authorAttributions_ = authorAttributionsBuilder_.build(); } } private void buildPartial0(com.google.maps.places.v1.Photo result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.name_ = name_; } if (((from_bitField0_ & 0x00000002) != 0)) { result.widthPx_ = widthPx_; } if (((from_bitField0_ & 0x00000004) != 0)) { result.heightPx_ = heightPx_; } } @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.Photo) { return mergeFrom((com.google.maps.places.v1.Photo) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.maps.places.v1.Photo other) { if (other == com.google.maps.places.v1.Photo.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; bitField0_ |= 0x00000001; onChanged(); } if (other.getWidthPx() != 0) { setWidthPx(other.getWidthPx()); } if (other.getHeightPx() != 0) { setHeightPx(other.getHeightPx()); } if (authorAttributionsBuilder_ == null) { if (!other.authorAttributions_.isEmpty()) { if (authorAttributions_.isEmpty()) { authorAttributions_ = other.authorAttributions_; bitField0_ = (bitField0_ & ~0x00000008); } else { ensureAuthorAttributionsIsMutable(); authorAttributions_.addAll(other.authorAttributions_); } onChanged(); } } else { if (!other.authorAttributions_.isEmpty()) { if (authorAttributionsBuilder_.isEmpty()) { authorAttributionsBuilder_.dispose(); authorAttributionsBuilder_ = null; authorAttributions_ = other.authorAttributions_; bitField0_ = (bitField0_ & ~0x00000008); authorAttributionsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getAuthorAttributionsFieldBuilder() : null; } else { authorAttributionsBuilder_.addAllMessages(other.authorAttributions_); } } } 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 16: { widthPx_ = input.readInt32(); bitField0_ |= 0x00000002; break; } // case 16 case 24: { heightPx_ = input.readInt32(); bitField0_ |= 0x00000004; break; } // case 24 case 34: { com.google.maps.places.v1.AuthorAttribution m = input.readMessage( com.google.maps.places.v1.AuthorAttribution.parser(), extensionRegistry); if (authorAttributionsBuilder_ == null) { ensureAuthorAttributionsIsMutable(); authorAttributions_.add(m); } else { authorAttributionsBuilder_.addMessage(m); } break; } // case 34 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 photo which may be used to
     * look up this place photo again (a.k.a. the API "resource" name:
     * places/{place_id}/photos/{photo}).
     * 
* * 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 photo which may be used to
     * look up this place photo again (a.k.a. the API "resource" name:
     * places/{place_id}/photos/{photo}).
     * 
* * 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 photo which may be used to
     * look up this place photo again (a.k.a. the API "resource" name:
     * places/{place_id}/photos/{photo}).
     * 
* * 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 photo which may be used to
     * look up this place photo again (a.k.a. the API "resource" name:
     * places/{place_id}/photos/{photo}).
     * 
* * 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 photo which may be used to
     * look up this place photo again (a.k.a. the API "resource" name:
     * places/{place_id}/photos/{photo}).
     * 
* * 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 int widthPx_; /** * * *
     * Output only. The maximum available width, in pixels.
     * 
* * int32 width_px = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The widthPx. */ @java.lang.Override public int getWidthPx() { return widthPx_; } /** * * *
     * Output only. The maximum available width, in pixels.
     * 
* * int32 width_px = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @param value The widthPx to set. * @return This builder for chaining. */ public Builder setWidthPx(int value) { widthPx_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** * * *
     * Output only. The maximum available width, in pixels.
     * 
* * int32 width_px = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return This builder for chaining. */ public Builder clearWidthPx() { bitField0_ = (bitField0_ & ~0x00000002); widthPx_ = 0; onChanged(); return this; } private int heightPx_; /** * * *
     * Output only. The maximum available height, in pixels.
     * 
* * int32 height_px = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The heightPx. */ @java.lang.Override public int getHeightPx() { return heightPx_; } /** * * *
     * Output only. The maximum available height, in pixels.
     * 
* * int32 height_px = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @param value The heightPx to set. * @return This builder for chaining. */ public Builder setHeightPx(int value) { heightPx_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } /** * * *
     * Output only. The maximum available height, in pixels.
     * 
* * int32 height_px = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return This builder for chaining. */ public Builder clearHeightPx() { bitField0_ = (bitField0_ & ~0x00000004); heightPx_ = 0; onChanged(); return this; } private java.util.List authorAttributions_ = java.util.Collections.emptyList(); private void ensureAuthorAttributionsIsMutable() { if (!((bitField0_ & 0x00000008) != 0)) { authorAttributions_ = new java.util.ArrayList( authorAttributions_); bitField0_ |= 0x00000008; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.maps.places.v1.AuthorAttribution, com.google.maps.places.v1.AuthorAttribution.Builder, com.google.maps.places.v1.AuthorAttributionOrBuilder> authorAttributionsBuilder_; /** * * *
     * Output only. This photo's authors.
     * 
* * * repeated .google.maps.places.v1.AuthorAttribution author_attributions = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public java.util.List getAuthorAttributionsList() { if (authorAttributionsBuilder_ == null) { return java.util.Collections.unmodifiableList(authorAttributions_); } else { return authorAttributionsBuilder_.getMessageList(); } } /** * * *
     * Output only. This photo's authors.
     * 
* * * repeated .google.maps.places.v1.AuthorAttribution author_attributions = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public int getAuthorAttributionsCount() { if (authorAttributionsBuilder_ == null) { return authorAttributions_.size(); } else { return authorAttributionsBuilder_.getCount(); } } /** * * *
     * Output only. This photo's authors.
     * 
* * * repeated .google.maps.places.v1.AuthorAttribution author_attributions = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public com.google.maps.places.v1.AuthorAttribution getAuthorAttributions(int index) { if (authorAttributionsBuilder_ == null) { return authorAttributions_.get(index); } else { return authorAttributionsBuilder_.getMessage(index); } } /** * * *
     * Output only. This photo's authors.
     * 
* * * repeated .google.maps.places.v1.AuthorAttribution author_attributions = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder setAuthorAttributions( int index, com.google.maps.places.v1.AuthorAttribution value) { if (authorAttributionsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureAuthorAttributionsIsMutable(); authorAttributions_.set(index, value); onChanged(); } else { authorAttributionsBuilder_.setMessage(index, value); } return this; } /** * * *
     * Output only. This photo's authors.
     * 
* * * repeated .google.maps.places.v1.AuthorAttribution author_attributions = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder setAuthorAttributions( int index, com.google.maps.places.v1.AuthorAttribution.Builder builderForValue) { if (authorAttributionsBuilder_ == null) { ensureAuthorAttributionsIsMutable(); authorAttributions_.set(index, builderForValue.build()); onChanged(); } else { authorAttributionsBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * * *
     * Output only. This photo's authors.
     * 
* * * repeated .google.maps.places.v1.AuthorAttribution author_attributions = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder addAuthorAttributions(com.google.maps.places.v1.AuthorAttribution value) { if (authorAttributionsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureAuthorAttributionsIsMutable(); authorAttributions_.add(value); onChanged(); } else { authorAttributionsBuilder_.addMessage(value); } return this; } /** * * *
     * Output only. This photo's authors.
     * 
* * * repeated .google.maps.places.v1.AuthorAttribution author_attributions = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder addAuthorAttributions( int index, com.google.maps.places.v1.AuthorAttribution value) { if (authorAttributionsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureAuthorAttributionsIsMutable(); authorAttributions_.add(index, value); onChanged(); } else { authorAttributionsBuilder_.addMessage(index, value); } return this; } /** * * *
     * Output only. This photo's authors.
     * 
* * * repeated .google.maps.places.v1.AuthorAttribution author_attributions = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder addAuthorAttributions( com.google.maps.places.v1.AuthorAttribution.Builder builderForValue) { if (authorAttributionsBuilder_ == null) { ensureAuthorAttributionsIsMutable(); authorAttributions_.add(builderForValue.build()); onChanged(); } else { authorAttributionsBuilder_.addMessage(builderForValue.build()); } return this; } /** * * *
     * Output only. This photo's authors.
     * 
* * * repeated .google.maps.places.v1.AuthorAttribution author_attributions = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder addAuthorAttributions( int index, com.google.maps.places.v1.AuthorAttribution.Builder builderForValue) { if (authorAttributionsBuilder_ == null) { ensureAuthorAttributionsIsMutable(); authorAttributions_.add(index, builderForValue.build()); onChanged(); } else { authorAttributionsBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * * *
     * Output only. This photo's authors.
     * 
* * * repeated .google.maps.places.v1.AuthorAttribution author_attributions = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder addAllAuthorAttributions( java.lang.Iterable values) { if (authorAttributionsBuilder_ == null) { ensureAuthorAttributionsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, authorAttributions_); onChanged(); } else { authorAttributionsBuilder_.addAllMessages(values); } return this; } /** * * *
     * Output only. This photo's authors.
     * 
* * * repeated .google.maps.places.v1.AuthorAttribution author_attributions = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder clearAuthorAttributions() { if (authorAttributionsBuilder_ == null) { authorAttributions_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000008); onChanged(); } else { authorAttributionsBuilder_.clear(); } return this; } /** * * *
     * Output only. This photo's authors.
     * 
* * * repeated .google.maps.places.v1.AuthorAttribution author_attributions = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder removeAuthorAttributions(int index) { if (authorAttributionsBuilder_ == null) { ensureAuthorAttributionsIsMutable(); authorAttributions_.remove(index); onChanged(); } else { authorAttributionsBuilder_.remove(index); } return this; } /** * * *
     * Output only. This photo's authors.
     * 
* * * repeated .google.maps.places.v1.AuthorAttribution author_attributions = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public com.google.maps.places.v1.AuthorAttribution.Builder getAuthorAttributionsBuilder( int index) { return getAuthorAttributionsFieldBuilder().getBuilder(index); } /** * * *
     * Output only. This photo's authors.
     * 
* * * repeated .google.maps.places.v1.AuthorAttribution author_attributions = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public com.google.maps.places.v1.AuthorAttributionOrBuilder getAuthorAttributionsOrBuilder( int index) { if (authorAttributionsBuilder_ == null) { return authorAttributions_.get(index); } else { return authorAttributionsBuilder_.getMessageOrBuilder(index); } } /** * * *
     * Output only. This photo's authors.
     * 
* * * repeated .google.maps.places.v1.AuthorAttribution author_attributions = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public java.util.List getAuthorAttributionsOrBuilderList() { if (authorAttributionsBuilder_ != null) { return authorAttributionsBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(authorAttributions_); } } /** * * *
     * Output only. This photo's authors.
     * 
* * * repeated .google.maps.places.v1.AuthorAttribution author_attributions = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public com.google.maps.places.v1.AuthorAttribution.Builder addAuthorAttributionsBuilder() { return getAuthorAttributionsFieldBuilder() .addBuilder(com.google.maps.places.v1.AuthorAttribution.getDefaultInstance()); } /** * * *
     * Output only. This photo's authors.
     * 
* * * repeated .google.maps.places.v1.AuthorAttribution author_attributions = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public com.google.maps.places.v1.AuthorAttribution.Builder addAuthorAttributionsBuilder( int index) { return getAuthorAttributionsFieldBuilder() .addBuilder(index, com.google.maps.places.v1.AuthorAttribution.getDefaultInstance()); } /** * * *
     * Output only. This photo's authors.
     * 
* * * repeated .google.maps.places.v1.AuthorAttribution author_attributions = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public java.util.List getAuthorAttributionsBuilderList() { return getAuthorAttributionsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.maps.places.v1.AuthorAttribution, com.google.maps.places.v1.AuthorAttribution.Builder, com.google.maps.places.v1.AuthorAttributionOrBuilder> getAuthorAttributionsFieldBuilder() { if (authorAttributionsBuilder_ == null) { authorAttributionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.google.maps.places.v1.AuthorAttribution, com.google.maps.places.v1.AuthorAttribution.Builder, com.google.maps.places.v1.AuthorAttributionOrBuilder>( authorAttributions_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); authorAttributions_ = null; } return authorAttributionsBuilder_; } @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.Photo) } // @@protoc_insertion_point(class_scope:google.maps.places.v1.Photo) private static final com.google.maps.places.v1.Photo DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.maps.places.v1.Photo(); } public static com.google.maps.places.v1.Photo getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public Photo 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.Photo getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy