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

com.google.maps.routeoptimization.v1.OptimizeToursValidationError Maven / Gradle / Ivy

/*
 * Copyright 2024 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/routeoptimization/v1/route_optimization_service.proto

// Protobuf Java Version: 3.25.5
package com.google.maps.routeoptimization.v1;

/**
 *
 *
 * 
 * Describes an error or warning encountered when validating an
 * `OptimizeToursRequest`.
 * 
* * Protobuf type {@code google.maps.routeoptimization.v1.OptimizeToursValidationError} */ public final class OptimizeToursValidationError extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.maps.routeoptimization.v1.OptimizeToursValidationError) OptimizeToursValidationErrorOrBuilder { private static final long serialVersionUID = 0L; // Use OptimizeToursValidationError.newBuilder() to construct. private OptimizeToursValidationError(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private OptimizeToursValidationError() { displayName_ = ""; fields_ = java.util.Collections.emptyList(); errorMessage_ = ""; offendingValues_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new OptimizeToursValidationError(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.maps.routeoptimization.v1.RouteOptimizationServiceProto .internal_static_google_maps_routeoptimization_v1_OptimizeToursValidationError_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.maps.routeoptimization.v1.RouteOptimizationServiceProto .internal_static_google_maps_routeoptimization_v1_OptimizeToursValidationError_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.maps.routeoptimization.v1.OptimizeToursValidationError.class, com.google.maps.routeoptimization.v1.OptimizeToursValidationError.Builder.class); } public interface FieldReferenceOrBuilder extends // @@protoc_insertion_point(interface_extends:google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference) com.google.protobuf.MessageOrBuilder { /** * * *
     * Name of the field, e.g., "vehicles".
     * 
* * string name = 1; * * @return The name. */ java.lang.String getName(); /** * * *
     * Name of the field, e.g., "vehicles".
     * 
* * string name = 1; * * @return The bytes for name. */ com.google.protobuf.ByteString getNameBytes(); /** * * *
     * Index of the field if repeated.
     * 
* * int32 index = 2; * * @return Whether the index field is set. */ boolean hasIndex(); /** * * *
     * Index of the field if repeated.
     * 
* * int32 index = 2; * * @return The index. */ int getIndex(); /** * * *
     * Key if the field is a map.
     * 
* * string key = 4; * * @return Whether the key field is set. */ boolean hasKey(); /** * * *
     * Key if the field is a map.
     * 
* * string key = 4; * * @return The key. */ java.lang.String getKey(); /** * * *
     * Key if the field is a map.
     * 
* * string key = 4; * * @return The bytes for key. */ com.google.protobuf.ByteString getKeyBytes(); /** * * *
     * Recursively nested sub-field, if needed.
     * 
* * * .google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference sub_field = 3; * * * @return Whether the subField field is set. */ boolean hasSubField(); /** * * *
     * Recursively nested sub-field, if needed.
     * 
* * * .google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference sub_field = 3; * * * @return The subField. */ com.google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference getSubField(); /** * * *
     * Recursively nested sub-field, if needed.
     * 
* * * .google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference sub_field = 3; * */ com.google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReferenceOrBuilder getSubFieldOrBuilder(); com.google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference.IndexOrKeyCase getIndexOrKeyCase(); } /** * * *
   * Specifies a context for the validation error. A `FieldReference` always
   * refers to a given field in this file and follows the same hierarchical
   * structure. For example, we may specify element #2 of `start_time_windows`
   * of vehicle #5 using:
   * ```
   * name: "vehicles" index: 5 sub_field { name: "end_time_windows" index: 2 }
   * ```
   * We however omit top-level entities such as `OptimizeToursRequest` or
   * `ShipmentModel` to avoid crowding the message.
   * 
* * Protobuf type {@code * google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference} */ public static final class FieldReference extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference) FieldReferenceOrBuilder { private static final long serialVersionUID = 0L; // Use FieldReference.newBuilder() to construct. private FieldReference(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private FieldReference() { name_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new FieldReference(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.maps.routeoptimization.v1.RouteOptimizationServiceProto .internal_static_google_maps_routeoptimization_v1_OptimizeToursValidationError_FieldReference_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.maps.routeoptimization.v1.RouteOptimizationServiceProto .internal_static_google_maps_routeoptimization_v1_OptimizeToursValidationError_FieldReference_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference .class, com.google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference .Builder.class); } private int bitField0_; private int indexOrKeyCase_ = 0; @SuppressWarnings("serial") private java.lang.Object indexOrKey_; public enum IndexOrKeyCase implements com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { INDEX(2), KEY(4), INDEXORKEY_NOT_SET(0); private final int value; private IndexOrKeyCase(int value) { this.value = value; } /** * @param value The number of the enum to look for. * @return The enum associated with the given number. * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static IndexOrKeyCase valueOf(int value) { return forNumber(value); } public static IndexOrKeyCase forNumber(int value) { switch (value) { case 2: return INDEX; case 4: return KEY; case 0: return INDEXORKEY_NOT_SET; default: return null; } } public int getNumber() { return this.value; } }; public IndexOrKeyCase getIndexOrKeyCase() { return IndexOrKeyCase.forNumber(indexOrKeyCase_); } public static final int NAME_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; /** * * *
     * Name of the field, e.g., "vehicles".
     * 
* * string name = 1; * * @return The name. */ @java.lang.Override public java.lang.String getName() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } } /** * * *
     * Name of the field, e.g., "vehicles".
     * 
* * string name = 1; * * @return The bytes for name. */ @java.lang.Override public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int INDEX_FIELD_NUMBER = 2; /** * * *
     * Index of the field if repeated.
     * 
* * int32 index = 2; * * @return Whether the index field is set. */ @java.lang.Override public boolean hasIndex() { return indexOrKeyCase_ == 2; } /** * * *
     * Index of the field if repeated.
     * 
* * int32 index = 2; * * @return The index. */ @java.lang.Override public int getIndex() { if (indexOrKeyCase_ == 2) { return (java.lang.Integer) indexOrKey_; } return 0; } public static final int KEY_FIELD_NUMBER = 4; /** * * *
     * Key if the field is a map.
     * 
* * string key = 4; * * @return Whether the key field is set. */ public boolean hasKey() { return indexOrKeyCase_ == 4; } /** * * *
     * Key if the field is a map.
     * 
* * string key = 4; * * @return The key. */ public java.lang.String getKey() { java.lang.Object ref = ""; if (indexOrKeyCase_ == 4) { ref = indexOrKey_; } if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (indexOrKeyCase_ == 4) { indexOrKey_ = s; } return s; } } /** * * *
     * Key if the field is a map.
     * 
* * string key = 4; * * @return The bytes for key. */ public com.google.protobuf.ByteString getKeyBytes() { java.lang.Object ref = ""; if (indexOrKeyCase_ == 4) { ref = indexOrKey_; } if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); if (indexOrKeyCase_ == 4) { indexOrKey_ = b; } return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int SUB_FIELD_FIELD_NUMBER = 3; private com.google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference subField_; /** * * *
     * Recursively nested sub-field, if needed.
     * 
* * * .google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference sub_field = 3; * * * @return Whether the subField field is set. */ @java.lang.Override public boolean hasSubField() { return ((bitField0_ & 0x00000001) != 0); } /** * * *
     * Recursively nested sub-field, if needed.
     * 
* * * .google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference sub_field = 3; * * * @return The subField. */ @java.lang.Override public com.google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference getSubField() { return subField_ == null ? com.google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference .getDefaultInstance() : subField_; } /** * * *
     * Recursively nested sub-field, if needed.
     * 
* * * .google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference sub_field = 3; * */ @java.lang.Override public com.google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReferenceOrBuilder getSubFieldOrBuilder() { return subField_ == null ? com.google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference .getDefaultInstance() : subField_; } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } if (indexOrKeyCase_ == 2) { output.writeInt32(2, (int) ((java.lang.Integer) indexOrKey_)); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(3, getSubField()); } if (indexOrKeyCase_ == 4) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, indexOrKey_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } if (indexOrKeyCase_ == 2) { size += com.google.protobuf.CodedOutputStream.computeInt32Size( 2, (int) ((java.lang.Integer) indexOrKey_)); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getSubField()); } if (indexOrKeyCase_ == 4) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, indexOrKey_); } 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.routeoptimization.v1.OptimizeToursValidationError.FieldReference)) { return super.equals(obj); } com.google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference other = (com.google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference) obj; if (!getName().equals(other.getName())) return false; if (hasSubField() != other.hasSubField()) return false; if (hasSubField()) { if (!getSubField().equals(other.getSubField())) return false; } if (!getIndexOrKeyCase().equals(other.getIndexOrKeyCase())) return false; switch (indexOrKeyCase_) { case 2: if (getIndex() != other.getIndex()) return false; break; case 4: if (!getKey().equals(other.getKey())) return false; break; case 0: default: } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); if (hasSubField()) { hash = (37 * hash) + SUB_FIELD_FIELD_NUMBER; hash = (53 * hash) + getSubField().hashCode(); } switch (indexOrKeyCase_) { case 2: hash = (37 * hash) + INDEX_FIELD_NUMBER; hash = (53 * hash) + getIndex(); break; case 4: hash = (37 * hash) + KEY_FIELD_NUMBER; hash = (53 * hash) + getKey().hashCode(); break; case 0: default: } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference 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.routeoptimization.v1.OptimizeToursValidationError.FieldReference parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference 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.routeoptimization.v1.OptimizeToursValidationError.FieldReference parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference 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.routeoptimization.v1.OptimizeToursValidationError.FieldReference parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference 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.routeoptimization.v1.OptimizeToursValidationError.FieldReference parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference 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.routeoptimization.v1.OptimizeToursValidationError.FieldReference 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; } /** * * *
     * Specifies a context for the validation error. A `FieldReference` always
     * refers to a given field in this file and follows the same hierarchical
     * structure. For example, we may specify element #2 of `start_time_windows`
     * of vehicle #5 using:
     * ```
     * name: "vehicles" index: 5 sub_field { name: "end_time_windows" index: 2 }
     * ```
     * We however omit top-level entities such as `OptimizeToursRequest` or
     * `ShipmentModel` to avoid crowding the message.
     * 
* * Protobuf type {@code * google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference) com.google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReferenceOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.maps.routeoptimization.v1.RouteOptimizationServiceProto .internal_static_google_maps_routeoptimization_v1_OptimizeToursValidationError_FieldReference_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.maps.routeoptimization.v1.RouteOptimizationServiceProto .internal_static_google_maps_routeoptimization_v1_OptimizeToursValidationError_FieldReference_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference .class, com.google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference .Builder.class); } // Construct using // com.google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { getSubFieldFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; name_ = ""; subField_ = null; if (subFieldBuilder_ != null) { subFieldBuilder_.dispose(); subFieldBuilder_ = null; } indexOrKeyCase_ = 0; indexOrKey_ = null; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.maps.routeoptimization.v1.RouteOptimizationServiceProto .internal_static_google_maps_routeoptimization_v1_OptimizeToursValidationError_FieldReference_descriptor; } @java.lang.Override public com.google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference getDefaultInstanceForType() { return com.google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference .getDefaultInstance(); } @java.lang.Override public com.google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference build() { com.google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference buildPartial() { com.google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference result = new com.google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference( this); if (bitField0_ != 0) { buildPartial0(result); } buildPartialOneofs(result); onBuilt(); return result; } private void buildPartial0( com.google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.name_ = name_; } int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000008) != 0)) { result.subField_ = subFieldBuilder_ == null ? subField_ : subFieldBuilder_.build(); to_bitField0_ |= 0x00000001; } result.bitField0_ |= to_bitField0_; } private void buildPartialOneofs( com.google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference result) { result.indexOrKeyCase_ = indexOrKeyCase_; result.indexOrKey_ = this.indexOrKey_; } @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.routeoptimization.v1.OptimizeToursValidationError.FieldReference) { return mergeFrom( (com.google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom( com.google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference other) { if (other == com.google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference .getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; bitField0_ |= 0x00000001; onChanged(); } if (other.hasSubField()) { mergeSubField(other.getSubField()); } switch (other.getIndexOrKeyCase()) { case INDEX: { setIndex(other.getIndex()); break; } case KEY: { indexOrKeyCase_ = 4; indexOrKey_ = other.indexOrKey_; onChanged(); break; } case INDEXORKEY_NOT_SET: { break; } } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { name_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 10 case 16: { indexOrKey_ = input.readInt32(); indexOrKeyCase_ = 2; break; } // case 16 case 26: { input.readMessage(getSubFieldFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000008; break; } // case 26 case 34: { java.lang.String s = input.readStringRequireUtf8(); indexOrKeyCase_ = 4; indexOrKey_ = s; break; } // case 34 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int indexOrKeyCase_ = 0; private java.lang.Object indexOrKey_; public IndexOrKeyCase getIndexOrKeyCase() { return IndexOrKeyCase.forNumber(indexOrKeyCase_); } public Builder clearIndexOrKey() { indexOrKeyCase_ = 0; indexOrKey_ = null; onChanged(); return this; } private int bitField0_; private java.lang.Object name_ = ""; /** * * *
       * Name of the field, e.g., "vehicles".
       * 
* * string name = 1; * * @return The name. */ public java.lang.String getName() { java.lang.Object ref = name_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
       * Name of the field, e.g., "vehicles".
       * 
* * string name = 1; * * @return The bytes for name. */ public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
       * Name of the field, e.g., "vehicles".
       * 
* * string name = 1; * * @param value The name to set. * @return This builder for chaining. */ public Builder setName(java.lang.String value) { if (value == null) { throw new NullPointerException(); } name_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** * * *
       * Name of the field, e.g., "vehicles".
       * 
* * string name = 1; * * @return This builder for chaining. */ public Builder clearName() { name_ = getDefaultInstance().getName(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** * * *
       * Name of the field, e.g., "vehicles".
       * 
* * string name = 1; * * @param value The bytes for name to set. * @return This builder for chaining. */ public Builder setNameBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); name_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** * * *
       * Index of the field if repeated.
       * 
* * int32 index = 2; * * @return Whether the index field is set. */ public boolean hasIndex() { return indexOrKeyCase_ == 2; } /** * * *
       * Index of the field if repeated.
       * 
* * int32 index = 2; * * @return The index. */ public int getIndex() { if (indexOrKeyCase_ == 2) { return (java.lang.Integer) indexOrKey_; } return 0; } /** * * *
       * Index of the field if repeated.
       * 
* * int32 index = 2; * * @param value The index to set. * @return This builder for chaining. */ public Builder setIndex(int value) { indexOrKeyCase_ = 2; indexOrKey_ = value; onChanged(); return this; } /** * * *
       * Index of the field if repeated.
       * 
* * int32 index = 2; * * @return This builder for chaining. */ public Builder clearIndex() { if (indexOrKeyCase_ == 2) { indexOrKeyCase_ = 0; indexOrKey_ = null; onChanged(); } return this; } /** * * *
       * Key if the field is a map.
       * 
* * string key = 4; * * @return Whether the key field is set. */ @java.lang.Override public boolean hasKey() { return indexOrKeyCase_ == 4; } /** * * *
       * Key if the field is a map.
       * 
* * string key = 4; * * @return The key. */ @java.lang.Override public java.lang.String getKey() { java.lang.Object ref = ""; if (indexOrKeyCase_ == 4) { ref = indexOrKey_; } if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (indexOrKeyCase_ == 4) { indexOrKey_ = s; } return s; } else { return (java.lang.String) ref; } } /** * * *
       * Key if the field is a map.
       * 
* * string key = 4; * * @return The bytes for key. */ @java.lang.Override public com.google.protobuf.ByteString getKeyBytes() { java.lang.Object ref = ""; if (indexOrKeyCase_ == 4) { ref = indexOrKey_; } if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); if (indexOrKeyCase_ == 4) { indexOrKey_ = b; } return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
       * Key if the field is a map.
       * 
* * string key = 4; * * @param value The key to set. * @return This builder for chaining. */ public Builder setKey(java.lang.String value) { if (value == null) { throw new NullPointerException(); } indexOrKeyCase_ = 4; indexOrKey_ = value; onChanged(); return this; } /** * * *
       * Key if the field is a map.
       * 
* * string key = 4; * * @return This builder for chaining. */ public Builder clearKey() { if (indexOrKeyCase_ == 4) { indexOrKeyCase_ = 0; indexOrKey_ = null; onChanged(); } return this; } /** * * *
       * Key if the field is a map.
       * 
* * string key = 4; * * @param value The bytes for key to set. * @return This builder for chaining. */ public Builder setKeyBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); indexOrKeyCase_ = 4; indexOrKey_ = value; onChanged(); return this; } private com.google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference subField_; private com.google.protobuf.SingleFieldBuilderV3< com.google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference, com.google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference .Builder, com.google.maps.routeoptimization.v1.OptimizeToursValidationError .FieldReferenceOrBuilder> subFieldBuilder_; /** * * *
       * Recursively nested sub-field, if needed.
       * 
* * * .google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference sub_field = 3; * * * @return Whether the subField field is set. */ public boolean hasSubField() { return ((bitField0_ & 0x00000008) != 0); } /** * * *
       * Recursively nested sub-field, if needed.
       * 
* * * .google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference sub_field = 3; * * * @return The subField. */ public com.google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference getSubField() { if (subFieldBuilder_ == null) { return subField_ == null ? com.google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference .getDefaultInstance() : subField_; } else { return subFieldBuilder_.getMessage(); } } /** * * *
       * Recursively nested sub-field, if needed.
       * 
* * * .google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference sub_field = 3; * */ public Builder setSubField( com.google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference value) { if (subFieldBuilder_ == null) { if (value == null) { throw new NullPointerException(); } subField_ = value; } else { subFieldBuilder_.setMessage(value); } bitField0_ |= 0x00000008; onChanged(); return this; } /** * * *
       * Recursively nested sub-field, if needed.
       * 
* * * .google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference sub_field = 3; * */ public Builder setSubField( com.google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference.Builder builderForValue) { if (subFieldBuilder_ == null) { subField_ = builderForValue.build(); } else { subFieldBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000008; onChanged(); return this; } /** * * *
       * Recursively nested sub-field, if needed.
       * 
* * * .google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference sub_field = 3; * */ public Builder mergeSubField( com.google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference value) { if (subFieldBuilder_ == null) { if (((bitField0_ & 0x00000008) != 0) && subField_ != null && subField_ != com.google.maps.routeoptimization.v1.OptimizeToursValidationError .FieldReference.getDefaultInstance()) { getSubFieldBuilder().mergeFrom(value); } else { subField_ = value; } } else { subFieldBuilder_.mergeFrom(value); } if (subField_ != null) { bitField0_ |= 0x00000008; onChanged(); } return this; } /** * * *
       * Recursively nested sub-field, if needed.
       * 
* * * .google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference sub_field = 3; * */ public Builder clearSubField() { bitField0_ = (bitField0_ & ~0x00000008); subField_ = null; if (subFieldBuilder_ != null) { subFieldBuilder_.dispose(); subFieldBuilder_ = null; } onChanged(); return this; } /** * * *
       * Recursively nested sub-field, if needed.
       * 
* * * .google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference sub_field = 3; * */ public com.google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference .Builder getSubFieldBuilder() { bitField0_ |= 0x00000008; onChanged(); return getSubFieldFieldBuilder().getBuilder(); } /** * * *
       * Recursively nested sub-field, if needed.
       * 
* * * .google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference sub_field = 3; * */ public com.google.maps.routeoptimization.v1.OptimizeToursValidationError .FieldReferenceOrBuilder getSubFieldOrBuilder() { if (subFieldBuilder_ != null) { return subFieldBuilder_.getMessageOrBuilder(); } else { return subField_ == null ? com.google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference .getDefaultInstance() : subField_; } } /** * * *
       * Recursively nested sub-field, if needed.
       * 
* * * .google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference sub_field = 3; * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference, com.google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference .Builder, com.google.maps.routeoptimization.v1.OptimizeToursValidationError .FieldReferenceOrBuilder> getSubFieldFieldBuilder() { if (subFieldBuilder_ == null) { subFieldBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference, com.google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference .Builder, com.google.maps.routeoptimization.v1.OptimizeToursValidationError .FieldReferenceOrBuilder>(getSubField(), getParentForChildren(), isClean()); subField_ = null; } return subFieldBuilder_; } @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.routeoptimization.v1.OptimizeToursValidationError.FieldReference) } // @@protoc_insertion_point(class_scope:google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference) private static final com.google.maps.routeoptimization.v1.OptimizeToursValidationError .FieldReference DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference(); } public static com.google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public FieldReference 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.routeoptimization.v1.OptimizeToursValidationError.FieldReference getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public static final int CODE_FIELD_NUMBER = 1; private int code_ = 0; /** * * *
   * A validation error is defined by the pair (`code`, `display_name`) which
   * are always present.
   *
   * The fields following this section provide more context about the error.
   *
   * *MULTIPLE ERRORS*:
   * When there are multiple errors, the validation process tries to output
   * several of them. Much like a compiler, this is an imperfect process. Some
   * validation errors will be "fatal", meaning that they stop the entire
   * validation process. This is the case for `display_name="UNSPECIFIED"`
   * errors, among others. Some errors may cause the validation process to skip
   * other errors.
   *
   * *STABILITY*:
   * `code` and `display_name` should be very stable. But new codes and
   * display names may appear over time, which may cause a given (invalid)
   * request to yield a different (`code`, `display_name`) pair because the new
   * error hid the old one. For example, see "MULTIPLE ERRORS".
   * 
* * int32 code = 1; * * @return The code. */ @java.lang.Override public int getCode() { return code_; } public static final int DISPLAY_NAME_FIELD_NUMBER = 2; @SuppressWarnings("serial") private volatile java.lang.Object displayName_ = ""; /** * * *
   * The error display name.
   * 
* * string display_name = 2; * * @return The displayName. */ @java.lang.Override public java.lang.String getDisplayName() { java.lang.Object ref = displayName_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); displayName_ = s; return s; } } /** * * *
   * The error display name.
   * 
* * string display_name = 2; * * @return The bytes for displayName. */ @java.lang.Override public com.google.protobuf.ByteString getDisplayNameBytes() { java.lang.Object ref = displayName_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); displayName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int FIELDS_FIELD_NUMBER = 3; @SuppressWarnings("serial") private java.util.List< com.google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference> fields_; /** * * *
   * An error context may involve 0, 1 (most of the time) or more fields. For
   * example, referring to vehicle #4 and shipment #2's first pickup can be
   * done as follows:
   * ```
   * fields { name: "vehicles" index: 4}
   * fields { name: "shipments" index: 2 sub_field {name: "pickups" index: 0} }
   * ```
   * Note, however, that the cardinality of `fields` should not change for a
   * given error code.
   * 
* * * repeated .google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference fields = 3; * */ @java.lang.Override public java.util.List< com.google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference> getFieldsList() { return fields_; } /** * * *
   * An error context may involve 0, 1 (most of the time) or more fields. For
   * example, referring to vehicle #4 and shipment #2's first pickup can be
   * done as follows:
   * ```
   * fields { name: "vehicles" index: 4}
   * fields { name: "shipments" index: 2 sub_field {name: "pickups" index: 0} }
   * ```
   * Note, however, that the cardinality of `fields` should not change for a
   * given error code.
   * 
* * * repeated .google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference fields = 3; * */ @java.lang.Override public java.util.List< ? extends com.google.maps.routeoptimization.v1.OptimizeToursValidationError .FieldReferenceOrBuilder> getFieldsOrBuilderList() { return fields_; } /** * * *
   * An error context may involve 0, 1 (most of the time) or more fields. For
   * example, referring to vehicle #4 and shipment #2's first pickup can be
   * done as follows:
   * ```
   * fields { name: "vehicles" index: 4}
   * fields { name: "shipments" index: 2 sub_field {name: "pickups" index: 0} }
   * ```
   * Note, however, that the cardinality of `fields` should not change for a
   * given error code.
   * 
* * * repeated .google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference fields = 3; * */ @java.lang.Override public int getFieldsCount() { return fields_.size(); } /** * * *
   * An error context may involve 0, 1 (most of the time) or more fields. For
   * example, referring to vehicle #4 and shipment #2's first pickup can be
   * done as follows:
   * ```
   * fields { name: "vehicles" index: 4}
   * fields { name: "shipments" index: 2 sub_field {name: "pickups" index: 0} }
   * ```
   * Note, however, that the cardinality of `fields` should not change for a
   * given error code.
   * 
* * * repeated .google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference fields = 3; * */ @java.lang.Override public com.google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference getFields( int index) { return fields_.get(index); } /** * * *
   * An error context may involve 0, 1 (most of the time) or more fields. For
   * example, referring to vehicle #4 and shipment #2's first pickup can be
   * done as follows:
   * ```
   * fields { name: "vehicles" index: 4}
   * fields { name: "shipments" index: 2 sub_field {name: "pickups" index: 0} }
   * ```
   * Note, however, that the cardinality of `fields` should not change for a
   * given error code.
   * 
* * * repeated .google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference fields = 3; * */ @java.lang.Override public com.google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReferenceOrBuilder getFieldsOrBuilder(int index) { return fields_.get(index); } public static final int ERROR_MESSAGE_FIELD_NUMBER = 4; @SuppressWarnings("serial") private volatile java.lang.Object errorMessage_ = ""; /** * * *
   * Human-readable string describing the error. There is a 1:1 mapping
   * between `code` and `error_message` (when code != "UNSPECIFIED").
   *
   * *STABILITY*: Not stable: the error message associated to a given `code` may
   * change (hopefully to clarify it) over time. Please rely on the
   * `display_name` and `code` instead.
   * 
* * string error_message = 4; * * @return The errorMessage. */ @java.lang.Override public java.lang.String getErrorMessage() { java.lang.Object ref = errorMessage_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); errorMessage_ = s; return s; } } /** * * *
   * Human-readable string describing the error. There is a 1:1 mapping
   * between `code` and `error_message` (when code != "UNSPECIFIED").
   *
   * *STABILITY*: Not stable: the error message associated to a given `code` may
   * change (hopefully to clarify it) over time. Please rely on the
   * `display_name` and `code` instead.
   * 
* * string error_message = 4; * * @return The bytes for errorMessage. */ @java.lang.Override public com.google.protobuf.ByteString getErrorMessageBytes() { java.lang.Object ref = errorMessage_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); errorMessage_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int OFFENDING_VALUES_FIELD_NUMBER = 5; @SuppressWarnings("serial") private volatile java.lang.Object offendingValues_ = ""; /** * * *
   * May contain the value(s) of the field(s). This is not always available. You
   * should absolutely not rely on it and use it only for manual model
   * debugging.
   * 
* * string offending_values = 5; * * @return The offendingValues. */ @java.lang.Override public java.lang.String getOffendingValues() { java.lang.Object ref = offendingValues_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); offendingValues_ = s; return s; } } /** * * *
   * May contain the value(s) of the field(s). This is not always available. You
   * should absolutely not rely on it and use it only for manual model
   * debugging.
   * 
* * string offending_values = 5; * * @return The bytes for offendingValues. */ @java.lang.Override public com.google.protobuf.ByteString getOffendingValuesBytes() { java.lang.Object ref = offendingValues_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); offendingValues_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } 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 (code_ != 0) { output.writeInt32(1, code_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); } for (int i = 0; i < fields_.size(); i++) { output.writeMessage(3, fields_.get(i)); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(errorMessage_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, errorMessage_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(offendingValues_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, offendingValues_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (code_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, code_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); } for (int i = 0; i < fields_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, fields_.get(i)); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(errorMessage_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, errorMessage_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(offendingValues_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, offendingValues_); } 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.routeoptimization.v1.OptimizeToursValidationError)) { return super.equals(obj); } com.google.maps.routeoptimization.v1.OptimizeToursValidationError other = (com.google.maps.routeoptimization.v1.OptimizeToursValidationError) obj; if (getCode() != other.getCode()) return false; if (!getDisplayName().equals(other.getDisplayName())) return false; if (!getFieldsList().equals(other.getFieldsList())) return false; if (!getErrorMessage().equals(other.getErrorMessage())) return false; if (!getOffendingValues().equals(other.getOffendingValues())) 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) + CODE_FIELD_NUMBER; hash = (53 * hash) + getCode(); hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; hash = (53 * hash) + getDisplayName().hashCode(); if (getFieldsCount() > 0) { hash = (37 * hash) + FIELDS_FIELD_NUMBER; hash = (53 * hash) + getFieldsList().hashCode(); } hash = (37 * hash) + ERROR_MESSAGE_FIELD_NUMBER; hash = (53 * hash) + getErrorMessage().hashCode(); hash = (37 * hash) + OFFENDING_VALUES_FIELD_NUMBER; hash = (53 * hash) + getOffendingValues().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.maps.routeoptimization.v1.OptimizeToursValidationError parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.maps.routeoptimization.v1.OptimizeToursValidationError 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.routeoptimization.v1.OptimizeToursValidationError parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.maps.routeoptimization.v1.OptimizeToursValidationError 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.routeoptimization.v1.OptimizeToursValidationError parseFrom( byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.maps.routeoptimization.v1.OptimizeToursValidationError parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.maps.routeoptimization.v1.OptimizeToursValidationError parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.maps.routeoptimization.v1.OptimizeToursValidationError 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.routeoptimization.v1.OptimizeToursValidationError parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.maps.routeoptimization.v1.OptimizeToursValidationError 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.routeoptimization.v1.OptimizeToursValidationError parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.maps.routeoptimization.v1.OptimizeToursValidationError 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.routeoptimization.v1.OptimizeToursValidationError 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; } /** * * *
   * Describes an error or warning encountered when validating an
   * `OptimizeToursRequest`.
   * 
* * Protobuf type {@code google.maps.routeoptimization.v1.OptimizeToursValidationError} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.maps.routeoptimization.v1.OptimizeToursValidationError) com.google.maps.routeoptimization.v1.OptimizeToursValidationErrorOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.maps.routeoptimization.v1.RouteOptimizationServiceProto .internal_static_google_maps_routeoptimization_v1_OptimizeToursValidationError_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.maps.routeoptimization.v1.RouteOptimizationServiceProto .internal_static_google_maps_routeoptimization_v1_OptimizeToursValidationError_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.maps.routeoptimization.v1.OptimizeToursValidationError.class, com.google.maps.routeoptimization.v1.OptimizeToursValidationError.Builder.class); } // Construct using // com.google.maps.routeoptimization.v1.OptimizeToursValidationError.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; code_ = 0; displayName_ = ""; if (fieldsBuilder_ == null) { fields_ = java.util.Collections.emptyList(); } else { fields_ = null; fieldsBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000004); errorMessage_ = ""; offendingValues_ = ""; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.maps.routeoptimization.v1.RouteOptimizationServiceProto .internal_static_google_maps_routeoptimization_v1_OptimizeToursValidationError_descriptor; } @java.lang.Override public com.google.maps.routeoptimization.v1.OptimizeToursValidationError getDefaultInstanceForType() { return com.google.maps.routeoptimization.v1.OptimizeToursValidationError.getDefaultInstance(); } @java.lang.Override public com.google.maps.routeoptimization.v1.OptimizeToursValidationError build() { com.google.maps.routeoptimization.v1.OptimizeToursValidationError result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.maps.routeoptimization.v1.OptimizeToursValidationError buildPartial() { com.google.maps.routeoptimization.v1.OptimizeToursValidationError result = new com.google.maps.routeoptimization.v1.OptimizeToursValidationError(this); buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartialRepeatedFields( com.google.maps.routeoptimization.v1.OptimizeToursValidationError result) { if (fieldsBuilder_ == null) { if (((bitField0_ & 0x00000004) != 0)) { fields_ = java.util.Collections.unmodifiableList(fields_); bitField0_ = (bitField0_ & ~0x00000004); } result.fields_ = fields_; } else { result.fields_ = fieldsBuilder_.build(); } } private void buildPartial0( com.google.maps.routeoptimization.v1.OptimizeToursValidationError result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.code_ = code_; } if (((from_bitField0_ & 0x00000002) != 0)) { result.displayName_ = displayName_; } if (((from_bitField0_ & 0x00000008) != 0)) { result.errorMessage_ = errorMessage_; } if (((from_bitField0_ & 0x00000010) != 0)) { result.offendingValues_ = offendingValues_; } } @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.routeoptimization.v1.OptimizeToursValidationError) { return mergeFrom((com.google.maps.routeoptimization.v1.OptimizeToursValidationError) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom( com.google.maps.routeoptimization.v1.OptimizeToursValidationError other) { if (other == com.google.maps.routeoptimization.v1.OptimizeToursValidationError.getDefaultInstance()) return this; if (other.getCode() != 0) { setCode(other.getCode()); } if (!other.getDisplayName().isEmpty()) { displayName_ = other.displayName_; bitField0_ |= 0x00000002; onChanged(); } if (fieldsBuilder_ == null) { if (!other.fields_.isEmpty()) { if (fields_.isEmpty()) { fields_ = other.fields_; bitField0_ = (bitField0_ & ~0x00000004); } else { ensureFieldsIsMutable(); fields_.addAll(other.fields_); } onChanged(); } } else { if (!other.fields_.isEmpty()) { if (fieldsBuilder_.isEmpty()) { fieldsBuilder_.dispose(); fieldsBuilder_ = null; fields_ = other.fields_; bitField0_ = (bitField0_ & ~0x00000004); fieldsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getFieldsFieldBuilder() : null; } else { fieldsBuilder_.addAllMessages(other.fields_); } } } if (!other.getErrorMessage().isEmpty()) { errorMessage_ = other.errorMessage_; bitField0_ |= 0x00000008; onChanged(); } if (!other.getOffendingValues().isEmpty()) { offendingValues_ = other.offendingValues_; bitField0_ |= 0x00000010; onChanged(); } 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: { code_ = input.readInt32(); bitField0_ |= 0x00000001; break; } // case 8 case 18: { displayName_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000002; break; } // case 18 case 26: { com.google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference m = input.readMessage( com.google.maps.routeoptimization.v1.OptimizeToursValidationError .FieldReference.parser(), extensionRegistry); if (fieldsBuilder_ == null) { ensureFieldsIsMutable(); fields_.add(m); } else { fieldsBuilder_.addMessage(m); } break; } // case 26 case 34: { errorMessage_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000008; break; } // case 34 case 42: { offendingValues_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000010; break; } // case 42 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 code_; /** * * *
     * A validation error is defined by the pair (`code`, `display_name`) which
     * are always present.
     *
     * The fields following this section provide more context about the error.
     *
     * *MULTIPLE ERRORS*:
     * When there are multiple errors, the validation process tries to output
     * several of them. Much like a compiler, this is an imperfect process. Some
     * validation errors will be "fatal", meaning that they stop the entire
     * validation process. This is the case for `display_name="UNSPECIFIED"`
     * errors, among others. Some errors may cause the validation process to skip
     * other errors.
     *
     * *STABILITY*:
     * `code` and `display_name` should be very stable. But new codes and
     * display names may appear over time, which may cause a given (invalid)
     * request to yield a different (`code`, `display_name`) pair because the new
     * error hid the old one. For example, see "MULTIPLE ERRORS".
     * 
* * int32 code = 1; * * @return The code. */ @java.lang.Override public int getCode() { return code_; } /** * * *
     * A validation error is defined by the pair (`code`, `display_name`) which
     * are always present.
     *
     * The fields following this section provide more context about the error.
     *
     * *MULTIPLE ERRORS*:
     * When there are multiple errors, the validation process tries to output
     * several of them. Much like a compiler, this is an imperfect process. Some
     * validation errors will be "fatal", meaning that they stop the entire
     * validation process. This is the case for `display_name="UNSPECIFIED"`
     * errors, among others. Some errors may cause the validation process to skip
     * other errors.
     *
     * *STABILITY*:
     * `code` and `display_name` should be very stable. But new codes and
     * display names may appear over time, which may cause a given (invalid)
     * request to yield a different (`code`, `display_name`) pair because the new
     * error hid the old one. For example, see "MULTIPLE ERRORS".
     * 
* * int32 code = 1; * * @param value The code to set. * @return This builder for chaining. */ public Builder setCode(int value) { code_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** * * *
     * A validation error is defined by the pair (`code`, `display_name`) which
     * are always present.
     *
     * The fields following this section provide more context about the error.
     *
     * *MULTIPLE ERRORS*:
     * When there are multiple errors, the validation process tries to output
     * several of them. Much like a compiler, this is an imperfect process. Some
     * validation errors will be "fatal", meaning that they stop the entire
     * validation process. This is the case for `display_name="UNSPECIFIED"`
     * errors, among others. Some errors may cause the validation process to skip
     * other errors.
     *
     * *STABILITY*:
     * `code` and `display_name` should be very stable. But new codes and
     * display names may appear over time, which may cause a given (invalid)
     * request to yield a different (`code`, `display_name`) pair because the new
     * error hid the old one. For example, see "MULTIPLE ERRORS".
     * 
* * int32 code = 1; * * @return This builder for chaining. */ public Builder clearCode() { bitField0_ = (bitField0_ & ~0x00000001); code_ = 0; onChanged(); return this; } private java.lang.Object displayName_ = ""; /** * * *
     * The error display name.
     * 
* * string display_name = 2; * * @return The displayName. */ public java.lang.String getDisplayName() { java.lang.Object ref = displayName_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); displayName_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * The error display name.
     * 
* * string display_name = 2; * * @return The bytes for displayName. */ public com.google.protobuf.ByteString getDisplayNameBytes() { java.lang.Object ref = displayName_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); displayName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * The error display name.
     * 
* * string display_name = 2; * * @param value The displayName to set. * @return This builder for chaining. */ public Builder setDisplayName(java.lang.String value) { if (value == null) { throw new NullPointerException(); } displayName_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** * * *
     * The error display name.
     * 
* * string display_name = 2; * * @return This builder for chaining. */ public Builder clearDisplayName() { displayName_ = getDefaultInstance().getDisplayName(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** * * *
     * The error display name.
     * 
* * string display_name = 2; * * @param value The bytes for displayName to set. * @return This builder for chaining. */ public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); displayName_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } private java.util.List< com.google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference> fields_ = java.util.Collections.emptyList(); private void ensureFieldsIsMutable() { if (!((bitField0_ & 0x00000004) != 0)) { fields_ = new java.util.ArrayList< com.google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference>( fields_); bitField0_ |= 0x00000004; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference, com.google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference .Builder, com.google.maps.routeoptimization.v1.OptimizeToursValidationError .FieldReferenceOrBuilder> fieldsBuilder_; /** * * *
     * An error context may involve 0, 1 (most of the time) or more fields. For
     * example, referring to vehicle #4 and shipment #2's first pickup can be
     * done as follows:
     * ```
     * fields { name: "vehicles" index: 4}
     * fields { name: "shipments" index: 2 sub_field {name: "pickups" index: 0} }
     * ```
     * Note, however, that the cardinality of `fields` should not change for a
     * given error code.
     * 
* * * repeated .google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference fields = 3; * */ public java.util.List< com.google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference> getFieldsList() { if (fieldsBuilder_ == null) { return java.util.Collections.unmodifiableList(fields_); } else { return fieldsBuilder_.getMessageList(); } } /** * * *
     * An error context may involve 0, 1 (most of the time) or more fields. For
     * example, referring to vehicle #4 and shipment #2's first pickup can be
     * done as follows:
     * ```
     * fields { name: "vehicles" index: 4}
     * fields { name: "shipments" index: 2 sub_field {name: "pickups" index: 0} }
     * ```
     * Note, however, that the cardinality of `fields` should not change for a
     * given error code.
     * 
* * * repeated .google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference fields = 3; * */ public int getFieldsCount() { if (fieldsBuilder_ == null) { return fields_.size(); } else { return fieldsBuilder_.getCount(); } } /** * * *
     * An error context may involve 0, 1 (most of the time) or more fields. For
     * example, referring to vehicle #4 and shipment #2's first pickup can be
     * done as follows:
     * ```
     * fields { name: "vehicles" index: 4}
     * fields { name: "shipments" index: 2 sub_field {name: "pickups" index: 0} }
     * ```
     * Note, however, that the cardinality of `fields` should not change for a
     * given error code.
     * 
* * * repeated .google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference fields = 3; * */ public com.google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference getFields(int index) { if (fieldsBuilder_ == null) { return fields_.get(index); } else { return fieldsBuilder_.getMessage(index); } } /** * * *
     * An error context may involve 0, 1 (most of the time) or more fields. For
     * example, referring to vehicle #4 and shipment #2's first pickup can be
     * done as follows:
     * ```
     * fields { name: "vehicles" index: 4}
     * fields { name: "shipments" index: 2 sub_field {name: "pickups" index: 0} }
     * ```
     * Note, however, that the cardinality of `fields` should not change for a
     * given error code.
     * 
* * * repeated .google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference fields = 3; * */ public Builder setFields( int index, com.google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference value) { if (fieldsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureFieldsIsMutable(); fields_.set(index, value); onChanged(); } else { fieldsBuilder_.setMessage(index, value); } return this; } /** * * *
     * An error context may involve 0, 1 (most of the time) or more fields. For
     * example, referring to vehicle #4 and shipment #2's first pickup can be
     * done as follows:
     * ```
     * fields { name: "vehicles" index: 4}
     * fields { name: "shipments" index: 2 sub_field {name: "pickups" index: 0} }
     * ```
     * Note, however, that the cardinality of `fields` should not change for a
     * given error code.
     * 
* * * repeated .google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference fields = 3; * */ public Builder setFields( int index, com.google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference.Builder builderForValue) { if (fieldsBuilder_ == null) { ensureFieldsIsMutable(); fields_.set(index, builderForValue.build()); onChanged(); } else { fieldsBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * * *
     * An error context may involve 0, 1 (most of the time) or more fields. For
     * example, referring to vehicle #4 and shipment #2's first pickup can be
     * done as follows:
     * ```
     * fields { name: "vehicles" index: 4}
     * fields { name: "shipments" index: 2 sub_field {name: "pickups" index: 0} }
     * ```
     * Note, however, that the cardinality of `fields` should not change for a
     * given error code.
     * 
* * * repeated .google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference fields = 3; * */ public Builder addFields( com.google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference value) { if (fieldsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureFieldsIsMutable(); fields_.add(value); onChanged(); } else { fieldsBuilder_.addMessage(value); } return this; } /** * * *
     * An error context may involve 0, 1 (most of the time) or more fields. For
     * example, referring to vehicle #4 and shipment #2's first pickup can be
     * done as follows:
     * ```
     * fields { name: "vehicles" index: 4}
     * fields { name: "shipments" index: 2 sub_field {name: "pickups" index: 0} }
     * ```
     * Note, however, that the cardinality of `fields` should not change for a
     * given error code.
     * 
* * * repeated .google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference fields = 3; * */ public Builder addFields( int index, com.google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference value) { if (fieldsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureFieldsIsMutable(); fields_.add(index, value); onChanged(); } else { fieldsBuilder_.addMessage(index, value); } return this; } /** * * *
     * An error context may involve 0, 1 (most of the time) or more fields. For
     * example, referring to vehicle #4 and shipment #2's first pickup can be
     * done as follows:
     * ```
     * fields { name: "vehicles" index: 4}
     * fields { name: "shipments" index: 2 sub_field {name: "pickups" index: 0} }
     * ```
     * Note, however, that the cardinality of `fields` should not change for a
     * given error code.
     * 
* * * repeated .google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference fields = 3; * */ public Builder addFields( com.google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference.Builder builderForValue) { if (fieldsBuilder_ == null) { ensureFieldsIsMutable(); fields_.add(builderForValue.build()); onChanged(); } else { fieldsBuilder_.addMessage(builderForValue.build()); } return this; } /** * * *
     * An error context may involve 0, 1 (most of the time) or more fields. For
     * example, referring to vehicle #4 and shipment #2's first pickup can be
     * done as follows:
     * ```
     * fields { name: "vehicles" index: 4}
     * fields { name: "shipments" index: 2 sub_field {name: "pickups" index: 0} }
     * ```
     * Note, however, that the cardinality of `fields` should not change for a
     * given error code.
     * 
* * * repeated .google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference fields = 3; * */ public Builder addFields( int index, com.google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference.Builder builderForValue) { if (fieldsBuilder_ == null) { ensureFieldsIsMutable(); fields_.add(index, builderForValue.build()); onChanged(); } else { fieldsBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * * *
     * An error context may involve 0, 1 (most of the time) or more fields. For
     * example, referring to vehicle #4 and shipment #2's first pickup can be
     * done as follows:
     * ```
     * fields { name: "vehicles" index: 4}
     * fields { name: "shipments" index: 2 sub_field {name: "pickups" index: 0} }
     * ```
     * Note, however, that the cardinality of `fields` should not change for a
     * given error code.
     * 
* * * repeated .google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference fields = 3; * */ public Builder addAllFields( java.lang.Iterable< ? extends com.google.maps.routeoptimization.v1.OptimizeToursValidationError .FieldReference> values) { if (fieldsBuilder_ == null) { ensureFieldsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, fields_); onChanged(); } else { fieldsBuilder_.addAllMessages(values); } return this; } /** * * *
     * An error context may involve 0, 1 (most of the time) or more fields. For
     * example, referring to vehicle #4 and shipment #2's first pickup can be
     * done as follows:
     * ```
     * fields { name: "vehicles" index: 4}
     * fields { name: "shipments" index: 2 sub_field {name: "pickups" index: 0} }
     * ```
     * Note, however, that the cardinality of `fields` should not change for a
     * given error code.
     * 
* * * repeated .google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference fields = 3; * */ public Builder clearFields() { if (fieldsBuilder_ == null) { fields_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000004); onChanged(); } else { fieldsBuilder_.clear(); } return this; } /** * * *
     * An error context may involve 0, 1 (most of the time) or more fields. For
     * example, referring to vehicle #4 and shipment #2's first pickup can be
     * done as follows:
     * ```
     * fields { name: "vehicles" index: 4}
     * fields { name: "shipments" index: 2 sub_field {name: "pickups" index: 0} }
     * ```
     * Note, however, that the cardinality of `fields` should not change for a
     * given error code.
     * 
* * * repeated .google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference fields = 3; * */ public Builder removeFields(int index) { if (fieldsBuilder_ == null) { ensureFieldsIsMutable(); fields_.remove(index); onChanged(); } else { fieldsBuilder_.remove(index); } return this; } /** * * *
     * An error context may involve 0, 1 (most of the time) or more fields. For
     * example, referring to vehicle #4 and shipment #2's first pickup can be
     * done as follows:
     * ```
     * fields { name: "vehicles" index: 4}
     * fields { name: "shipments" index: 2 sub_field {name: "pickups" index: 0} }
     * ```
     * Note, however, that the cardinality of `fields` should not change for a
     * given error code.
     * 
* * * repeated .google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference fields = 3; * */ public com.google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference.Builder getFieldsBuilder(int index) { return getFieldsFieldBuilder().getBuilder(index); } /** * * *
     * An error context may involve 0, 1 (most of the time) or more fields. For
     * example, referring to vehicle #4 and shipment #2's first pickup can be
     * done as follows:
     * ```
     * fields { name: "vehicles" index: 4}
     * fields { name: "shipments" index: 2 sub_field {name: "pickups" index: 0} }
     * ```
     * Note, however, that the cardinality of `fields` should not change for a
     * given error code.
     * 
* * * repeated .google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference fields = 3; * */ public com.google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReferenceOrBuilder getFieldsOrBuilder(int index) { if (fieldsBuilder_ == null) { return fields_.get(index); } else { return fieldsBuilder_.getMessageOrBuilder(index); } } /** * * *
     * An error context may involve 0, 1 (most of the time) or more fields. For
     * example, referring to vehicle #4 and shipment #2's first pickup can be
     * done as follows:
     * ```
     * fields { name: "vehicles" index: 4}
     * fields { name: "shipments" index: 2 sub_field {name: "pickups" index: 0} }
     * ```
     * Note, however, that the cardinality of `fields` should not change for a
     * given error code.
     * 
* * * repeated .google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference fields = 3; * */ public java.util.List< ? extends com.google.maps.routeoptimization.v1.OptimizeToursValidationError .FieldReferenceOrBuilder> getFieldsOrBuilderList() { if (fieldsBuilder_ != null) { return fieldsBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(fields_); } } /** * * *
     * An error context may involve 0, 1 (most of the time) or more fields. For
     * example, referring to vehicle #4 and shipment #2's first pickup can be
     * done as follows:
     * ```
     * fields { name: "vehicles" index: 4}
     * fields { name: "shipments" index: 2 sub_field {name: "pickups" index: 0} }
     * ```
     * Note, however, that the cardinality of `fields` should not change for a
     * given error code.
     * 
* * * repeated .google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference fields = 3; * */ public com.google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference.Builder addFieldsBuilder() { return getFieldsFieldBuilder() .addBuilder( com.google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference .getDefaultInstance()); } /** * * *
     * An error context may involve 0, 1 (most of the time) or more fields. For
     * example, referring to vehicle #4 and shipment #2's first pickup can be
     * done as follows:
     * ```
     * fields { name: "vehicles" index: 4}
     * fields { name: "shipments" index: 2 sub_field {name: "pickups" index: 0} }
     * ```
     * Note, however, that the cardinality of `fields` should not change for a
     * given error code.
     * 
* * * repeated .google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference fields = 3; * */ public com.google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference.Builder addFieldsBuilder(int index) { return getFieldsFieldBuilder() .addBuilder( index, com.google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference .getDefaultInstance()); } /** * * *
     * An error context may involve 0, 1 (most of the time) or more fields. For
     * example, referring to vehicle #4 and shipment #2's first pickup can be
     * done as follows:
     * ```
     * fields { name: "vehicles" index: 4}
     * fields { name: "shipments" index: 2 sub_field {name: "pickups" index: 0} }
     * ```
     * Note, however, that the cardinality of `fields` should not change for a
     * given error code.
     * 
* * * repeated .google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference fields = 3; * */ public java.util.List< com.google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference .Builder> getFieldsBuilderList() { return getFieldsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference, com.google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference .Builder, com.google.maps.routeoptimization.v1.OptimizeToursValidationError .FieldReferenceOrBuilder> getFieldsFieldBuilder() { if (fieldsBuilder_ == null) { fieldsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference, com.google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference .Builder, com.google.maps.routeoptimization.v1.OptimizeToursValidationError .FieldReferenceOrBuilder>( fields_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); fields_ = null; } return fieldsBuilder_; } private java.lang.Object errorMessage_ = ""; /** * * *
     * Human-readable string describing the error. There is a 1:1 mapping
     * between `code` and `error_message` (when code != "UNSPECIFIED").
     *
     * *STABILITY*: Not stable: the error message associated to a given `code` may
     * change (hopefully to clarify it) over time. Please rely on the
     * `display_name` and `code` instead.
     * 
* * string error_message = 4; * * @return The errorMessage. */ public java.lang.String getErrorMessage() { java.lang.Object ref = errorMessage_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); errorMessage_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * Human-readable string describing the error. There is a 1:1 mapping
     * between `code` and `error_message` (when code != "UNSPECIFIED").
     *
     * *STABILITY*: Not stable: the error message associated to a given `code` may
     * change (hopefully to clarify it) over time. Please rely on the
     * `display_name` and `code` instead.
     * 
* * string error_message = 4; * * @return The bytes for errorMessage. */ public com.google.protobuf.ByteString getErrorMessageBytes() { java.lang.Object ref = errorMessage_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); errorMessage_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * Human-readable string describing the error. There is a 1:1 mapping
     * between `code` and `error_message` (when code != "UNSPECIFIED").
     *
     * *STABILITY*: Not stable: the error message associated to a given `code` may
     * change (hopefully to clarify it) over time. Please rely on the
     * `display_name` and `code` instead.
     * 
* * string error_message = 4; * * @param value The errorMessage to set. * @return This builder for chaining. */ public Builder setErrorMessage(java.lang.String value) { if (value == null) { throw new NullPointerException(); } errorMessage_ = value; bitField0_ |= 0x00000008; onChanged(); return this; } /** * * *
     * Human-readable string describing the error. There is a 1:1 mapping
     * between `code` and `error_message` (when code != "UNSPECIFIED").
     *
     * *STABILITY*: Not stable: the error message associated to a given `code` may
     * change (hopefully to clarify it) over time. Please rely on the
     * `display_name` and `code` instead.
     * 
* * string error_message = 4; * * @return This builder for chaining. */ public Builder clearErrorMessage() { errorMessage_ = getDefaultInstance().getErrorMessage(); bitField0_ = (bitField0_ & ~0x00000008); onChanged(); return this; } /** * * *
     * Human-readable string describing the error. There is a 1:1 mapping
     * between `code` and `error_message` (when code != "UNSPECIFIED").
     *
     * *STABILITY*: Not stable: the error message associated to a given `code` may
     * change (hopefully to clarify it) over time. Please rely on the
     * `display_name` and `code` instead.
     * 
* * string error_message = 4; * * @param value The bytes for errorMessage to set. * @return This builder for chaining. */ public Builder setErrorMessageBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); errorMessage_ = value; bitField0_ |= 0x00000008; onChanged(); return this; } private java.lang.Object offendingValues_ = ""; /** * * *
     * May contain the value(s) of the field(s). This is not always available. You
     * should absolutely not rely on it and use it only for manual model
     * debugging.
     * 
* * string offending_values = 5; * * @return The offendingValues. */ public java.lang.String getOffendingValues() { java.lang.Object ref = offendingValues_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); offendingValues_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * May contain the value(s) of the field(s). This is not always available. You
     * should absolutely not rely on it and use it only for manual model
     * debugging.
     * 
* * string offending_values = 5; * * @return The bytes for offendingValues. */ public com.google.protobuf.ByteString getOffendingValuesBytes() { java.lang.Object ref = offendingValues_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); offendingValues_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * May contain the value(s) of the field(s). This is not always available. You
     * should absolutely not rely on it and use it only for manual model
     * debugging.
     * 
* * string offending_values = 5; * * @param value The offendingValues to set. * @return This builder for chaining. */ public Builder setOffendingValues(java.lang.String value) { if (value == null) { throw new NullPointerException(); } offendingValues_ = value; bitField0_ |= 0x00000010; onChanged(); return this; } /** * * *
     * May contain the value(s) of the field(s). This is not always available. You
     * should absolutely not rely on it and use it only for manual model
     * debugging.
     * 
* * string offending_values = 5; * * @return This builder for chaining. */ public Builder clearOffendingValues() { offendingValues_ = getDefaultInstance().getOffendingValues(); bitField0_ = (bitField0_ & ~0x00000010); onChanged(); return this; } /** * * *
     * May contain the value(s) of the field(s). This is not always available. You
     * should absolutely not rely on it and use it only for manual model
     * debugging.
     * 
* * string offending_values = 5; * * @param value The bytes for offendingValues to set. * @return This builder for chaining. */ public Builder setOffendingValuesBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); offendingValues_ = value; bitField0_ |= 0x00000010; onChanged(); return this; } @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.routeoptimization.v1.OptimizeToursValidationError) } // @@protoc_insertion_point(class_scope:google.maps.routeoptimization.v1.OptimizeToursValidationError) private static final com.google.maps.routeoptimization.v1.OptimizeToursValidationError DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.maps.routeoptimization.v1.OptimizeToursValidationError(); } public static com.google.maps.routeoptimization.v1.OptimizeToursValidationError getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public OptimizeToursValidationError 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.routeoptimization.v1.OptimizeToursValidationError getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy