com.google.maps.places.v1.EVChargeOptions Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of proto-google-maps-places-v1 Show documentation
Show all versions of proto-google-maps-places-v1 Show documentation
Proto library for google-maps-places
/*
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/maps/places/v1/ev_charging.proto
package com.google.maps.places.v1;
/**
*
*
*
* Information about the EV Charge Station hosted in Place.
* Terminology follows
* https://afdc.energy.gov/fuels/electricity_infrastructure.html One port
* could charge one car at a time. One port has one or more connectors. One
* station has one or more ports.
*
*
* Protobuf type {@code google.maps.places.v1.EVChargeOptions}
*/
public final class EVChargeOptions extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.maps.places.v1.EVChargeOptions)
EVChargeOptionsOrBuilder {
private static final long serialVersionUID = 0L;
// Use EVChargeOptions.newBuilder() to construct.
private EVChargeOptions(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private EVChargeOptions() {
connectorAggregation_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new EVChargeOptions();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.maps.places.v1.EvChargingProto
.internal_static_google_maps_places_v1_EVChargeOptions_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.maps.places.v1.EvChargingProto
.internal_static_google_maps_places_v1_EVChargeOptions_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.maps.places.v1.EVChargeOptions.class,
com.google.maps.places.v1.EVChargeOptions.Builder.class);
}
public interface ConnectorAggregationOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.maps.places.v1.EVChargeOptions.ConnectorAggregation)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* The connector type of this aggregation.
*
*
* .google.maps.places.v1.EVConnectorType type = 1;
*
* @return The enum numeric value on the wire for type.
*/
int getTypeValue();
/**
*
*
*
* The connector type of this aggregation.
*
*
* .google.maps.places.v1.EVConnectorType type = 1;
*
* @return The type.
*/
com.google.maps.places.v1.EVConnectorType getType();
/**
*
*
*
* The static max charging rate in kw of each connector in the aggregation.
*
*
* double max_charge_rate_kw = 2;
*
* @return The maxChargeRateKw.
*/
double getMaxChargeRateKw();
/**
*
*
*
* Number of connectors in this aggregation.
*
*
* int32 count = 3;
*
* @return The count.
*/
int getCount();
/**
*
*
*
* Number of connectors in this aggregation that are currently available.
*
*
* optional int32 available_count = 4;
*
* @return Whether the availableCount field is set.
*/
boolean hasAvailableCount();
/**
*
*
*
* Number of connectors in this aggregation that are currently available.
*
*
* optional int32 available_count = 4;
*
* @return The availableCount.
*/
int getAvailableCount();
/**
*
*
*
* Number of connectors in this aggregation that are currently out of
* service.
*
*
* optional int32 out_of_service_count = 5;
*
* @return Whether the outOfServiceCount field is set.
*/
boolean hasOutOfServiceCount();
/**
*
*
*
* Number of connectors in this aggregation that are currently out of
* service.
*
*
* optional int32 out_of_service_count = 5;
*
* @return The outOfServiceCount.
*/
int getOutOfServiceCount();
/**
*
*
*
* The timestamp when the connector availability information in this
* aggregation was last updated.
*
*
* .google.protobuf.Timestamp availability_last_update_time = 6;
*
* @return Whether the availabilityLastUpdateTime field is set.
*/
boolean hasAvailabilityLastUpdateTime();
/**
*
*
*
* The timestamp when the connector availability information in this
* aggregation was last updated.
*
*
* .google.protobuf.Timestamp availability_last_update_time = 6;
*
* @return The availabilityLastUpdateTime.
*/
com.google.protobuf.Timestamp getAvailabilityLastUpdateTime();
/**
*
*
*
* The timestamp when the connector availability information in this
* aggregation was last updated.
*
*
* .google.protobuf.Timestamp availability_last_update_time = 6;
*/
com.google.protobuf.TimestampOrBuilder getAvailabilityLastUpdateTimeOrBuilder();
}
/**
*
*
*
* EV charging information grouped by [type, max_charge_rate_kw].
* Shows EV charge aggregation of connectors that have the same type and max
* charge rate in kw.
*
*
* Protobuf type {@code google.maps.places.v1.EVChargeOptions.ConnectorAggregation}
*/
public static final class ConnectorAggregation extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.maps.places.v1.EVChargeOptions.ConnectorAggregation)
ConnectorAggregationOrBuilder {
private static final long serialVersionUID = 0L;
// Use ConnectorAggregation.newBuilder() to construct.
private ConnectorAggregation(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private ConnectorAggregation() {
type_ = 0;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new ConnectorAggregation();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.maps.places.v1.EvChargingProto
.internal_static_google_maps_places_v1_EVChargeOptions_ConnectorAggregation_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.maps.places.v1.EvChargingProto
.internal_static_google_maps_places_v1_EVChargeOptions_ConnectorAggregation_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.maps.places.v1.EVChargeOptions.ConnectorAggregation.class,
com.google.maps.places.v1.EVChargeOptions.ConnectorAggregation.Builder.class);
}
private int bitField0_;
public static final int TYPE_FIELD_NUMBER = 1;
private int type_ = 0;
/**
*
*
*
* The connector type of this aggregation.
*
*
* .google.maps.places.v1.EVConnectorType type = 1;
*
* @return The enum numeric value on the wire for type.
*/
@java.lang.Override
public int getTypeValue() {
return type_;
}
/**
*
*
*
* The connector type of this aggregation.
*
*
* .google.maps.places.v1.EVConnectorType type = 1;
*
* @return The type.
*/
@java.lang.Override
public com.google.maps.places.v1.EVConnectorType getType() {
com.google.maps.places.v1.EVConnectorType result =
com.google.maps.places.v1.EVConnectorType.forNumber(type_);
return result == null ? com.google.maps.places.v1.EVConnectorType.UNRECOGNIZED : result;
}
public static final int MAX_CHARGE_RATE_KW_FIELD_NUMBER = 2;
private double maxChargeRateKw_ = 0D;
/**
*
*
*
* The static max charging rate in kw of each connector in the aggregation.
*
*
* double max_charge_rate_kw = 2;
*
* @return The maxChargeRateKw.
*/
@java.lang.Override
public double getMaxChargeRateKw() {
return maxChargeRateKw_;
}
public static final int COUNT_FIELD_NUMBER = 3;
private int count_ = 0;
/**
*
*
*
* Number of connectors in this aggregation.
*
*
* int32 count = 3;
*
* @return The count.
*/
@java.lang.Override
public int getCount() {
return count_;
}
public static final int AVAILABLE_COUNT_FIELD_NUMBER = 4;
private int availableCount_ = 0;
/**
*
*
*
* Number of connectors in this aggregation that are currently available.
*
*
* optional int32 available_count = 4;
*
* @return Whether the availableCount field is set.
*/
@java.lang.Override
public boolean hasAvailableCount() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* Number of connectors in this aggregation that are currently available.
*
*
* optional int32 available_count = 4;
*
* @return The availableCount.
*/
@java.lang.Override
public int getAvailableCount() {
return availableCount_;
}
public static final int OUT_OF_SERVICE_COUNT_FIELD_NUMBER = 5;
private int outOfServiceCount_ = 0;
/**
*
*
*
* Number of connectors in this aggregation that are currently out of
* service.
*
*
* optional int32 out_of_service_count = 5;
*
* @return Whether the outOfServiceCount field is set.
*/
@java.lang.Override
public boolean hasOutOfServiceCount() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
*
*
* Number of connectors in this aggregation that are currently out of
* service.
*
*
* optional int32 out_of_service_count = 5;
*
* @return The outOfServiceCount.
*/
@java.lang.Override
public int getOutOfServiceCount() {
return outOfServiceCount_;
}
public static final int AVAILABILITY_LAST_UPDATE_TIME_FIELD_NUMBER = 6;
private com.google.protobuf.Timestamp availabilityLastUpdateTime_;
/**
*
*
*
* The timestamp when the connector availability information in this
* aggregation was last updated.
*
*
* .google.protobuf.Timestamp availability_last_update_time = 6;
*
* @return Whether the availabilityLastUpdateTime field is set.
*/
@java.lang.Override
public boolean hasAvailabilityLastUpdateTime() {
return availabilityLastUpdateTime_ != null;
}
/**
*
*
*
* The timestamp when the connector availability information in this
* aggregation was last updated.
*
*
* .google.protobuf.Timestamp availability_last_update_time = 6;
*
* @return The availabilityLastUpdateTime.
*/
@java.lang.Override
public com.google.protobuf.Timestamp getAvailabilityLastUpdateTime() {
return availabilityLastUpdateTime_ == null
? com.google.protobuf.Timestamp.getDefaultInstance()
: availabilityLastUpdateTime_;
}
/**
*
*
*
* The timestamp when the connector availability information in this
* aggregation was last updated.
*
*
* .google.protobuf.Timestamp availability_last_update_time = 6;
*/
@java.lang.Override
public com.google.protobuf.TimestampOrBuilder getAvailabilityLastUpdateTimeOrBuilder() {
return availabilityLastUpdateTime_ == null
? com.google.protobuf.Timestamp.getDefaultInstance()
: availabilityLastUpdateTime_;
}
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.EVConnectorType.EV_CONNECTOR_TYPE_UNSPECIFIED.getNumber()) {
output.writeEnum(1, type_);
}
if (java.lang.Double.doubleToRawLongBits(maxChargeRateKw_) != 0) {
output.writeDouble(2, maxChargeRateKw_);
}
if (count_ != 0) {
output.writeInt32(3, count_);
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeInt32(4, availableCount_);
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeInt32(5, outOfServiceCount_);
}
if (availabilityLastUpdateTime_ != null) {
output.writeMessage(6, getAvailabilityLastUpdateTime());
}
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.EVConnectorType.EV_CONNECTOR_TYPE_UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, type_);
}
if (java.lang.Double.doubleToRawLongBits(maxChargeRateKw_) != 0) {
size += com.google.protobuf.CodedOutputStream.computeDoubleSize(2, maxChargeRateKw_);
}
if (count_ != 0) {
size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, count_);
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, availableCount_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeInt32Size(5, outOfServiceCount_);
}
if (availabilityLastUpdateTime_ != null) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
6, getAvailabilityLastUpdateTime());
}
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.EVChargeOptions.ConnectorAggregation)) {
return super.equals(obj);
}
com.google.maps.places.v1.EVChargeOptions.ConnectorAggregation other =
(com.google.maps.places.v1.EVChargeOptions.ConnectorAggregation) obj;
if (type_ != other.type_) return false;
if (java.lang.Double.doubleToLongBits(getMaxChargeRateKw())
!= java.lang.Double.doubleToLongBits(other.getMaxChargeRateKw())) return false;
if (getCount() != other.getCount()) return false;
if (hasAvailableCount() != other.hasAvailableCount()) return false;
if (hasAvailableCount()) {
if (getAvailableCount() != other.getAvailableCount()) return false;
}
if (hasOutOfServiceCount() != other.hasOutOfServiceCount()) return false;
if (hasOutOfServiceCount()) {
if (getOutOfServiceCount() != other.getOutOfServiceCount()) return false;
}
if (hasAvailabilityLastUpdateTime() != other.hasAvailabilityLastUpdateTime()) return false;
if (hasAvailabilityLastUpdateTime()) {
if (!getAvailabilityLastUpdateTime().equals(other.getAvailabilityLastUpdateTime()))
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_;
hash = (37 * hash) + MAX_CHARGE_RATE_KW_FIELD_NUMBER;
hash =
(53 * hash)
+ com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getMaxChargeRateKw()));
hash = (37 * hash) + COUNT_FIELD_NUMBER;
hash = (53 * hash) + getCount();
if (hasAvailableCount()) {
hash = (37 * hash) + AVAILABLE_COUNT_FIELD_NUMBER;
hash = (53 * hash) + getAvailableCount();
}
if (hasOutOfServiceCount()) {
hash = (37 * hash) + OUT_OF_SERVICE_COUNT_FIELD_NUMBER;
hash = (53 * hash) + getOutOfServiceCount();
}
if (hasAvailabilityLastUpdateTime()) {
hash = (37 * hash) + AVAILABILITY_LAST_UPDATE_TIME_FIELD_NUMBER;
hash = (53 * hash) + getAvailabilityLastUpdateTime().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.maps.places.v1.EVChargeOptions.ConnectorAggregation parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.maps.places.v1.EVChargeOptions.ConnectorAggregation 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.EVChargeOptions.ConnectorAggregation parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.maps.places.v1.EVChargeOptions.ConnectorAggregation 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.EVChargeOptions.ConnectorAggregation parseFrom(
byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.maps.places.v1.EVChargeOptions.ConnectorAggregation 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.EVChargeOptions.ConnectorAggregation parseFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.maps.places.v1.EVChargeOptions.ConnectorAggregation 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.EVChargeOptions.ConnectorAggregation parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.maps.places.v1.EVChargeOptions.ConnectorAggregation 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.EVChargeOptions.ConnectorAggregation 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.EVChargeOptions.ConnectorAggregation 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.EVChargeOptions.ConnectorAggregation 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;
}
/**
*
*
*
* EV charging information grouped by [type, max_charge_rate_kw].
* Shows EV charge aggregation of connectors that have the same type and max
* charge rate in kw.
*
*
* Protobuf type {@code google.maps.places.v1.EVChargeOptions.ConnectorAggregation}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.maps.places.v1.EVChargeOptions.ConnectorAggregation)
com.google.maps.places.v1.EVChargeOptions.ConnectorAggregationOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.maps.places.v1.EvChargingProto
.internal_static_google_maps_places_v1_EVChargeOptions_ConnectorAggregation_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.maps.places.v1.EvChargingProto
.internal_static_google_maps_places_v1_EVChargeOptions_ConnectorAggregation_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.maps.places.v1.EVChargeOptions.ConnectorAggregation.class,
com.google.maps.places.v1.EVChargeOptions.ConnectorAggregation.Builder.class);
}
// Construct using com.google.maps.places.v1.EVChargeOptions.ConnectorAggregation.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;
maxChargeRateKw_ = 0D;
count_ = 0;
availableCount_ = 0;
outOfServiceCount_ = 0;
availabilityLastUpdateTime_ = null;
if (availabilityLastUpdateTimeBuilder_ != null) {
availabilityLastUpdateTimeBuilder_.dispose();
availabilityLastUpdateTimeBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.maps.places.v1.EvChargingProto
.internal_static_google_maps_places_v1_EVChargeOptions_ConnectorAggregation_descriptor;
}
@java.lang.Override
public com.google.maps.places.v1.EVChargeOptions.ConnectorAggregation
getDefaultInstanceForType() {
return com.google.maps.places.v1.EVChargeOptions.ConnectorAggregation.getDefaultInstance();
}
@java.lang.Override
public com.google.maps.places.v1.EVChargeOptions.ConnectorAggregation build() {
com.google.maps.places.v1.EVChargeOptions.ConnectorAggregation result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.maps.places.v1.EVChargeOptions.ConnectorAggregation buildPartial() {
com.google.maps.places.v1.EVChargeOptions.ConnectorAggregation result =
new com.google.maps.places.v1.EVChargeOptions.ConnectorAggregation(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(
com.google.maps.places.v1.EVChargeOptions.ConnectorAggregation result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.type_ = type_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.maxChargeRateKw_ = maxChargeRateKw_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.count_ = count_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000008) != 0)) {
result.availableCount_ = availableCount_;
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.outOfServiceCount_ = outOfServiceCount_;
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.availabilityLastUpdateTime_ =
availabilityLastUpdateTimeBuilder_ == null
? availabilityLastUpdateTime_
: availabilityLastUpdateTimeBuilder_.build();
}
result.bitField0_ |= to_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.EVChargeOptions.ConnectorAggregation) {
return mergeFrom((com.google.maps.places.v1.EVChargeOptions.ConnectorAggregation) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(
com.google.maps.places.v1.EVChargeOptions.ConnectorAggregation other) {
if (other
== com.google.maps.places.v1.EVChargeOptions.ConnectorAggregation.getDefaultInstance())
return this;
if (other.type_ != 0) {
setTypeValue(other.getTypeValue());
}
if (other.getMaxChargeRateKw() != 0D) {
setMaxChargeRateKw(other.getMaxChargeRateKw());
}
if (other.getCount() != 0) {
setCount(other.getCount());
}
if (other.hasAvailableCount()) {
setAvailableCount(other.getAvailableCount());
}
if (other.hasOutOfServiceCount()) {
setOutOfServiceCount(other.getOutOfServiceCount());
}
if (other.hasAvailabilityLastUpdateTime()) {
mergeAvailabilityLastUpdateTime(other.getAvailabilityLastUpdateTime());
}
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 17:
{
maxChargeRateKw_ = input.readDouble();
bitField0_ |= 0x00000002;
break;
} // case 17
case 24:
{
count_ = input.readInt32();
bitField0_ |= 0x00000004;
break;
} // case 24
case 32:
{
availableCount_ = input.readInt32();
bitField0_ |= 0x00000008;
break;
} // case 32
case 40:
{
outOfServiceCount_ = input.readInt32();
bitField0_ |= 0x00000010;
break;
} // case 40
case 50:
{
input.readMessage(
getAvailabilityLastUpdateTimeFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000020;
break;
} // case 50
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 connector type of this aggregation.
*
*
* .google.maps.places.v1.EVConnectorType type = 1;
*
* @return The enum numeric value on the wire for type.
*/
@java.lang.Override
public int getTypeValue() {
return type_;
}
/**
*
*
*
* The connector type of this aggregation.
*
*
* .google.maps.places.v1.EVConnectorType 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 connector type of this aggregation.
*
*
* .google.maps.places.v1.EVConnectorType type = 1;
*
* @return The type.
*/
@java.lang.Override
public com.google.maps.places.v1.EVConnectorType getType() {
com.google.maps.places.v1.EVConnectorType result =
com.google.maps.places.v1.EVConnectorType.forNumber(type_);
return result == null ? com.google.maps.places.v1.EVConnectorType.UNRECOGNIZED : result;
}
/**
*
*
*
* The connector type of this aggregation.
*
*
* .google.maps.places.v1.EVConnectorType type = 1;
*
* @param value The type to set.
* @return This builder for chaining.
*/
public Builder setType(com.google.maps.places.v1.EVConnectorType value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
type_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
*
* The connector type of this aggregation.
*
*
* .google.maps.places.v1.EVConnectorType type = 1;
*
* @return This builder for chaining.
*/
public Builder clearType() {
bitField0_ = (bitField0_ & ~0x00000001);
type_ = 0;
onChanged();
return this;
}
private double maxChargeRateKw_;
/**
*
*
*
* The static max charging rate in kw of each connector in the aggregation.
*
*
* double max_charge_rate_kw = 2;
*
* @return The maxChargeRateKw.
*/
@java.lang.Override
public double getMaxChargeRateKw() {
return maxChargeRateKw_;
}
/**
*
*
*
* The static max charging rate in kw of each connector in the aggregation.
*
*
* double max_charge_rate_kw = 2;
*
* @param value The maxChargeRateKw to set.
* @return This builder for chaining.
*/
public Builder setMaxChargeRateKw(double value) {
maxChargeRateKw_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* The static max charging rate in kw of each connector in the aggregation.
*
*
* double max_charge_rate_kw = 2;
*
* @return This builder for chaining.
*/
public Builder clearMaxChargeRateKw() {
bitField0_ = (bitField0_ & ~0x00000002);
maxChargeRateKw_ = 0D;
onChanged();
return this;
}
private int count_;
/**
*
*
*
* Number of connectors in this aggregation.
*
*
* int32 count = 3;
*
* @return The count.
*/
@java.lang.Override
public int getCount() {
return count_;
}
/**
*
*
*
* Number of connectors in this aggregation.
*
*
* int32 count = 3;
*
* @param value The count to set.
* @return This builder for chaining.
*/
public Builder setCount(int value) {
count_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* Number of connectors in this aggregation.
*
*
* int32 count = 3;
*
* @return This builder for chaining.
*/
public Builder clearCount() {
bitField0_ = (bitField0_ & ~0x00000004);
count_ = 0;
onChanged();
return this;
}
private int availableCount_;
/**
*
*
*
* Number of connectors in this aggregation that are currently available.
*
*
* optional int32 available_count = 4;
*
* @return Whether the availableCount field is set.
*/
@java.lang.Override
public boolean hasAvailableCount() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
*
*
* Number of connectors in this aggregation that are currently available.
*
*
* optional int32 available_count = 4;
*
* @return The availableCount.
*/
@java.lang.Override
public int getAvailableCount() {
return availableCount_;
}
/**
*
*
*
* Number of connectors in this aggregation that are currently available.
*
*
* optional int32 available_count = 4;
*
* @param value The availableCount to set.
* @return This builder for chaining.
*/
public Builder setAvailableCount(int value) {
availableCount_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* Number of connectors in this aggregation that are currently available.
*
*
* optional int32 available_count = 4;
*
* @return This builder for chaining.
*/
public Builder clearAvailableCount() {
bitField0_ = (bitField0_ & ~0x00000008);
availableCount_ = 0;
onChanged();
return this;
}
private int outOfServiceCount_;
/**
*
*
*
* Number of connectors in this aggregation that are currently out of
* service.
*
*
* optional int32 out_of_service_count = 5;
*
* @return Whether the outOfServiceCount field is set.
*/
@java.lang.Override
public boolean hasOutOfServiceCount() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
*
*
*
* Number of connectors in this aggregation that are currently out of
* service.
*
*
* optional int32 out_of_service_count = 5;
*
* @return The outOfServiceCount.
*/
@java.lang.Override
public int getOutOfServiceCount() {
return outOfServiceCount_;
}
/**
*
*
*
* Number of connectors in this aggregation that are currently out of
* service.
*
*
* optional int32 out_of_service_count = 5;
*
* @param value The outOfServiceCount to set.
* @return This builder for chaining.
*/
public Builder setOutOfServiceCount(int value) {
outOfServiceCount_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*
*
* Number of connectors in this aggregation that are currently out of
* service.
*
*
* optional int32 out_of_service_count = 5;
*
* @return This builder for chaining.
*/
public Builder clearOutOfServiceCount() {
bitField0_ = (bitField0_ & ~0x00000010);
outOfServiceCount_ = 0;
onChanged();
return this;
}
private com.google.protobuf.Timestamp availabilityLastUpdateTime_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp,
com.google.protobuf.Timestamp.Builder,
com.google.protobuf.TimestampOrBuilder>
availabilityLastUpdateTimeBuilder_;
/**
*
*
*
* The timestamp when the connector availability information in this
* aggregation was last updated.
*
*
* .google.protobuf.Timestamp availability_last_update_time = 6;
*
* @return Whether the availabilityLastUpdateTime field is set.
*/
public boolean hasAvailabilityLastUpdateTime() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
*
*
*
* The timestamp when the connector availability information in this
* aggregation was last updated.
*
*
* .google.protobuf.Timestamp availability_last_update_time = 6;
*
* @return The availabilityLastUpdateTime.
*/
public com.google.protobuf.Timestamp getAvailabilityLastUpdateTime() {
if (availabilityLastUpdateTimeBuilder_ == null) {
return availabilityLastUpdateTime_ == null
? com.google.protobuf.Timestamp.getDefaultInstance()
: availabilityLastUpdateTime_;
} else {
return availabilityLastUpdateTimeBuilder_.getMessage();
}
}
/**
*
*
*
* The timestamp when the connector availability information in this
* aggregation was last updated.
*
*
* .google.protobuf.Timestamp availability_last_update_time = 6;
*/
public Builder setAvailabilityLastUpdateTime(com.google.protobuf.Timestamp value) {
if (availabilityLastUpdateTimeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
availabilityLastUpdateTime_ = value;
} else {
availabilityLastUpdateTimeBuilder_.setMessage(value);
}
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
*
*
* The timestamp when the connector availability information in this
* aggregation was last updated.
*
*
* .google.protobuf.Timestamp availability_last_update_time = 6;
*/
public Builder setAvailabilityLastUpdateTime(
com.google.protobuf.Timestamp.Builder builderForValue) {
if (availabilityLastUpdateTimeBuilder_ == null) {
availabilityLastUpdateTime_ = builderForValue.build();
} else {
availabilityLastUpdateTimeBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
*
*
* The timestamp when the connector availability information in this
* aggregation was last updated.
*
*
* .google.protobuf.Timestamp availability_last_update_time = 6;
*/
public Builder mergeAvailabilityLastUpdateTime(com.google.protobuf.Timestamp value) {
if (availabilityLastUpdateTimeBuilder_ == null) {
if (((bitField0_ & 0x00000020) != 0)
&& availabilityLastUpdateTime_ != null
&& availabilityLastUpdateTime_
!= com.google.protobuf.Timestamp.getDefaultInstance()) {
getAvailabilityLastUpdateTimeBuilder().mergeFrom(value);
} else {
availabilityLastUpdateTime_ = value;
}
} else {
availabilityLastUpdateTimeBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
*
*
* The timestamp when the connector availability information in this
* aggregation was last updated.
*
*
* .google.protobuf.Timestamp availability_last_update_time = 6;
*/
public Builder clearAvailabilityLastUpdateTime() {
bitField0_ = (bitField0_ & ~0x00000020);
availabilityLastUpdateTime_ = null;
if (availabilityLastUpdateTimeBuilder_ != null) {
availabilityLastUpdateTimeBuilder_.dispose();
availabilityLastUpdateTimeBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* The timestamp when the connector availability information in this
* aggregation was last updated.
*
*
* .google.protobuf.Timestamp availability_last_update_time = 6;
*/
public com.google.protobuf.Timestamp.Builder getAvailabilityLastUpdateTimeBuilder() {
bitField0_ |= 0x00000020;
onChanged();
return getAvailabilityLastUpdateTimeFieldBuilder().getBuilder();
}
/**
*
*
*
* The timestamp when the connector availability information in this
* aggregation was last updated.
*
*
* .google.protobuf.Timestamp availability_last_update_time = 6;
*/
public com.google.protobuf.TimestampOrBuilder getAvailabilityLastUpdateTimeOrBuilder() {
if (availabilityLastUpdateTimeBuilder_ != null) {
return availabilityLastUpdateTimeBuilder_.getMessageOrBuilder();
} else {
return availabilityLastUpdateTime_ == null
? com.google.protobuf.Timestamp.getDefaultInstance()
: availabilityLastUpdateTime_;
}
}
/**
*
*
*
* The timestamp when the connector availability information in this
* aggregation was last updated.
*
*
* .google.protobuf.Timestamp availability_last_update_time = 6;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp,
com.google.protobuf.Timestamp.Builder,
com.google.protobuf.TimestampOrBuilder>
getAvailabilityLastUpdateTimeFieldBuilder() {
if (availabilityLastUpdateTimeBuilder_ == null) {
availabilityLastUpdateTimeBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp,
com.google.protobuf.Timestamp.Builder,
com.google.protobuf.TimestampOrBuilder>(
getAvailabilityLastUpdateTime(), getParentForChildren(), isClean());
availabilityLastUpdateTime_ = null;
}
return availabilityLastUpdateTimeBuilder_;
}
@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.EVChargeOptions.ConnectorAggregation)
}
// @@protoc_insertion_point(class_scope:google.maps.places.v1.EVChargeOptions.ConnectorAggregation)
private static final com.google.maps.places.v1.EVChargeOptions.ConnectorAggregation
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.maps.places.v1.EVChargeOptions.ConnectorAggregation();
}
public static com.google.maps.places.v1.EVChargeOptions.ConnectorAggregation
getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ConnectorAggregation 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.EVChargeOptions.ConnectorAggregation
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public static final int CONNECTOR_COUNT_FIELD_NUMBER = 1;
private int connectorCount_ = 0;
/**
*
*
*
* Number of connectors at this station. However, because some ports can have
* multiple connectors but only be able to charge one car at a time (e.g.) the
* number of connectors may be greater than the total number of cars which can
* charge simultaneously.
*
*
* int32 connector_count = 1;
*
* @return The connectorCount.
*/
@java.lang.Override
public int getConnectorCount() {
return connectorCount_;
}
public static final int CONNECTOR_AGGREGATION_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private java.util.List
connectorAggregation_;
/**
*
*
*
* A list of EV charging connector aggregations that contain connectors of the
* same type and same charge rate.
*
*
*
* repeated .google.maps.places.v1.EVChargeOptions.ConnectorAggregation connector_aggregation = 2;
*
*/
@java.lang.Override
public java.util.List
getConnectorAggregationList() {
return connectorAggregation_;
}
/**
*
*
*
* A list of EV charging connector aggregations that contain connectors of the
* same type and same charge rate.
*
*
*
* repeated .google.maps.places.v1.EVChargeOptions.ConnectorAggregation connector_aggregation = 2;
*
*/
@java.lang.Override
public java.util.List<
? extends com.google.maps.places.v1.EVChargeOptions.ConnectorAggregationOrBuilder>
getConnectorAggregationOrBuilderList() {
return connectorAggregation_;
}
/**
*
*
*
* A list of EV charging connector aggregations that contain connectors of the
* same type and same charge rate.
*
*
*
* repeated .google.maps.places.v1.EVChargeOptions.ConnectorAggregation connector_aggregation = 2;
*
*/
@java.lang.Override
public int getConnectorAggregationCount() {
return connectorAggregation_.size();
}
/**
*
*
*
* A list of EV charging connector aggregations that contain connectors of the
* same type and same charge rate.
*
*
*
* repeated .google.maps.places.v1.EVChargeOptions.ConnectorAggregation connector_aggregation = 2;
*
*/
@java.lang.Override
public com.google.maps.places.v1.EVChargeOptions.ConnectorAggregation getConnectorAggregation(
int index) {
return connectorAggregation_.get(index);
}
/**
*
*
*
* A list of EV charging connector aggregations that contain connectors of the
* same type and same charge rate.
*
*
*
* repeated .google.maps.places.v1.EVChargeOptions.ConnectorAggregation connector_aggregation = 2;
*
*/
@java.lang.Override
public com.google.maps.places.v1.EVChargeOptions.ConnectorAggregationOrBuilder
getConnectorAggregationOrBuilder(int index) {
return connectorAggregation_.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 (connectorCount_ != 0) {
output.writeInt32(1, connectorCount_);
}
for (int i = 0; i < connectorAggregation_.size(); i++) {
output.writeMessage(2, connectorAggregation_.get(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (connectorCount_ != 0) {
size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, connectorCount_);
}
for (int i = 0; i < connectorAggregation_.size(); i++) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(2, connectorAggregation_.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.EVChargeOptions)) {
return super.equals(obj);
}
com.google.maps.places.v1.EVChargeOptions other =
(com.google.maps.places.v1.EVChargeOptions) obj;
if (getConnectorCount() != other.getConnectorCount()) return false;
if (!getConnectorAggregationList().equals(other.getConnectorAggregationList())) 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) + CONNECTOR_COUNT_FIELD_NUMBER;
hash = (53 * hash) + getConnectorCount();
if (getConnectorAggregationCount() > 0) {
hash = (37 * hash) + CONNECTOR_AGGREGATION_FIELD_NUMBER;
hash = (53 * hash) + getConnectorAggregationList().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.maps.places.v1.EVChargeOptions parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.maps.places.v1.EVChargeOptions 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.EVChargeOptions parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.maps.places.v1.EVChargeOptions 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.EVChargeOptions parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.maps.places.v1.EVChargeOptions 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.EVChargeOptions parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.maps.places.v1.EVChargeOptions 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.EVChargeOptions parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.maps.places.v1.EVChargeOptions 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.EVChargeOptions 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.EVChargeOptions 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.EVChargeOptions 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 the EV Charge Station hosted in Place.
* Terminology follows
* https://afdc.energy.gov/fuels/electricity_infrastructure.html One port
* could charge one car at a time. One port has one or more connectors. One
* station has one or more ports.
*
*
* Protobuf type {@code google.maps.places.v1.EVChargeOptions}
*/
public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.maps.places.v1.EVChargeOptions)
com.google.maps.places.v1.EVChargeOptionsOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.maps.places.v1.EvChargingProto
.internal_static_google_maps_places_v1_EVChargeOptions_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.maps.places.v1.EvChargingProto
.internal_static_google_maps_places_v1_EVChargeOptions_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.maps.places.v1.EVChargeOptions.class,
com.google.maps.places.v1.EVChargeOptions.Builder.class);
}
// Construct using com.google.maps.places.v1.EVChargeOptions.newBuilder()
private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
connectorCount_ = 0;
if (connectorAggregationBuilder_ == null) {
connectorAggregation_ = java.util.Collections.emptyList();
} else {
connectorAggregation_ = null;
connectorAggregationBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.maps.places.v1.EvChargingProto
.internal_static_google_maps_places_v1_EVChargeOptions_descriptor;
}
@java.lang.Override
public com.google.maps.places.v1.EVChargeOptions getDefaultInstanceForType() {
return com.google.maps.places.v1.EVChargeOptions.getDefaultInstance();
}
@java.lang.Override
public com.google.maps.places.v1.EVChargeOptions build() {
com.google.maps.places.v1.EVChargeOptions result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.maps.places.v1.EVChargeOptions buildPartial() {
com.google.maps.places.v1.EVChargeOptions result =
new com.google.maps.places.v1.EVChargeOptions(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartialRepeatedFields(com.google.maps.places.v1.EVChargeOptions result) {
if (connectorAggregationBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)) {
connectorAggregation_ = java.util.Collections.unmodifiableList(connectorAggregation_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.connectorAggregation_ = connectorAggregation_;
} else {
result.connectorAggregation_ = connectorAggregationBuilder_.build();
}
}
private void buildPartial0(com.google.maps.places.v1.EVChargeOptions result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.connectorCount_ = connectorCount_;
}
}
@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.EVChargeOptions) {
return mergeFrom((com.google.maps.places.v1.EVChargeOptions) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.maps.places.v1.EVChargeOptions other) {
if (other == com.google.maps.places.v1.EVChargeOptions.getDefaultInstance()) return this;
if (other.getConnectorCount() != 0) {
setConnectorCount(other.getConnectorCount());
}
if (connectorAggregationBuilder_ == null) {
if (!other.connectorAggregation_.isEmpty()) {
if (connectorAggregation_.isEmpty()) {
connectorAggregation_ = other.connectorAggregation_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureConnectorAggregationIsMutable();
connectorAggregation_.addAll(other.connectorAggregation_);
}
onChanged();
}
} else {
if (!other.connectorAggregation_.isEmpty()) {
if (connectorAggregationBuilder_.isEmpty()) {
connectorAggregationBuilder_.dispose();
connectorAggregationBuilder_ = null;
connectorAggregation_ = other.connectorAggregation_;
bitField0_ = (bitField0_ & ~0x00000002);
connectorAggregationBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
? getConnectorAggregationFieldBuilder()
: null;
} else {
connectorAggregationBuilder_.addAllMessages(other.connectorAggregation_);
}
}
}
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:
{
connectorCount_ = input.readInt32();
bitField0_ |= 0x00000001;
break;
} // case 8
case 18:
{
com.google.maps.places.v1.EVChargeOptions.ConnectorAggregation m =
input.readMessage(
com.google.maps.places.v1.EVChargeOptions.ConnectorAggregation.parser(),
extensionRegistry);
if (connectorAggregationBuilder_ == null) {
ensureConnectorAggregationIsMutable();
connectorAggregation_.add(m);
} else {
connectorAggregationBuilder_.addMessage(m);
}
break;
} // case 18
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private int connectorCount_;
/**
*
*
*
* Number of connectors at this station. However, because some ports can have
* multiple connectors but only be able to charge one car at a time (e.g.) the
* number of connectors may be greater than the total number of cars which can
* charge simultaneously.
*
*
* int32 connector_count = 1;
*
* @return The connectorCount.
*/
@java.lang.Override
public int getConnectorCount() {
return connectorCount_;
}
/**
*
*
*
* Number of connectors at this station. However, because some ports can have
* multiple connectors but only be able to charge one car at a time (e.g.) the
* number of connectors may be greater than the total number of cars which can
* charge simultaneously.
*
*
* int32 connector_count = 1;
*
* @param value The connectorCount to set.
* @return This builder for chaining.
*/
public Builder setConnectorCount(int value) {
connectorCount_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Number of connectors at this station. However, because some ports can have
* multiple connectors but only be able to charge one car at a time (e.g.) the
* number of connectors may be greater than the total number of cars which can
* charge simultaneously.
*
*
* int32 connector_count = 1;
*
* @return This builder for chaining.
*/
public Builder clearConnectorCount() {
bitField0_ = (bitField0_ & ~0x00000001);
connectorCount_ = 0;
onChanged();
return this;
}
private java.util.List
connectorAggregation_ = java.util.Collections.emptyList();
private void ensureConnectorAggregationIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
connectorAggregation_ =
new java.util.ArrayList(
connectorAggregation_);
bitField0_ |= 0x00000002;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.maps.places.v1.EVChargeOptions.ConnectorAggregation,
com.google.maps.places.v1.EVChargeOptions.ConnectorAggregation.Builder,
com.google.maps.places.v1.EVChargeOptions.ConnectorAggregationOrBuilder>
connectorAggregationBuilder_;
/**
*
*
*
* A list of EV charging connector aggregations that contain connectors of the
* same type and same charge rate.
*
*
*
* repeated .google.maps.places.v1.EVChargeOptions.ConnectorAggregation connector_aggregation = 2;
*
*/
public java.util.List
getConnectorAggregationList() {
if (connectorAggregationBuilder_ == null) {
return java.util.Collections.unmodifiableList(connectorAggregation_);
} else {
return connectorAggregationBuilder_.getMessageList();
}
}
/**
*
*
*
* A list of EV charging connector aggregations that contain connectors of the
* same type and same charge rate.
*
*
*
* repeated .google.maps.places.v1.EVChargeOptions.ConnectorAggregation connector_aggregation = 2;
*
*/
public int getConnectorAggregationCount() {
if (connectorAggregationBuilder_ == null) {
return connectorAggregation_.size();
} else {
return connectorAggregationBuilder_.getCount();
}
}
/**
*
*
*
* A list of EV charging connector aggregations that contain connectors of the
* same type and same charge rate.
*
*
*
* repeated .google.maps.places.v1.EVChargeOptions.ConnectorAggregation connector_aggregation = 2;
*
*/
public com.google.maps.places.v1.EVChargeOptions.ConnectorAggregation getConnectorAggregation(
int index) {
if (connectorAggregationBuilder_ == null) {
return connectorAggregation_.get(index);
} else {
return connectorAggregationBuilder_.getMessage(index);
}
}
/**
*
*
*
* A list of EV charging connector aggregations that contain connectors of the
* same type and same charge rate.
*
*
*
* repeated .google.maps.places.v1.EVChargeOptions.ConnectorAggregation connector_aggregation = 2;
*
*/
public Builder setConnectorAggregation(
int index, com.google.maps.places.v1.EVChargeOptions.ConnectorAggregation value) {
if (connectorAggregationBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureConnectorAggregationIsMutable();
connectorAggregation_.set(index, value);
onChanged();
} else {
connectorAggregationBuilder_.setMessage(index, value);
}
return this;
}
/**
*
*
*
* A list of EV charging connector aggregations that contain connectors of the
* same type and same charge rate.
*
*
*
* repeated .google.maps.places.v1.EVChargeOptions.ConnectorAggregation connector_aggregation = 2;
*
*/
public Builder setConnectorAggregation(
int index,
com.google.maps.places.v1.EVChargeOptions.ConnectorAggregation.Builder builderForValue) {
if (connectorAggregationBuilder_ == null) {
ensureConnectorAggregationIsMutable();
connectorAggregation_.set(index, builderForValue.build());
onChanged();
} else {
connectorAggregationBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* A list of EV charging connector aggregations that contain connectors of the
* same type and same charge rate.
*
*
*
* repeated .google.maps.places.v1.EVChargeOptions.ConnectorAggregation connector_aggregation = 2;
*
*/
public Builder addConnectorAggregation(
com.google.maps.places.v1.EVChargeOptions.ConnectorAggregation value) {
if (connectorAggregationBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureConnectorAggregationIsMutable();
connectorAggregation_.add(value);
onChanged();
} else {
connectorAggregationBuilder_.addMessage(value);
}
return this;
}
/**
*
*
*
* A list of EV charging connector aggregations that contain connectors of the
* same type and same charge rate.
*
*
*
* repeated .google.maps.places.v1.EVChargeOptions.ConnectorAggregation connector_aggregation = 2;
*
*/
public Builder addConnectorAggregation(
int index, com.google.maps.places.v1.EVChargeOptions.ConnectorAggregation value) {
if (connectorAggregationBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureConnectorAggregationIsMutable();
connectorAggregation_.add(index, value);
onChanged();
} else {
connectorAggregationBuilder_.addMessage(index, value);
}
return this;
}
/**
*
*
*
* A list of EV charging connector aggregations that contain connectors of the
* same type and same charge rate.
*
*
*
* repeated .google.maps.places.v1.EVChargeOptions.ConnectorAggregation connector_aggregation = 2;
*
*/
public Builder addConnectorAggregation(
com.google.maps.places.v1.EVChargeOptions.ConnectorAggregation.Builder builderForValue) {
if (connectorAggregationBuilder_ == null) {
ensureConnectorAggregationIsMutable();
connectorAggregation_.add(builderForValue.build());
onChanged();
} else {
connectorAggregationBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
*
*
* A list of EV charging connector aggregations that contain connectors of the
* same type and same charge rate.
*
*
*
* repeated .google.maps.places.v1.EVChargeOptions.ConnectorAggregation connector_aggregation = 2;
*
*/
public Builder addConnectorAggregation(
int index,
com.google.maps.places.v1.EVChargeOptions.ConnectorAggregation.Builder builderForValue) {
if (connectorAggregationBuilder_ == null) {
ensureConnectorAggregationIsMutable();
connectorAggregation_.add(index, builderForValue.build());
onChanged();
} else {
connectorAggregationBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* A list of EV charging connector aggregations that contain connectors of the
* same type and same charge rate.
*
*
*
* repeated .google.maps.places.v1.EVChargeOptions.ConnectorAggregation connector_aggregation = 2;
*
*/
public Builder addAllConnectorAggregation(
java.lang.Iterable
values) {
if (connectorAggregationBuilder_ == null) {
ensureConnectorAggregationIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, connectorAggregation_);
onChanged();
} else {
connectorAggregationBuilder_.addAllMessages(values);
}
return this;
}
/**
*
*
*
* A list of EV charging connector aggregations that contain connectors of the
* same type and same charge rate.
*
*
*
* repeated .google.maps.places.v1.EVChargeOptions.ConnectorAggregation connector_aggregation = 2;
*
*/
public Builder clearConnectorAggregation() {
if (connectorAggregationBuilder_ == null) {
connectorAggregation_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
} else {
connectorAggregationBuilder_.clear();
}
return this;
}
/**
*
*
*
* A list of EV charging connector aggregations that contain connectors of the
* same type and same charge rate.
*
*
*
* repeated .google.maps.places.v1.EVChargeOptions.ConnectorAggregation connector_aggregation = 2;
*
*/
public Builder removeConnectorAggregation(int index) {
if (connectorAggregationBuilder_ == null) {
ensureConnectorAggregationIsMutable();
connectorAggregation_.remove(index);
onChanged();
} else {
connectorAggregationBuilder_.remove(index);
}
return this;
}
/**
*
*
*
* A list of EV charging connector aggregations that contain connectors of the
* same type and same charge rate.
*
*
*
* repeated .google.maps.places.v1.EVChargeOptions.ConnectorAggregation connector_aggregation = 2;
*
*/
public com.google.maps.places.v1.EVChargeOptions.ConnectorAggregation.Builder
getConnectorAggregationBuilder(int index) {
return getConnectorAggregationFieldBuilder().getBuilder(index);
}
/**
*
*
*
* A list of EV charging connector aggregations that contain connectors of the
* same type and same charge rate.
*
*
*
* repeated .google.maps.places.v1.EVChargeOptions.ConnectorAggregation connector_aggregation = 2;
*
*/
public com.google.maps.places.v1.EVChargeOptions.ConnectorAggregationOrBuilder
getConnectorAggregationOrBuilder(int index) {
if (connectorAggregationBuilder_ == null) {
return connectorAggregation_.get(index);
} else {
return connectorAggregationBuilder_.getMessageOrBuilder(index);
}
}
/**
*
*
*
* A list of EV charging connector aggregations that contain connectors of the
* same type and same charge rate.
*
*
*
* repeated .google.maps.places.v1.EVChargeOptions.ConnectorAggregation connector_aggregation = 2;
*
*/
public java.util.List<
? extends com.google.maps.places.v1.EVChargeOptions.ConnectorAggregationOrBuilder>
getConnectorAggregationOrBuilderList() {
if (connectorAggregationBuilder_ != null) {
return connectorAggregationBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(connectorAggregation_);
}
}
/**
*
*
*
* A list of EV charging connector aggregations that contain connectors of the
* same type and same charge rate.
*
*
*
* repeated .google.maps.places.v1.EVChargeOptions.ConnectorAggregation connector_aggregation = 2;
*
*/
public com.google.maps.places.v1.EVChargeOptions.ConnectorAggregation.Builder
addConnectorAggregationBuilder() {
return getConnectorAggregationFieldBuilder()
.addBuilder(
com.google.maps.places.v1.EVChargeOptions.ConnectorAggregation.getDefaultInstance());
}
/**
*
*
*
* A list of EV charging connector aggregations that contain connectors of the
* same type and same charge rate.
*
*
*
* repeated .google.maps.places.v1.EVChargeOptions.ConnectorAggregation connector_aggregation = 2;
*
*/
public com.google.maps.places.v1.EVChargeOptions.ConnectorAggregation.Builder
addConnectorAggregationBuilder(int index) {
return getConnectorAggregationFieldBuilder()
.addBuilder(
index,
com.google.maps.places.v1.EVChargeOptions.ConnectorAggregation.getDefaultInstance());
}
/**
*
*
*
* A list of EV charging connector aggregations that contain connectors of the
* same type and same charge rate.
*
*
*
* repeated .google.maps.places.v1.EVChargeOptions.ConnectorAggregation connector_aggregation = 2;
*
*/
public java.util.List
getConnectorAggregationBuilderList() {
return getConnectorAggregationFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.maps.places.v1.EVChargeOptions.ConnectorAggregation,
com.google.maps.places.v1.EVChargeOptions.ConnectorAggregation.Builder,
com.google.maps.places.v1.EVChargeOptions.ConnectorAggregationOrBuilder>
getConnectorAggregationFieldBuilder() {
if (connectorAggregationBuilder_ == null) {
connectorAggregationBuilder_ =
new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.maps.places.v1.EVChargeOptions.ConnectorAggregation,
com.google.maps.places.v1.EVChargeOptions.ConnectorAggregation.Builder,
com.google.maps.places.v1.EVChargeOptions.ConnectorAggregationOrBuilder>(
connectorAggregation_,
((bitField0_ & 0x00000002) != 0),
getParentForChildren(),
isClean());
connectorAggregation_ = null;
}
return connectorAggregationBuilder_;
}
@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.EVChargeOptions)
}
// @@protoc_insertion_point(class_scope:google.maps.places.v1.EVChargeOptions)
private static final com.google.maps.places.v1.EVChargeOptions DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.maps.places.v1.EVChargeOptions();
}
public static com.google.maps.places.v1.EVChargeOptions getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public EVChargeOptions 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.EVChargeOptions getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}