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

com.google.maps.places.v1.FuelOptions 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/fuel_options.proto

package com.google.maps.places.v1;

/**
 *
 *
 * 
 * The most recent information about fuel options in a gas station. This
 * information is updated regularly.
 * 
* * Protobuf type {@code google.maps.places.v1.FuelOptions} */ public final class FuelOptions extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.maps.places.v1.FuelOptions) FuelOptionsOrBuilder { private static final long serialVersionUID = 0L; // Use FuelOptions.newBuilder() to construct. private FuelOptions(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private FuelOptions() { fuelPrices_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new FuelOptions(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.maps.places.v1.FuelOptionsProto .internal_static_google_maps_places_v1_FuelOptions_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.maps.places.v1.FuelOptionsProto .internal_static_google_maps_places_v1_FuelOptions_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.maps.places.v1.FuelOptions.class, com.google.maps.places.v1.FuelOptions.Builder.class); } public interface FuelPriceOrBuilder extends // @@protoc_insertion_point(interface_extends:google.maps.places.v1.FuelOptions.FuelPrice) com.google.protobuf.MessageOrBuilder { /** * * *
     * The type of fuel.
     * 
* * .google.maps.places.v1.FuelOptions.FuelPrice.FuelType type = 1; * * @return The enum numeric value on the wire for type. */ int getTypeValue(); /** * * *
     * The type of fuel.
     * 
* * .google.maps.places.v1.FuelOptions.FuelPrice.FuelType type = 1; * * @return The type. */ com.google.maps.places.v1.FuelOptions.FuelPrice.FuelType getType(); /** * * *
     * The price of the fuel.
     * 
* * .google.type.Money price = 2; * * @return Whether the price field is set. */ boolean hasPrice(); /** * * *
     * The price of the fuel.
     * 
* * .google.type.Money price = 2; * * @return The price. */ com.google.type.Money getPrice(); /** * * *
     * The price of the fuel.
     * 
* * .google.type.Money price = 2; */ com.google.type.MoneyOrBuilder getPriceOrBuilder(); /** * * *
     * The time the fuel price was last updated.
     * 
* * .google.protobuf.Timestamp update_time = 3; * * @return Whether the updateTime field is set. */ boolean hasUpdateTime(); /** * * *
     * The time the fuel price was last updated.
     * 
* * .google.protobuf.Timestamp update_time = 3; * * @return The updateTime. */ com.google.protobuf.Timestamp getUpdateTime(); /** * * *
     * The time the fuel price was last updated.
     * 
* * .google.protobuf.Timestamp update_time = 3; */ com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); } /** * * *
   * Fuel price information for a given type.
   * 
* * Protobuf type {@code google.maps.places.v1.FuelOptions.FuelPrice} */ public static final class FuelPrice extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.maps.places.v1.FuelOptions.FuelPrice) FuelPriceOrBuilder { private static final long serialVersionUID = 0L; // Use FuelPrice.newBuilder() to construct. private FuelPrice(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private FuelPrice() { type_ = 0; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new FuelPrice(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.maps.places.v1.FuelOptionsProto .internal_static_google_maps_places_v1_FuelOptions_FuelPrice_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.maps.places.v1.FuelOptionsProto .internal_static_google_maps_places_v1_FuelOptions_FuelPrice_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.maps.places.v1.FuelOptions.FuelPrice.class, com.google.maps.places.v1.FuelOptions.FuelPrice.Builder.class); } /** * * *
     * Types of fuel.
     * 
* * Protobuf enum {@code google.maps.places.v1.FuelOptions.FuelPrice.FuelType} */ public enum FuelType implements com.google.protobuf.ProtocolMessageEnum { /** * * *
       * Unspecified fuel type.
       * 
* * FUEL_TYPE_UNSPECIFIED = 0; */ FUEL_TYPE_UNSPECIFIED(0), /** * * *
       * Diesel fuel.
       * 
* * DIESEL = 1; */ DIESEL(1), /** * * *
       * Regular unleaded.
       * 
* * REGULAR_UNLEADED = 2; */ REGULAR_UNLEADED(2), /** * * *
       * Midgrade.
       * 
* * MIDGRADE = 3; */ MIDGRADE(3), /** * * *
       * Premium.
       * 
* * PREMIUM = 4; */ PREMIUM(4), /** * * *
       * SP 91.
       * 
* * SP91 = 5; */ SP91(5), /** * * *
       * SP 91 E10.
       * 
* * SP91_E10 = 6; */ SP91_E10(6), /** * * *
       * SP 92.
       * 
* * SP92 = 7; */ SP92(7), /** * * *
       * SP 95.
       * 
* * SP95 = 8; */ SP95(8), /** * * *
       * SP95 E10.
       * 
* * SP95_E10 = 9; */ SP95_E10(9), /** * * *
       * SP 98.
       * 
* * SP98 = 10; */ SP98(10), /** * * *
       * SP 99.
       * 
* * SP99 = 11; */ SP99(11), /** * * *
       * SP 100.
       * 
* * SP100 = 12; */ SP100(12), /** * * *
       * LPG.
       * 
* * LPG = 13; */ LPG(13), /** * * *
       * E 80.
       * 
* * E80 = 14; */ E80(14), /** * * *
       * E 85.
       * 
* * E85 = 15; */ E85(15), /** * * *
       * Methane.
       * 
* * METHANE = 16; */ METHANE(16), /** * * *
       * Bio-diesel.
       * 
* * BIO_DIESEL = 17; */ BIO_DIESEL(17), /** * * *
       * Truck diesel.
       * 
* * TRUCK_DIESEL = 18; */ TRUCK_DIESEL(18), UNRECOGNIZED(-1), ; /** * * *
       * Unspecified fuel type.
       * 
* * FUEL_TYPE_UNSPECIFIED = 0; */ public static final int FUEL_TYPE_UNSPECIFIED_VALUE = 0; /** * * *
       * Diesel fuel.
       * 
* * DIESEL = 1; */ public static final int DIESEL_VALUE = 1; /** * * *
       * Regular unleaded.
       * 
* * REGULAR_UNLEADED = 2; */ public static final int REGULAR_UNLEADED_VALUE = 2; /** * * *
       * Midgrade.
       * 
* * MIDGRADE = 3; */ public static final int MIDGRADE_VALUE = 3; /** * * *
       * Premium.
       * 
* * PREMIUM = 4; */ public static final int PREMIUM_VALUE = 4; /** * * *
       * SP 91.
       * 
* * SP91 = 5; */ public static final int SP91_VALUE = 5; /** * * *
       * SP 91 E10.
       * 
* * SP91_E10 = 6; */ public static final int SP91_E10_VALUE = 6; /** * * *
       * SP 92.
       * 
* * SP92 = 7; */ public static final int SP92_VALUE = 7; /** * * *
       * SP 95.
       * 
* * SP95 = 8; */ public static final int SP95_VALUE = 8; /** * * *
       * SP95 E10.
       * 
* * SP95_E10 = 9; */ public static final int SP95_E10_VALUE = 9; /** * * *
       * SP 98.
       * 
* * SP98 = 10; */ public static final int SP98_VALUE = 10; /** * * *
       * SP 99.
       * 
* * SP99 = 11; */ public static final int SP99_VALUE = 11; /** * * *
       * SP 100.
       * 
* * SP100 = 12; */ public static final int SP100_VALUE = 12; /** * * *
       * LPG.
       * 
* * LPG = 13; */ public static final int LPG_VALUE = 13; /** * * *
       * E 80.
       * 
* * E80 = 14; */ public static final int E80_VALUE = 14; /** * * *
       * E 85.
       * 
* * E85 = 15; */ public static final int E85_VALUE = 15; /** * * *
       * Methane.
       * 
* * METHANE = 16; */ public static final int METHANE_VALUE = 16; /** * * *
       * Bio-diesel.
       * 
* * BIO_DIESEL = 17; */ public static final int BIO_DIESEL_VALUE = 17; /** * * *
       * Truck diesel.
       * 
* * TRUCK_DIESEL = 18; */ public static final int TRUCK_DIESEL_VALUE = 18; 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 FuelType 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 FuelType forNumber(int value) { switch (value) { case 0: return FUEL_TYPE_UNSPECIFIED; case 1: return DIESEL; case 2: return REGULAR_UNLEADED; case 3: return MIDGRADE; case 4: return PREMIUM; case 5: return SP91; case 6: return SP91_E10; case 7: return SP92; case 8: return SP95; case 9: return SP95_E10; case 10: return SP98; case 11: return SP99; case 12: return SP100; case 13: return LPG; case 14: return E80; case 15: return E85; case 16: return METHANE; case 17: return BIO_DIESEL; case 18: return TRUCK_DIESEL; 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 FuelType findValueByNumber(int number) { return FuelType.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.FuelOptions.FuelPrice.getDescriptor() .getEnumTypes() .get(0); } private static final FuelType[] VALUES = values(); public static FuelType 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 FuelType(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:google.maps.places.v1.FuelOptions.FuelPrice.FuelType) } public static final int TYPE_FIELD_NUMBER = 1; private int type_ = 0; /** * * *
     * The type of fuel.
     * 
* * .google.maps.places.v1.FuelOptions.FuelPrice.FuelType type = 1; * * @return The enum numeric value on the wire for type. */ @java.lang.Override public int getTypeValue() { return type_; } /** * * *
     * The type of fuel.
     * 
* * .google.maps.places.v1.FuelOptions.FuelPrice.FuelType type = 1; * * @return The type. */ @java.lang.Override public com.google.maps.places.v1.FuelOptions.FuelPrice.FuelType getType() { com.google.maps.places.v1.FuelOptions.FuelPrice.FuelType result = com.google.maps.places.v1.FuelOptions.FuelPrice.FuelType.forNumber(type_); return result == null ? com.google.maps.places.v1.FuelOptions.FuelPrice.FuelType.UNRECOGNIZED : result; } public static final int PRICE_FIELD_NUMBER = 2; private com.google.type.Money price_; /** * * *
     * The price of the fuel.
     * 
* * .google.type.Money price = 2; * * @return Whether the price field is set. */ @java.lang.Override public boolean hasPrice() { return price_ != null; } /** * * *
     * The price of the fuel.
     * 
* * .google.type.Money price = 2; * * @return The price. */ @java.lang.Override public com.google.type.Money getPrice() { return price_ == null ? com.google.type.Money.getDefaultInstance() : price_; } /** * * *
     * The price of the fuel.
     * 
* * .google.type.Money price = 2; */ @java.lang.Override public com.google.type.MoneyOrBuilder getPriceOrBuilder() { return price_ == null ? com.google.type.Money.getDefaultInstance() : price_; } public static final int UPDATE_TIME_FIELD_NUMBER = 3; private com.google.protobuf.Timestamp updateTime_; /** * * *
     * The time the fuel price was last updated.
     * 
* * .google.protobuf.Timestamp update_time = 3; * * @return Whether the updateTime field is set. */ @java.lang.Override public boolean hasUpdateTime() { return updateTime_ != null; } /** * * *
     * The time the fuel price was last updated.
     * 
* * .google.protobuf.Timestamp update_time = 3; * * @return The updateTime. */ @java.lang.Override public com.google.protobuf.Timestamp getUpdateTime() { return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; } /** * * *
     * The time the fuel price was last updated.
     * 
* * .google.protobuf.Timestamp update_time = 3; */ @java.lang.Override public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; } 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 (type_ != com.google.maps.places.v1.FuelOptions.FuelPrice.FuelType.FUEL_TYPE_UNSPECIFIED .getNumber()) { output.writeEnum(1, type_); } if (price_ != null) { output.writeMessage(2, getPrice()); } if (updateTime_ != null) { output.writeMessage(3, getUpdateTime()); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (type_ != com.google.maps.places.v1.FuelOptions.FuelPrice.FuelType.FUEL_TYPE_UNSPECIFIED .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, type_); } if (price_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getPrice()); } if (updateTime_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateTime()); } 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.FuelOptions.FuelPrice)) { return super.equals(obj); } com.google.maps.places.v1.FuelOptions.FuelPrice other = (com.google.maps.places.v1.FuelOptions.FuelPrice) obj; if (type_ != other.type_) return false; if (hasPrice() != other.hasPrice()) return false; if (hasPrice()) { if (!getPrice().equals(other.getPrice())) return false; } if (hasUpdateTime() != other.hasUpdateTime()) return false; if (hasUpdateTime()) { if (!getUpdateTime().equals(other.getUpdateTime())) 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) + TYPE_FIELD_NUMBER; hash = (53 * hash) + type_; if (hasPrice()) { hash = (37 * hash) + PRICE_FIELD_NUMBER; hash = (53 * hash) + getPrice().hashCode(); } if (hasUpdateTime()) { hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; hash = (53 * hash) + getUpdateTime().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.maps.places.v1.FuelOptions.FuelPrice parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.maps.places.v1.FuelOptions.FuelPrice 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.FuelOptions.FuelPrice parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.maps.places.v1.FuelOptions.FuelPrice 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.FuelOptions.FuelPrice parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.maps.places.v1.FuelOptions.FuelPrice 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.FuelOptions.FuelPrice parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.maps.places.v1.FuelOptions.FuelPrice 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.FuelOptions.FuelPrice parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.maps.places.v1.FuelOptions.FuelPrice 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.FuelOptions.FuelPrice 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.FuelOptions.FuelPrice 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.FuelOptions.FuelPrice 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; } /** * * *
     * Fuel price information for a given type.
     * 
* * Protobuf type {@code google.maps.places.v1.FuelOptions.FuelPrice} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.maps.places.v1.FuelOptions.FuelPrice) com.google.maps.places.v1.FuelOptions.FuelPriceOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.maps.places.v1.FuelOptionsProto .internal_static_google_maps_places_v1_FuelOptions_FuelPrice_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.maps.places.v1.FuelOptionsProto .internal_static_google_maps_places_v1_FuelOptions_FuelPrice_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.maps.places.v1.FuelOptions.FuelPrice.class, com.google.maps.places.v1.FuelOptions.FuelPrice.Builder.class); } // Construct using com.google.maps.places.v1.FuelOptions.FuelPrice.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; type_ = 0; price_ = null; if (priceBuilder_ != null) { priceBuilder_.dispose(); priceBuilder_ = null; } updateTime_ = null; if (updateTimeBuilder_ != null) { updateTimeBuilder_.dispose(); updateTimeBuilder_ = null; } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.maps.places.v1.FuelOptionsProto .internal_static_google_maps_places_v1_FuelOptions_FuelPrice_descriptor; } @java.lang.Override public com.google.maps.places.v1.FuelOptions.FuelPrice getDefaultInstanceForType() { return com.google.maps.places.v1.FuelOptions.FuelPrice.getDefaultInstance(); } @java.lang.Override public com.google.maps.places.v1.FuelOptions.FuelPrice build() { com.google.maps.places.v1.FuelOptions.FuelPrice result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.maps.places.v1.FuelOptions.FuelPrice buildPartial() { com.google.maps.places.v1.FuelOptions.FuelPrice result = new com.google.maps.places.v1.FuelOptions.FuelPrice(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(com.google.maps.places.v1.FuelOptions.FuelPrice result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.type_ = type_; } if (((from_bitField0_ & 0x00000002) != 0)) { result.price_ = priceBuilder_ == null ? price_ : priceBuilder_.build(); } if (((from_bitField0_ & 0x00000004) != 0)) { result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.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.FuelOptions.FuelPrice) { return mergeFrom((com.google.maps.places.v1.FuelOptions.FuelPrice) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.maps.places.v1.FuelOptions.FuelPrice other) { if (other == com.google.maps.places.v1.FuelOptions.FuelPrice.getDefaultInstance()) return this; if (other.type_ != 0) { setTypeValue(other.getTypeValue()); } if (other.hasPrice()) { mergePrice(other.getPrice()); } if (other.hasUpdateTime()) { mergeUpdateTime(other.getUpdateTime()); } 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 8: { type_ = input.readEnum(); bitField0_ |= 0x00000001; break; } // case 8 case 18: { input.readMessage(getPriceFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 case 26: { input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 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 int type_ = 0; /** * * *
       * The type of fuel.
       * 
* * .google.maps.places.v1.FuelOptions.FuelPrice.FuelType type = 1; * * @return The enum numeric value on the wire for type. */ @java.lang.Override public int getTypeValue() { return type_; } /** * * *
       * The type of fuel.
       * 
* * .google.maps.places.v1.FuelOptions.FuelPrice.FuelType type = 1; * * @param value The enum numeric value on the wire for type to set. * @return This builder for chaining. */ public Builder setTypeValue(int value) { type_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** * * *
       * The type of fuel.
       * 
* * .google.maps.places.v1.FuelOptions.FuelPrice.FuelType type = 1; * * @return The type. */ @java.lang.Override public com.google.maps.places.v1.FuelOptions.FuelPrice.FuelType getType() { com.google.maps.places.v1.FuelOptions.FuelPrice.FuelType result = com.google.maps.places.v1.FuelOptions.FuelPrice.FuelType.forNumber(type_); return result == null ? com.google.maps.places.v1.FuelOptions.FuelPrice.FuelType.UNRECOGNIZED : result; } /** * * *
       * The type of fuel.
       * 
* * .google.maps.places.v1.FuelOptions.FuelPrice.FuelType type = 1; * * @param value The type to set. * @return This builder for chaining. */ public Builder setType(com.google.maps.places.v1.FuelOptions.FuelPrice.FuelType value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; type_ = value.getNumber(); onChanged(); return this; } /** * * *
       * The type of fuel.
       * 
* * .google.maps.places.v1.FuelOptions.FuelPrice.FuelType type = 1; * * @return This builder for chaining. */ public Builder clearType() { bitField0_ = (bitField0_ & ~0x00000001); type_ = 0; onChanged(); return this; } private com.google.type.Money price_; private com.google.protobuf.SingleFieldBuilderV3< com.google.type.Money, com.google.type.Money.Builder, com.google.type.MoneyOrBuilder> priceBuilder_; /** * * *
       * The price of the fuel.
       * 
* * .google.type.Money price = 2; * * @return Whether the price field is set. */ public boolean hasPrice() { return ((bitField0_ & 0x00000002) != 0); } /** * * *
       * The price of the fuel.
       * 
* * .google.type.Money price = 2; * * @return The price. */ public com.google.type.Money getPrice() { if (priceBuilder_ == null) { return price_ == null ? com.google.type.Money.getDefaultInstance() : price_; } else { return priceBuilder_.getMessage(); } } /** * * *
       * The price of the fuel.
       * 
* * .google.type.Money price = 2; */ public Builder setPrice(com.google.type.Money value) { if (priceBuilder_ == null) { if (value == null) { throw new NullPointerException(); } price_ = value; } else { priceBuilder_.setMessage(value); } bitField0_ |= 0x00000002; onChanged(); return this; } /** * * *
       * The price of the fuel.
       * 
* * .google.type.Money price = 2; */ public Builder setPrice(com.google.type.Money.Builder builderForValue) { if (priceBuilder_ == null) { price_ = builderForValue.build(); } else { priceBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000002; onChanged(); return this; } /** * * *
       * The price of the fuel.
       * 
* * .google.type.Money price = 2; */ public Builder mergePrice(com.google.type.Money value) { if (priceBuilder_ == null) { if (((bitField0_ & 0x00000002) != 0) && price_ != null && price_ != com.google.type.Money.getDefaultInstance()) { getPriceBuilder().mergeFrom(value); } else { price_ = value; } } else { priceBuilder_.mergeFrom(value); } bitField0_ |= 0x00000002; onChanged(); return this; } /** * * *
       * The price of the fuel.
       * 
* * .google.type.Money price = 2; */ public Builder clearPrice() { bitField0_ = (bitField0_ & ~0x00000002); price_ = null; if (priceBuilder_ != null) { priceBuilder_.dispose(); priceBuilder_ = null; } onChanged(); return this; } /** * * *
       * The price of the fuel.
       * 
* * .google.type.Money price = 2; */ public com.google.type.Money.Builder getPriceBuilder() { bitField0_ |= 0x00000002; onChanged(); return getPriceFieldBuilder().getBuilder(); } /** * * *
       * The price of the fuel.
       * 
* * .google.type.Money price = 2; */ public com.google.type.MoneyOrBuilder getPriceOrBuilder() { if (priceBuilder_ != null) { return priceBuilder_.getMessageOrBuilder(); } else { return price_ == null ? com.google.type.Money.getDefaultInstance() : price_; } } /** * * *
       * The price of the fuel.
       * 
* * .google.type.Money price = 2; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.type.Money, com.google.type.Money.Builder, com.google.type.MoneyOrBuilder> getPriceFieldBuilder() { if (priceBuilder_ == null) { priceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.type.Money, com.google.type.Money.Builder, com.google.type.MoneyOrBuilder>(getPrice(), getParentForChildren(), isClean()); price_ = null; } return priceBuilder_; } private com.google.protobuf.Timestamp updateTime_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> updateTimeBuilder_; /** * * *
       * The time the fuel price was last updated.
       * 
* * .google.protobuf.Timestamp update_time = 3; * * @return Whether the updateTime field is set. */ public boolean hasUpdateTime() { return ((bitField0_ & 0x00000004) != 0); } /** * * *
       * The time the fuel price was last updated.
       * 
* * .google.protobuf.Timestamp update_time = 3; * * @return The updateTime. */ public com.google.protobuf.Timestamp getUpdateTime() { if (updateTimeBuilder_ == null) { return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; } else { return updateTimeBuilder_.getMessage(); } } /** * * *
       * The time the fuel price was last updated.
       * 
* * .google.protobuf.Timestamp update_time = 3; */ public Builder setUpdateTime(com.google.protobuf.Timestamp value) { if (updateTimeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } updateTime_ = value; } else { updateTimeBuilder_.setMessage(value); } bitField0_ |= 0x00000004; onChanged(); return this; } /** * * *
       * The time the fuel price was last updated.
       * 
* * .google.protobuf.Timestamp update_time = 3; */ public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { if (updateTimeBuilder_ == null) { updateTime_ = builderForValue.build(); } else { updateTimeBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000004; onChanged(); return this; } /** * * *
       * The time the fuel price was last updated.
       * 
* * .google.protobuf.Timestamp update_time = 3; */ public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { if (updateTimeBuilder_ == null) { if (((bitField0_ & 0x00000004) != 0) && updateTime_ != null && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { getUpdateTimeBuilder().mergeFrom(value); } else { updateTime_ = value; } } else { updateTimeBuilder_.mergeFrom(value); } bitField0_ |= 0x00000004; onChanged(); return this; } /** * * *
       * The time the fuel price was last updated.
       * 
* * .google.protobuf.Timestamp update_time = 3; */ public Builder clearUpdateTime() { bitField0_ = (bitField0_ & ~0x00000004); updateTime_ = null; if (updateTimeBuilder_ != null) { updateTimeBuilder_.dispose(); updateTimeBuilder_ = null; } onChanged(); return this; } /** * * *
       * The time the fuel price was last updated.
       * 
* * .google.protobuf.Timestamp update_time = 3; */ public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { bitField0_ |= 0x00000004; onChanged(); return getUpdateTimeFieldBuilder().getBuilder(); } /** * * *
       * The time the fuel price was last updated.
       * 
* * .google.protobuf.Timestamp update_time = 3; */ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { if (updateTimeBuilder_ != null) { return updateTimeBuilder_.getMessageOrBuilder(); } else { return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; } } /** * * *
       * The time the fuel price was last updated.
       * 
* * .google.protobuf.Timestamp update_time = 3; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> getUpdateTimeFieldBuilder() { if (updateTimeBuilder_ == null) { updateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( getUpdateTime(), getParentForChildren(), isClean()); updateTime_ = null; } return updateTimeBuilder_; } @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.FuelOptions.FuelPrice) } // @@protoc_insertion_point(class_scope:google.maps.places.v1.FuelOptions.FuelPrice) private static final com.google.maps.places.v1.FuelOptions.FuelPrice DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.maps.places.v1.FuelOptions.FuelPrice(); } public static com.google.maps.places.v1.FuelOptions.FuelPrice getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public FuelPrice 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.FuelOptions.FuelPrice getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public static final int FUEL_PRICES_FIELD_NUMBER = 1; @SuppressWarnings("serial") private java.util.List fuelPrices_; /** * * *
   * The last known fuel price for each type of fuel this station has. There is
   * one entry per fuel type this station has. Order is not important.
   * 
* * repeated .google.maps.places.v1.FuelOptions.FuelPrice fuel_prices = 1; */ @java.lang.Override public java.util.List getFuelPricesList() { return fuelPrices_; } /** * * *
   * The last known fuel price for each type of fuel this station has. There is
   * one entry per fuel type this station has. Order is not important.
   * 
* * repeated .google.maps.places.v1.FuelOptions.FuelPrice fuel_prices = 1; */ @java.lang.Override public java.util.List getFuelPricesOrBuilderList() { return fuelPrices_; } /** * * *
   * The last known fuel price for each type of fuel this station has. There is
   * one entry per fuel type this station has. Order is not important.
   * 
* * repeated .google.maps.places.v1.FuelOptions.FuelPrice fuel_prices = 1; */ @java.lang.Override public int getFuelPricesCount() { return fuelPrices_.size(); } /** * * *
   * The last known fuel price for each type of fuel this station has. There is
   * one entry per fuel type this station has. Order is not important.
   * 
* * repeated .google.maps.places.v1.FuelOptions.FuelPrice fuel_prices = 1; */ @java.lang.Override public com.google.maps.places.v1.FuelOptions.FuelPrice getFuelPrices(int index) { return fuelPrices_.get(index); } /** * * *
   * The last known fuel price for each type of fuel this station has. There is
   * one entry per fuel type this station has. Order is not important.
   * 
* * repeated .google.maps.places.v1.FuelOptions.FuelPrice fuel_prices = 1; */ @java.lang.Override public com.google.maps.places.v1.FuelOptions.FuelPriceOrBuilder getFuelPricesOrBuilder( int index) { return fuelPrices_.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 { for (int i = 0; i < fuelPrices_.size(); i++) { output.writeMessage(1, fuelPrices_.get(i)); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; for (int i = 0; i < fuelPrices_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, fuelPrices_.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.FuelOptions)) { return super.equals(obj); } com.google.maps.places.v1.FuelOptions other = (com.google.maps.places.v1.FuelOptions) obj; if (!getFuelPricesList().equals(other.getFuelPricesList())) 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(); if (getFuelPricesCount() > 0) { hash = (37 * hash) + FUEL_PRICES_FIELD_NUMBER; hash = (53 * hash) + getFuelPricesList().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.maps.places.v1.FuelOptions parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.maps.places.v1.FuelOptions 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.FuelOptions parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.maps.places.v1.FuelOptions 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.FuelOptions parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.maps.places.v1.FuelOptions 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.FuelOptions parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.maps.places.v1.FuelOptions 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.FuelOptions parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.maps.places.v1.FuelOptions 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.FuelOptions 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.FuelOptions 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.FuelOptions 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 most recent information about fuel options in a gas station. This
   * information is updated regularly.
   * 
* * Protobuf type {@code google.maps.places.v1.FuelOptions} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.maps.places.v1.FuelOptions) com.google.maps.places.v1.FuelOptionsOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.maps.places.v1.FuelOptionsProto .internal_static_google_maps_places_v1_FuelOptions_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.maps.places.v1.FuelOptionsProto .internal_static_google_maps_places_v1_FuelOptions_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.maps.places.v1.FuelOptions.class, com.google.maps.places.v1.FuelOptions.Builder.class); } // Construct using com.google.maps.places.v1.FuelOptions.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; if (fuelPricesBuilder_ == null) { fuelPrices_ = java.util.Collections.emptyList(); } else { fuelPrices_ = null; fuelPricesBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000001); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.maps.places.v1.FuelOptionsProto .internal_static_google_maps_places_v1_FuelOptions_descriptor; } @java.lang.Override public com.google.maps.places.v1.FuelOptions getDefaultInstanceForType() { return com.google.maps.places.v1.FuelOptions.getDefaultInstance(); } @java.lang.Override public com.google.maps.places.v1.FuelOptions build() { com.google.maps.places.v1.FuelOptions result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.maps.places.v1.FuelOptions buildPartial() { com.google.maps.places.v1.FuelOptions result = new com.google.maps.places.v1.FuelOptions(this); buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartialRepeatedFields(com.google.maps.places.v1.FuelOptions result) { if (fuelPricesBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { fuelPrices_ = java.util.Collections.unmodifiableList(fuelPrices_); bitField0_ = (bitField0_ & ~0x00000001); } result.fuelPrices_ = fuelPrices_; } else { result.fuelPrices_ = fuelPricesBuilder_.build(); } } private void buildPartial0(com.google.maps.places.v1.FuelOptions result) { int from_bitField0_ = bitField0_; } @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.FuelOptions) { return mergeFrom((com.google.maps.places.v1.FuelOptions) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.maps.places.v1.FuelOptions other) { if (other == com.google.maps.places.v1.FuelOptions.getDefaultInstance()) return this; if (fuelPricesBuilder_ == null) { if (!other.fuelPrices_.isEmpty()) { if (fuelPrices_.isEmpty()) { fuelPrices_ = other.fuelPrices_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureFuelPricesIsMutable(); fuelPrices_.addAll(other.fuelPrices_); } onChanged(); } } else { if (!other.fuelPrices_.isEmpty()) { if (fuelPricesBuilder_.isEmpty()) { fuelPricesBuilder_.dispose(); fuelPricesBuilder_ = null; fuelPrices_ = other.fuelPrices_; bitField0_ = (bitField0_ & ~0x00000001); fuelPricesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getFuelPricesFieldBuilder() : null; } else { fuelPricesBuilder_.addAllMessages(other.fuelPrices_); } } } 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: { com.google.maps.places.v1.FuelOptions.FuelPrice m = input.readMessage( com.google.maps.places.v1.FuelOptions.FuelPrice.parser(), extensionRegistry); if (fuelPricesBuilder_ == null) { ensureFuelPricesIsMutable(); fuelPrices_.add(m); } else { fuelPricesBuilder_.addMessage(m); } break; } // case 10 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private java.util.List fuelPrices_ = java.util.Collections.emptyList(); private void ensureFuelPricesIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { fuelPrices_ = new java.util.ArrayList(fuelPrices_); bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.maps.places.v1.FuelOptions.FuelPrice, com.google.maps.places.v1.FuelOptions.FuelPrice.Builder, com.google.maps.places.v1.FuelOptions.FuelPriceOrBuilder> fuelPricesBuilder_; /** * * *
     * The last known fuel price for each type of fuel this station has. There is
     * one entry per fuel type this station has. Order is not important.
     * 
* * repeated .google.maps.places.v1.FuelOptions.FuelPrice fuel_prices = 1; */ public java.util.List getFuelPricesList() { if (fuelPricesBuilder_ == null) { return java.util.Collections.unmodifiableList(fuelPrices_); } else { return fuelPricesBuilder_.getMessageList(); } } /** * * *
     * The last known fuel price for each type of fuel this station has. There is
     * one entry per fuel type this station has. Order is not important.
     * 
* * repeated .google.maps.places.v1.FuelOptions.FuelPrice fuel_prices = 1; */ public int getFuelPricesCount() { if (fuelPricesBuilder_ == null) { return fuelPrices_.size(); } else { return fuelPricesBuilder_.getCount(); } } /** * * *
     * The last known fuel price for each type of fuel this station has. There is
     * one entry per fuel type this station has. Order is not important.
     * 
* * repeated .google.maps.places.v1.FuelOptions.FuelPrice fuel_prices = 1; */ public com.google.maps.places.v1.FuelOptions.FuelPrice getFuelPrices(int index) { if (fuelPricesBuilder_ == null) { return fuelPrices_.get(index); } else { return fuelPricesBuilder_.getMessage(index); } } /** * * *
     * The last known fuel price for each type of fuel this station has. There is
     * one entry per fuel type this station has. Order is not important.
     * 
* * repeated .google.maps.places.v1.FuelOptions.FuelPrice fuel_prices = 1; */ public Builder setFuelPrices(int index, com.google.maps.places.v1.FuelOptions.FuelPrice value) { if (fuelPricesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureFuelPricesIsMutable(); fuelPrices_.set(index, value); onChanged(); } else { fuelPricesBuilder_.setMessage(index, value); } return this; } /** * * *
     * The last known fuel price for each type of fuel this station has. There is
     * one entry per fuel type this station has. Order is not important.
     * 
* * repeated .google.maps.places.v1.FuelOptions.FuelPrice fuel_prices = 1; */ public Builder setFuelPrices( int index, com.google.maps.places.v1.FuelOptions.FuelPrice.Builder builderForValue) { if (fuelPricesBuilder_ == null) { ensureFuelPricesIsMutable(); fuelPrices_.set(index, builderForValue.build()); onChanged(); } else { fuelPricesBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * * *
     * The last known fuel price for each type of fuel this station has. There is
     * one entry per fuel type this station has. Order is not important.
     * 
* * repeated .google.maps.places.v1.FuelOptions.FuelPrice fuel_prices = 1; */ public Builder addFuelPrices(com.google.maps.places.v1.FuelOptions.FuelPrice value) { if (fuelPricesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureFuelPricesIsMutable(); fuelPrices_.add(value); onChanged(); } else { fuelPricesBuilder_.addMessage(value); } return this; } /** * * *
     * The last known fuel price for each type of fuel this station has. There is
     * one entry per fuel type this station has. Order is not important.
     * 
* * repeated .google.maps.places.v1.FuelOptions.FuelPrice fuel_prices = 1; */ public Builder addFuelPrices(int index, com.google.maps.places.v1.FuelOptions.FuelPrice value) { if (fuelPricesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureFuelPricesIsMutable(); fuelPrices_.add(index, value); onChanged(); } else { fuelPricesBuilder_.addMessage(index, value); } return this; } /** * * *
     * The last known fuel price for each type of fuel this station has. There is
     * one entry per fuel type this station has. Order is not important.
     * 
* * repeated .google.maps.places.v1.FuelOptions.FuelPrice fuel_prices = 1; */ public Builder addFuelPrices( com.google.maps.places.v1.FuelOptions.FuelPrice.Builder builderForValue) { if (fuelPricesBuilder_ == null) { ensureFuelPricesIsMutable(); fuelPrices_.add(builderForValue.build()); onChanged(); } else { fuelPricesBuilder_.addMessage(builderForValue.build()); } return this; } /** * * *
     * The last known fuel price for each type of fuel this station has. There is
     * one entry per fuel type this station has. Order is not important.
     * 
* * repeated .google.maps.places.v1.FuelOptions.FuelPrice fuel_prices = 1; */ public Builder addFuelPrices( int index, com.google.maps.places.v1.FuelOptions.FuelPrice.Builder builderForValue) { if (fuelPricesBuilder_ == null) { ensureFuelPricesIsMutable(); fuelPrices_.add(index, builderForValue.build()); onChanged(); } else { fuelPricesBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * * *
     * The last known fuel price for each type of fuel this station has. There is
     * one entry per fuel type this station has. Order is not important.
     * 
* * repeated .google.maps.places.v1.FuelOptions.FuelPrice fuel_prices = 1; */ public Builder addAllFuelPrices( java.lang.Iterable values) { if (fuelPricesBuilder_ == null) { ensureFuelPricesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, fuelPrices_); onChanged(); } else { fuelPricesBuilder_.addAllMessages(values); } return this; } /** * * *
     * The last known fuel price for each type of fuel this station has. There is
     * one entry per fuel type this station has. Order is not important.
     * 
* * repeated .google.maps.places.v1.FuelOptions.FuelPrice fuel_prices = 1; */ public Builder clearFuelPrices() { if (fuelPricesBuilder_ == null) { fuelPrices_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { fuelPricesBuilder_.clear(); } return this; } /** * * *
     * The last known fuel price for each type of fuel this station has. There is
     * one entry per fuel type this station has. Order is not important.
     * 
* * repeated .google.maps.places.v1.FuelOptions.FuelPrice fuel_prices = 1; */ public Builder removeFuelPrices(int index) { if (fuelPricesBuilder_ == null) { ensureFuelPricesIsMutable(); fuelPrices_.remove(index); onChanged(); } else { fuelPricesBuilder_.remove(index); } return this; } /** * * *
     * The last known fuel price for each type of fuel this station has. There is
     * one entry per fuel type this station has. Order is not important.
     * 
* * repeated .google.maps.places.v1.FuelOptions.FuelPrice fuel_prices = 1; */ public com.google.maps.places.v1.FuelOptions.FuelPrice.Builder getFuelPricesBuilder(int index) { return getFuelPricesFieldBuilder().getBuilder(index); } /** * * *
     * The last known fuel price for each type of fuel this station has. There is
     * one entry per fuel type this station has. Order is not important.
     * 
* * repeated .google.maps.places.v1.FuelOptions.FuelPrice fuel_prices = 1; */ public com.google.maps.places.v1.FuelOptions.FuelPriceOrBuilder getFuelPricesOrBuilder( int index) { if (fuelPricesBuilder_ == null) { return fuelPrices_.get(index); } else { return fuelPricesBuilder_.getMessageOrBuilder(index); } } /** * * *
     * The last known fuel price for each type of fuel this station has. There is
     * one entry per fuel type this station has. Order is not important.
     * 
* * repeated .google.maps.places.v1.FuelOptions.FuelPrice fuel_prices = 1; */ public java.util.List getFuelPricesOrBuilderList() { if (fuelPricesBuilder_ != null) { return fuelPricesBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(fuelPrices_); } } /** * * *
     * The last known fuel price for each type of fuel this station has. There is
     * one entry per fuel type this station has. Order is not important.
     * 
* * repeated .google.maps.places.v1.FuelOptions.FuelPrice fuel_prices = 1; */ public com.google.maps.places.v1.FuelOptions.FuelPrice.Builder addFuelPricesBuilder() { return getFuelPricesFieldBuilder() .addBuilder(com.google.maps.places.v1.FuelOptions.FuelPrice.getDefaultInstance()); } /** * * *
     * The last known fuel price for each type of fuel this station has. There is
     * one entry per fuel type this station has. Order is not important.
     * 
* * repeated .google.maps.places.v1.FuelOptions.FuelPrice fuel_prices = 1; */ public com.google.maps.places.v1.FuelOptions.FuelPrice.Builder addFuelPricesBuilder(int index) { return getFuelPricesFieldBuilder() .addBuilder(index, com.google.maps.places.v1.FuelOptions.FuelPrice.getDefaultInstance()); } /** * * *
     * The last known fuel price for each type of fuel this station has. There is
     * one entry per fuel type this station has. Order is not important.
     * 
* * repeated .google.maps.places.v1.FuelOptions.FuelPrice fuel_prices = 1; */ public java.util.List getFuelPricesBuilderList() { return getFuelPricesFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.maps.places.v1.FuelOptions.FuelPrice, com.google.maps.places.v1.FuelOptions.FuelPrice.Builder, com.google.maps.places.v1.FuelOptions.FuelPriceOrBuilder> getFuelPricesFieldBuilder() { if (fuelPricesBuilder_ == null) { fuelPricesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.google.maps.places.v1.FuelOptions.FuelPrice, com.google.maps.places.v1.FuelOptions.FuelPrice.Builder, com.google.maps.places.v1.FuelOptions.FuelPriceOrBuilder>( fuelPrices_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); fuelPrices_ = null; } return fuelPricesBuilder_; } @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.FuelOptions) } // @@protoc_insertion_point(class_scope:google.maps.places.v1.FuelOptions) private static final com.google.maps.places.v1.FuelOptions DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.maps.places.v1.FuelOptions(); } public static com.google.maps.places.v1.FuelOptions getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public FuelOptions 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.FuelOptions getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy