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

com.google.shopping.merchant.accounts.v1beta.Headers 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/shopping/merchant/accounts/v1beta/shippingsettings.proto

// Protobuf Java Version: 3.25.5
package com.google.shopping.merchant.accounts.v1beta;

/**
 *
 *
 * 
 * A non-empty list of row or column headers for a table.
 * Exactly one of `prices`, `weights`,
 * `num_items`, `postal_code_group_names`, or
 * `location` must be set.
 * 
* * Protobuf type {@code google.shopping.merchant.accounts.v1beta.Headers} */ public final class Headers extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.shopping.merchant.accounts.v1beta.Headers) HeadersOrBuilder { private static final long serialVersionUID = 0L; // Use Headers.newBuilder() to construct. private Headers(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private Headers() { prices_ = java.util.Collections.emptyList(); weights_ = java.util.Collections.emptyList(); numberOfItems_ = com.google.protobuf.LazyStringArrayList.emptyList(); postalCodeGroupNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); locations_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new Headers(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.shopping.merchant.accounts.v1beta.ShippingSettingsProto .internal_static_google_shopping_merchant_accounts_v1beta_Headers_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.shopping.merchant.accounts.v1beta.ShippingSettingsProto .internal_static_google_shopping_merchant_accounts_v1beta_Headers_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.shopping.merchant.accounts.v1beta.Headers.class, com.google.shopping.merchant.accounts.v1beta.Headers.Builder.class); } public static final int PRICES_FIELD_NUMBER = 1; @SuppressWarnings("serial") private java.util.List prices_; /** * * *
   * Required. A list of inclusive order price upper bounds. The last price's
   * value can be infinity by setting price amount_micros = -1. For example
   * `[{"amount_micros": 10000000, "currency_code": "USD"},
   * {"amount_micros": 500000000, "currency_code": "USD"},
   * {"amount_micros": -1, "currency_code": "USD"}]` represents the headers
   * "<= $10", "<= $500", and "> $500". All prices within a service must have
   * the same currency. Must be non-empty. Must be positive except -1. Can only
   * be set if all other fields are not set.
   * 
* * * repeated .google.shopping.type.Price prices = 1 [(.google.api.field_behavior) = REQUIRED]; * */ @java.lang.Override public java.util.List getPricesList() { return prices_; } /** * * *
   * Required. A list of inclusive order price upper bounds. The last price's
   * value can be infinity by setting price amount_micros = -1. For example
   * `[{"amount_micros": 10000000, "currency_code": "USD"},
   * {"amount_micros": 500000000, "currency_code": "USD"},
   * {"amount_micros": -1, "currency_code": "USD"}]` represents the headers
   * "<= $10", "<= $500", and "> $500". All prices within a service must have
   * the same currency. Must be non-empty. Must be positive except -1. Can only
   * be set if all other fields are not set.
   * 
* * * repeated .google.shopping.type.Price prices = 1 [(.google.api.field_behavior) = REQUIRED]; * */ @java.lang.Override public java.util.List getPricesOrBuilderList() { return prices_; } /** * * *
   * Required. A list of inclusive order price upper bounds. The last price's
   * value can be infinity by setting price amount_micros = -1. For example
   * `[{"amount_micros": 10000000, "currency_code": "USD"},
   * {"amount_micros": 500000000, "currency_code": "USD"},
   * {"amount_micros": -1, "currency_code": "USD"}]` represents the headers
   * "<= $10", "<= $500", and "> $500". All prices within a service must have
   * the same currency. Must be non-empty. Must be positive except -1. Can only
   * be set if all other fields are not set.
   * 
* * * repeated .google.shopping.type.Price prices = 1 [(.google.api.field_behavior) = REQUIRED]; * */ @java.lang.Override public int getPricesCount() { return prices_.size(); } /** * * *
   * Required. A list of inclusive order price upper bounds. The last price's
   * value can be infinity by setting price amount_micros = -1. For example
   * `[{"amount_micros": 10000000, "currency_code": "USD"},
   * {"amount_micros": 500000000, "currency_code": "USD"},
   * {"amount_micros": -1, "currency_code": "USD"}]` represents the headers
   * "<= $10", "<= $500", and "> $500". All prices within a service must have
   * the same currency. Must be non-empty. Must be positive except -1. Can only
   * be set if all other fields are not set.
   * 
* * * repeated .google.shopping.type.Price prices = 1 [(.google.api.field_behavior) = REQUIRED]; * */ @java.lang.Override public com.google.shopping.type.Price getPrices(int index) { return prices_.get(index); } /** * * *
   * Required. A list of inclusive order price upper bounds. The last price's
   * value can be infinity by setting price amount_micros = -1. For example
   * `[{"amount_micros": 10000000, "currency_code": "USD"},
   * {"amount_micros": 500000000, "currency_code": "USD"},
   * {"amount_micros": -1, "currency_code": "USD"}]` represents the headers
   * "<= $10", "<= $500", and "> $500". All prices within a service must have
   * the same currency. Must be non-empty. Must be positive except -1. Can only
   * be set if all other fields are not set.
   * 
* * * repeated .google.shopping.type.Price prices = 1 [(.google.api.field_behavior) = REQUIRED]; * */ @java.lang.Override public com.google.shopping.type.PriceOrBuilder getPricesOrBuilder(int index) { return prices_.get(index); } public static final int WEIGHTS_FIELD_NUMBER = 2; @SuppressWarnings("serial") private java.util.List weights_; /** * * *
   * Required. A list of inclusive order weight upper bounds. The last weight's
   * value can be infinity by setting price amount_micros = -1. For example
   * `[{"amount_micros": 10000000, "unit": "kg"}, {"amount_micros": 50000000,
   * "unit": "kg"},
   * {"amount_micros": -1, "unit": "kg"}]` represents the headers
   * "<= 10kg", "<= 50kg", and "> 50kg". All weights within a service must have
   * the same unit. Must be non-empty. Must be positive except -1. Can only be
   * set if all other fields are not set.
   * 
* * * repeated .google.shopping.type.Weight weights = 2 [(.google.api.field_behavior) = REQUIRED]; * */ @java.lang.Override public java.util.List getWeightsList() { return weights_; } /** * * *
   * Required. A list of inclusive order weight upper bounds. The last weight's
   * value can be infinity by setting price amount_micros = -1. For example
   * `[{"amount_micros": 10000000, "unit": "kg"}, {"amount_micros": 50000000,
   * "unit": "kg"},
   * {"amount_micros": -1, "unit": "kg"}]` represents the headers
   * "<= 10kg", "<= 50kg", and "> 50kg". All weights within a service must have
   * the same unit. Must be non-empty. Must be positive except -1. Can only be
   * set if all other fields are not set.
   * 
* * * repeated .google.shopping.type.Weight weights = 2 [(.google.api.field_behavior) = REQUIRED]; * */ @java.lang.Override public java.util.List getWeightsOrBuilderList() { return weights_; } /** * * *
   * Required. A list of inclusive order weight upper bounds. The last weight's
   * value can be infinity by setting price amount_micros = -1. For example
   * `[{"amount_micros": 10000000, "unit": "kg"}, {"amount_micros": 50000000,
   * "unit": "kg"},
   * {"amount_micros": -1, "unit": "kg"}]` represents the headers
   * "<= 10kg", "<= 50kg", and "> 50kg". All weights within a service must have
   * the same unit. Must be non-empty. Must be positive except -1. Can only be
   * set if all other fields are not set.
   * 
* * * repeated .google.shopping.type.Weight weights = 2 [(.google.api.field_behavior) = REQUIRED]; * */ @java.lang.Override public int getWeightsCount() { return weights_.size(); } /** * * *
   * Required. A list of inclusive order weight upper bounds. The last weight's
   * value can be infinity by setting price amount_micros = -1. For example
   * `[{"amount_micros": 10000000, "unit": "kg"}, {"amount_micros": 50000000,
   * "unit": "kg"},
   * {"amount_micros": -1, "unit": "kg"}]` represents the headers
   * "<= 10kg", "<= 50kg", and "> 50kg". All weights within a service must have
   * the same unit. Must be non-empty. Must be positive except -1. Can only be
   * set if all other fields are not set.
   * 
* * * repeated .google.shopping.type.Weight weights = 2 [(.google.api.field_behavior) = REQUIRED]; * */ @java.lang.Override public com.google.shopping.type.Weight getWeights(int index) { return weights_.get(index); } /** * * *
   * Required. A list of inclusive order weight upper bounds. The last weight's
   * value can be infinity by setting price amount_micros = -1. For example
   * `[{"amount_micros": 10000000, "unit": "kg"}, {"amount_micros": 50000000,
   * "unit": "kg"},
   * {"amount_micros": -1, "unit": "kg"}]` represents the headers
   * "<= 10kg", "<= 50kg", and "> 50kg". All weights within a service must have
   * the same unit. Must be non-empty. Must be positive except -1. Can only be
   * set if all other fields are not set.
   * 
* * * repeated .google.shopping.type.Weight weights = 2 [(.google.api.field_behavior) = REQUIRED]; * */ @java.lang.Override public com.google.shopping.type.WeightOrBuilder getWeightsOrBuilder(int index) { return weights_.get(index); } public static final int NUMBER_OF_ITEMS_FIELD_NUMBER = 3; @SuppressWarnings("serial") private com.google.protobuf.LazyStringArrayList numberOfItems_ = com.google.protobuf.LazyStringArrayList.emptyList(); /** * * *
   * Required. A list of inclusive number of items upper bounds. The last value
   * can be
   * `"infinity"`. For example
   * `["10", "50", "infinity"]` represents the headers
   * "<= 10 items", "<= 50 items", and "> 50 items". Must be non-empty. Can
   * only be set if all other fields are not set.
   * 
* * repeated string number_of_items = 3 [(.google.api.field_behavior) = REQUIRED]; * * @return A list containing the numberOfItems. */ public com.google.protobuf.ProtocolStringList getNumberOfItemsList() { return numberOfItems_; } /** * * *
   * Required. A list of inclusive number of items upper bounds. The last value
   * can be
   * `"infinity"`. For example
   * `["10", "50", "infinity"]` represents the headers
   * "<= 10 items", "<= 50 items", and "> 50 items". Must be non-empty. Can
   * only be set if all other fields are not set.
   * 
* * repeated string number_of_items = 3 [(.google.api.field_behavior) = REQUIRED]; * * @return The count of numberOfItems. */ public int getNumberOfItemsCount() { return numberOfItems_.size(); } /** * * *
   * Required. A list of inclusive number of items upper bounds. The last value
   * can be
   * `"infinity"`. For example
   * `["10", "50", "infinity"]` represents the headers
   * "<= 10 items", "<= 50 items", and "> 50 items". Must be non-empty. Can
   * only be set if all other fields are not set.
   * 
* * repeated string number_of_items = 3 [(.google.api.field_behavior) = REQUIRED]; * * @param index The index of the element to return. * @return The numberOfItems at the given index. */ public java.lang.String getNumberOfItems(int index) { return numberOfItems_.get(index); } /** * * *
   * Required. A list of inclusive number of items upper bounds. The last value
   * can be
   * `"infinity"`. For example
   * `["10", "50", "infinity"]` represents the headers
   * "<= 10 items", "<= 50 items", and "> 50 items". Must be non-empty. Can
   * only be set if all other fields are not set.
   * 
* * repeated string number_of_items = 3 [(.google.api.field_behavior) = REQUIRED]; * * @param index The index of the value to return. * @return The bytes of the numberOfItems at the given index. */ public com.google.protobuf.ByteString getNumberOfItemsBytes(int index) { return numberOfItems_.getByteString(index); } public static final int POSTAL_CODE_GROUP_NAMES_FIELD_NUMBER = 4; @SuppressWarnings("serial") private com.google.protobuf.LazyStringArrayList postalCodeGroupNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); /** * * *
   * Required. A list of postal group names. The last value can be
   * `"all other locations"`. Example:
   * `["zone 1", "zone 2", "all other locations"]`. The referred
   * postal code groups must match the delivery country of the service. Must
   * be non-empty. Can only be set if all other fields are not set.
   * 
* * repeated string postal_code_group_names = 4 [(.google.api.field_behavior) = REQUIRED]; * * * @return A list containing the postalCodeGroupNames. */ public com.google.protobuf.ProtocolStringList getPostalCodeGroupNamesList() { return postalCodeGroupNames_; } /** * * *
   * Required. A list of postal group names. The last value can be
   * `"all other locations"`. Example:
   * `["zone 1", "zone 2", "all other locations"]`. The referred
   * postal code groups must match the delivery country of the service. Must
   * be non-empty. Can only be set if all other fields are not set.
   * 
* * repeated string postal_code_group_names = 4 [(.google.api.field_behavior) = REQUIRED]; * * * @return The count of postalCodeGroupNames. */ public int getPostalCodeGroupNamesCount() { return postalCodeGroupNames_.size(); } /** * * *
   * Required. A list of postal group names. The last value can be
   * `"all other locations"`. Example:
   * `["zone 1", "zone 2", "all other locations"]`. The referred
   * postal code groups must match the delivery country of the service. Must
   * be non-empty. Can only be set if all other fields are not set.
   * 
* * repeated string postal_code_group_names = 4 [(.google.api.field_behavior) = REQUIRED]; * * * @param index The index of the element to return. * @return The postalCodeGroupNames at the given index. */ public java.lang.String getPostalCodeGroupNames(int index) { return postalCodeGroupNames_.get(index); } /** * * *
   * Required. A list of postal group names. The last value can be
   * `"all other locations"`. Example:
   * `["zone 1", "zone 2", "all other locations"]`. The referred
   * postal code groups must match the delivery country of the service. Must
   * be non-empty. Can only be set if all other fields are not set.
   * 
* * repeated string postal_code_group_names = 4 [(.google.api.field_behavior) = REQUIRED]; * * * @param index The index of the value to return. * @return The bytes of the postalCodeGroupNames at the given index. */ public com.google.protobuf.ByteString getPostalCodeGroupNamesBytes(int index) { return postalCodeGroupNames_.getByteString(index); } public static final int LOCATIONS_FIELD_NUMBER = 5; @SuppressWarnings("serial") private java.util.List locations_; /** * * *
   * Required. A list of location ID sets. Must be non-empty. Can only be set if
   * all other fields are not set.
   * 
* * * repeated .google.shopping.merchant.accounts.v1beta.LocationIdSet locations = 5 [(.google.api.field_behavior) = REQUIRED]; * */ @java.lang.Override public java.util.List getLocationsList() { return locations_; } /** * * *
   * Required. A list of location ID sets. Must be non-empty. Can only be set if
   * all other fields are not set.
   * 
* * * repeated .google.shopping.merchant.accounts.v1beta.LocationIdSet locations = 5 [(.google.api.field_behavior) = REQUIRED]; * */ @java.lang.Override public java.util.List< ? extends com.google.shopping.merchant.accounts.v1beta.LocationIdSetOrBuilder> getLocationsOrBuilderList() { return locations_; } /** * * *
   * Required. A list of location ID sets. Must be non-empty. Can only be set if
   * all other fields are not set.
   * 
* * * repeated .google.shopping.merchant.accounts.v1beta.LocationIdSet locations = 5 [(.google.api.field_behavior) = REQUIRED]; * */ @java.lang.Override public int getLocationsCount() { return locations_.size(); } /** * * *
   * Required. A list of location ID sets. Must be non-empty. Can only be set if
   * all other fields are not set.
   * 
* * * repeated .google.shopping.merchant.accounts.v1beta.LocationIdSet locations = 5 [(.google.api.field_behavior) = REQUIRED]; * */ @java.lang.Override public com.google.shopping.merchant.accounts.v1beta.LocationIdSet getLocations(int index) { return locations_.get(index); } /** * * *
   * Required. A list of location ID sets. Must be non-empty. Can only be set if
   * all other fields are not set.
   * 
* * * repeated .google.shopping.merchant.accounts.v1beta.LocationIdSet locations = 5 [(.google.api.field_behavior) = REQUIRED]; * */ @java.lang.Override public com.google.shopping.merchant.accounts.v1beta.LocationIdSetOrBuilder getLocationsOrBuilder( int index) { return locations_.get(index); } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { for (int i = 0; i < prices_.size(); i++) { output.writeMessage(1, prices_.get(i)); } for (int i = 0; i < weights_.size(); i++) { output.writeMessage(2, weights_.get(i)); } for (int i = 0; i < numberOfItems_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, numberOfItems_.getRaw(i)); } for (int i = 0; i < postalCodeGroupNames_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString( output, 4, postalCodeGroupNames_.getRaw(i)); } for (int i = 0; i < locations_.size(); i++) { output.writeMessage(5, locations_.get(i)); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; for (int i = 0; i < prices_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, prices_.get(i)); } for (int i = 0; i < weights_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, weights_.get(i)); } { int dataSize = 0; for (int i = 0; i < numberOfItems_.size(); i++) { dataSize += computeStringSizeNoTag(numberOfItems_.getRaw(i)); } size += dataSize; size += 1 * getNumberOfItemsList().size(); } { int dataSize = 0; for (int i = 0; i < postalCodeGroupNames_.size(); i++) { dataSize += computeStringSizeNoTag(postalCodeGroupNames_.getRaw(i)); } size += dataSize; size += 1 * getPostalCodeGroupNamesList().size(); } for (int i = 0; i < locations_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, locations_.get(i)); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.shopping.merchant.accounts.v1beta.Headers)) { return super.equals(obj); } com.google.shopping.merchant.accounts.v1beta.Headers other = (com.google.shopping.merchant.accounts.v1beta.Headers) obj; if (!getPricesList().equals(other.getPricesList())) return false; if (!getWeightsList().equals(other.getWeightsList())) return false; if (!getNumberOfItemsList().equals(other.getNumberOfItemsList())) return false; if (!getPostalCodeGroupNamesList().equals(other.getPostalCodeGroupNamesList())) return false; if (!getLocationsList().equals(other.getLocationsList())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (getPricesCount() > 0) { hash = (37 * hash) + PRICES_FIELD_NUMBER; hash = (53 * hash) + getPricesList().hashCode(); } if (getWeightsCount() > 0) { hash = (37 * hash) + WEIGHTS_FIELD_NUMBER; hash = (53 * hash) + getWeightsList().hashCode(); } if (getNumberOfItemsCount() > 0) { hash = (37 * hash) + NUMBER_OF_ITEMS_FIELD_NUMBER; hash = (53 * hash) + getNumberOfItemsList().hashCode(); } if (getPostalCodeGroupNamesCount() > 0) { hash = (37 * hash) + POSTAL_CODE_GROUP_NAMES_FIELD_NUMBER; hash = (53 * hash) + getPostalCodeGroupNamesList().hashCode(); } if (getLocationsCount() > 0) { hash = (37 * hash) + LOCATIONS_FIELD_NUMBER; hash = (53 * hash) + getLocationsList().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.shopping.merchant.accounts.v1beta.Headers parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.shopping.merchant.accounts.v1beta.Headers parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.shopping.merchant.accounts.v1beta.Headers parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.shopping.merchant.accounts.v1beta.Headers 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.shopping.merchant.accounts.v1beta.Headers parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.shopping.merchant.accounts.v1beta.Headers parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.shopping.merchant.accounts.v1beta.Headers parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.shopping.merchant.accounts.v1beta.Headers 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.shopping.merchant.accounts.v1beta.Headers parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.shopping.merchant.accounts.v1beta.Headers 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.shopping.merchant.accounts.v1beta.Headers parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.shopping.merchant.accounts.v1beta.Headers 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.shopping.merchant.accounts.v1beta.Headers 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; } /** * * *
   * A non-empty list of row or column headers for a table.
   * Exactly one of `prices`, `weights`,
   * `num_items`, `postal_code_group_names`, or
   * `location` must be set.
   * 
* * Protobuf type {@code google.shopping.merchant.accounts.v1beta.Headers} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.shopping.merchant.accounts.v1beta.Headers) com.google.shopping.merchant.accounts.v1beta.HeadersOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.shopping.merchant.accounts.v1beta.ShippingSettingsProto .internal_static_google_shopping_merchant_accounts_v1beta_Headers_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.shopping.merchant.accounts.v1beta.ShippingSettingsProto .internal_static_google_shopping_merchant_accounts_v1beta_Headers_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.shopping.merchant.accounts.v1beta.Headers.class, com.google.shopping.merchant.accounts.v1beta.Headers.Builder.class); } // Construct using com.google.shopping.merchant.accounts.v1beta.Headers.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; if (pricesBuilder_ == null) { prices_ = java.util.Collections.emptyList(); } else { prices_ = null; pricesBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000001); if (weightsBuilder_ == null) { weights_ = java.util.Collections.emptyList(); } else { weights_ = null; weightsBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000002); numberOfItems_ = com.google.protobuf.LazyStringArrayList.emptyList(); postalCodeGroupNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); if (locationsBuilder_ == null) { locations_ = java.util.Collections.emptyList(); } else { locations_ = null; locationsBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000010); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.shopping.merchant.accounts.v1beta.ShippingSettingsProto .internal_static_google_shopping_merchant_accounts_v1beta_Headers_descriptor; } @java.lang.Override public com.google.shopping.merchant.accounts.v1beta.Headers getDefaultInstanceForType() { return com.google.shopping.merchant.accounts.v1beta.Headers.getDefaultInstance(); } @java.lang.Override public com.google.shopping.merchant.accounts.v1beta.Headers build() { com.google.shopping.merchant.accounts.v1beta.Headers result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.shopping.merchant.accounts.v1beta.Headers buildPartial() { com.google.shopping.merchant.accounts.v1beta.Headers result = new com.google.shopping.merchant.accounts.v1beta.Headers(this); buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartialRepeatedFields( com.google.shopping.merchant.accounts.v1beta.Headers result) { if (pricesBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { prices_ = java.util.Collections.unmodifiableList(prices_); bitField0_ = (bitField0_ & ~0x00000001); } result.prices_ = prices_; } else { result.prices_ = pricesBuilder_.build(); } if (weightsBuilder_ == null) { if (((bitField0_ & 0x00000002) != 0)) { weights_ = java.util.Collections.unmodifiableList(weights_); bitField0_ = (bitField0_ & ~0x00000002); } result.weights_ = weights_; } else { result.weights_ = weightsBuilder_.build(); } if (locationsBuilder_ == null) { if (((bitField0_ & 0x00000010) != 0)) { locations_ = java.util.Collections.unmodifiableList(locations_); bitField0_ = (bitField0_ & ~0x00000010); } result.locations_ = locations_; } else { result.locations_ = locationsBuilder_.build(); } } private void buildPartial0(com.google.shopping.merchant.accounts.v1beta.Headers result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000004) != 0)) { numberOfItems_.makeImmutable(); result.numberOfItems_ = numberOfItems_; } if (((from_bitField0_ & 0x00000008) != 0)) { postalCodeGroupNames_.makeImmutable(); result.postalCodeGroupNames_ = postalCodeGroupNames_; } } @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.shopping.merchant.accounts.v1beta.Headers) { return mergeFrom((com.google.shopping.merchant.accounts.v1beta.Headers) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.shopping.merchant.accounts.v1beta.Headers other) { if (other == com.google.shopping.merchant.accounts.v1beta.Headers.getDefaultInstance()) return this; if (pricesBuilder_ == null) { if (!other.prices_.isEmpty()) { if (prices_.isEmpty()) { prices_ = other.prices_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensurePricesIsMutable(); prices_.addAll(other.prices_); } onChanged(); } } else { if (!other.prices_.isEmpty()) { if (pricesBuilder_.isEmpty()) { pricesBuilder_.dispose(); pricesBuilder_ = null; prices_ = other.prices_; bitField0_ = (bitField0_ & ~0x00000001); pricesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getPricesFieldBuilder() : null; } else { pricesBuilder_.addAllMessages(other.prices_); } } } if (weightsBuilder_ == null) { if (!other.weights_.isEmpty()) { if (weights_.isEmpty()) { weights_ = other.weights_; bitField0_ = (bitField0_ & ~0x00000002); } else { ensureWeightsIsMutable(); weights_.addAll(other.weights_); } onChanged(); } } else { if (!other.weights_.isEmpty()) { if (weightsBuilder_.isEmpty()) { weightsBuilder_.dispose(); weightsBuilder_ = null; weights_ = other.weights_; bitField0_ = (bitField0_ & ~0x00000002); weightsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getWeightsFieldBuilder() : null; } else { weightsBuilder_.addAllMessages(other.weights_); } } } if (!other.numberOfItems_.isEmpty()) { if (numberOfItems_.isEmpty()) { numberOfItems_ = other.numberOfItems_; bitField0_ |= 0x00000004; } else { ensureNumberOfItemsIsMutable(); numberOfItems_.addAll(other.numberOfItems_); } onChanged(); } if (!other.postalCodeGroupNames_.isEmpty()) { if (postalCodeGroupNames_.isEmpty()) { postalCodeGroupNames_ = other.postalCodeGroupNames_; bitField0_ |= 0x00000008; } else { ensurePostalCodeGroupNamesIsMutable(); postalCodeGroupNames_.addAll(other.postalCodeGroupNames_); } onChanged(); } if (locationsBuilder_ == null) { if (!other.locations_.isEmpty()) { if (locations_.isEmpty()) { locations_ = other.locations_; bitField0_ = (bitField0_ & ~0x00000010); } else { ensureLocationsIsMutable(); locations_.addAll(other.locations_); } onChanged(); } } else { if (!other.locations_.isEmpty()) { if (locationsBuilder_.isEmpty()) { locationsBuilder_.dispose(); locationsBuilder_ = null; locations_ = other.locations_; bitField0_ = (bitField0_ & ~0x00000010); locationsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getLocationsFieldBuilder() : null; } else { locationsBuilder_.addAllMessages(other.locations_); } } } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { com.google.shopping.type.Price m = input.readMessage(com.google.shopping.type.Price.parser(), extensionRegistry); if (pricesBuilder_ == null) { ensurePricesIsMutable(); prices_.add(m); } else { pricesBuilder_.addMessage(m); } break; } // case 10 case 18: { com.google.shopping.type.Weight m = input.readMessage(com.google.shopping.type.Weight.parser(), extensionRegistry); if (weightsBuilder_ == null) { ensureWeightsIsMutable(); weights_.add(m); } else { weightsBuilder_.addMessage(m); } break; } // case 18 case 26: { java.lang.String s = input.readStringRequireUtf8(); ensureNumberOfItemsIsMutable(); numberOfItems_.add(s); break; } // case 26 case 34: { java.lang.String s = input.readStringRequireUtf8(); ensurePostalCodeGroupNamesIsMutable(); postalCodeGroupNames_.add(s); break; } // case 34 case 42: { com.google.shopping.merchant.accounts.v1beta.LocationIdSet m = input.readMessage( com.google.shopping.merchant.accounts.v1beta.LocationIdSet.parser(), extensionRegistry); if (locationsBuilder_ == null) { ensureLocationsIsMutable(); locations_.add(m); } else { locationsBuilder_.addMessage(m); } 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 java.util.List prices_ = java.util.Collections.emptyList(); private void ensurePricesIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { prices_ = new java.util.ArrayList(prices_); bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.shopping.type.Price, com.google.shopping.type.Price.Builder, com.google.shopping.type.PriceOrBuilder> pricesBuilder_; /** * * *
     * Required. A list of inclusive order price upper bounds. The last price's
     * value can be infinity by setting price amount_micros = -1. For example
     * `[{"amount_micros": 10000000, "currency_code": "USD"},
     * {"amount_micros": 500000000, "currency_code": "USD"},
     * {"amount_micros": -1, "currency_code": "USD"}]` represents the headers
     * "<= $10", "<= $500", and "> $500". All prices within a service must have
     * the same currency. Must be non-empty. Must be positive except -1. Can only
     * be set if all other fields are not set.
     * 
* * * repeated .google.shopping.type.Price prices = 1 [(.google.api.field_behavior) = REQUIRED]; * */ public java.util.List getPricesList() { if (pricesBuilder_ == null) { return java.util.Collections.unmodifiableList(prices_); } else { return pricesBuilder_.getMessageList(); } } /** * * *
     * Required. A list of inclusive order price upper bounds. The last price's
     * value can be infinity by setting price amount_micros = -1. For example
     * `[{"amount_micros": 10000000, "currency_code": "USD"},
     * {"amount_micros": 500000000, "currency_code": "USD"},
     * {"amount_micros": -1, "currency_code": "USD"}]` represents the headers
     * "<= $10", "<= $500", and "> $500". All prices within a service must have
     * the same currency. Must be non-empty. Must be positive except -1. Can only
     * be set if all other fields are not set.
     * 
* * * repeated .google.shopping.type.Price prices = 1 [(.google.api.field_behavior) = REQUIRED]; * */ public int getPricesCount() { if (pricesBuilder_ == null) { return prices_.size(); } else { return pricesBuilder_.getCount(); } } /** * * *
     * Required. A list of inclusive order price upper bounds. The last price's
     * value can be infinity by setting price amount_micros = -1. For example
     * `[{"amount_micros": 10000000, "currency_code": "USD"},
     * {"amount_micros": 500000000, "currency_code": "USD"},
     * {"amount_micros": -1, "currency_code": "USD"}]` represents the headers
     * "<= $10", "<= $500", and "> $500". All prices within a service must have
     * the same currency. Must be non-empty. Must be positive except -1. Can only
     * be set if all other fields are not set.
     * 
* * * repeated .google.shopping.type.Price prices = 1 [(.google.api.field_behavior) = REQUIRED]; * */ public com.google.shopping.type.Price getPrices(int index) { if (pricesBuilder_ == null) { return prices_.get(index); } else { return pricesBuilder_.getMessage(index); } } /** * * *
     * Required. A list of inclusive order price upper bounds. The last price's
     * value can be infinity by setting price amount_micros = -1. For example
     * `[{"amount_micros": 10000000, "currency_code": "USD"},
     * {"amount_micros": 500000000, "currency_code": "USD"},
     * {"amount_micros": -1, "currency_code": "USD"}]` represents the headers
     * "<= $10", "<= $500", and "> $500". All prices within a service must have
     * the same currency. Must be non-empty. Must be positive except -1. Can only
     * be set if all other fields are not set.
     * 
* * * repeated .google.shopping.type.Price prices = 1 [(.google.api.field_behavior) = REQUIRED]; * */ public Builder setPrices(int index, com.google.shopping.type.Price value) { if (pricesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensurePricesIsMutable(); prices_.set(index, value); onChanged(); } else { pricesBuilder_.setMessage(index, value); } return this; } /** * * *
     * Required. A list of inclusive order price upper bounds. The last price's
     * value can be infinity by setting price amount_micros = -1. For example
     * `[{"amount_micros": 10000000, "currency_code": "USD"},
     * {"amount_micros": 500000000, "currency_code": "USD"},
     * {"amount_micros": -1, "currency_code": "USD"}]` represents the headers
     * "<= $10", "<= $500", and "> $500". All prices within a service must have
     * the same currency. Must be non-empty. Must be positive except -1. Can only
     * be set if all other fields are not set.
     * 
* * * repeated .google.shopping.type.Price prices = 1 [(.google.api.field_behavior) = REQUIRED]; * */ public Builder setPrices(int index, com.google.shopping.type.Price.Builder builderForValue) { if (pricesBuilder_ == null) { ensurePricesIsMutable(); prices_.set(index, builderForValue.build()); onChanged(); } else { pricesBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * * *
     * Required. A list of inclusive order price upper bounds. The last price's
     * value can be infinity by setting price amount_micros = -1. For example
     * `[{"amount_micros": 10000000, "currency_code": "USD"},
     * {"amount_micros": 500000000, "currency_code": "USD"},
     * {"amount_micros": -1, "currency_code": "USD"}]` represents the headers
     * "<= $10", "<= $500", and "> $500". All prices within a service must have
     * the same currency. Must be non-empty. Must be positive except -1. Can only
     * be set if all other fields are not set.
     * 
* * * repeated .google.shopping.type.Price prices = 1 [(.google.api.field_behavior) = REQUIRED]; * */ public Builder addPrices(com.google.shopping.type.Price value) { if (pricesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensurePricesIsMutable(); prices_.add(value); onChanged(); } else { pricesBuilder_.addMessage(value); } return this; } /** * * *
     * Required. A list of inclusive order price upper bounds. The last price's
     * value can be infinity by setting price amount_micros = -1. For example
     * `[{"amount_micros": 10000000, "currency_code": "USD"},
     * {"amount_micros": 500000000, "currency_code": "USD"},
     * {"amount_micros": -1, "currency_code": "USD"}]` represents the headers
     * "<= $10", "<= $500", and "> $500". All prices within a service must have
     * the same currency. Must be non-empty. Must be positive except -1. Can only
     * be set if all other fields are not set.
     * 
* * * repeated .google.shopping.type.Price prices = 1 [(.google.api.field_behavior) = REQUIRED]; * */ public Builder addPrices(int index, com.google.shopping.type.Price value) { if (pricesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensurePricesIsMutable(); prices_.add(index, value); onChanged(); } else { pricesBuilder_.addMessage(index, value); } return this; } /** * * *
     * Required. A list of inclusive order price upper bounds. The last price's
     * value can be infinity by setting price amount_micros = -1. For example
     * `[{"amount_micros": 10000000, "currency_code": "USD"},
     * {"amount_micros": 500000000, "currency_code": "USD"},
     * {"amount_micros": -1, "currency_code": "USD"}]` represents the headers
     * "<= $10", "<= $500", and "> $500". All prices within a service must have
     * the same currency. Must be non-empty. Must be positive except -1. Can only
     * be set if all other fields are not set.
     * 
* * * repeated .google.shopping.type.Price prices = 1 [(.google.api.field_behavior) = REQUIRED]; * */ public Builder addPrices(com.google.shopping.type.Price.Builder builderForValue) { if (pricesBuilder_ == null) { ensurePricesIsMutable(); prices_.add(builderForValue.build()); onChanged(); } else { pricesBuilder_.addMessage(builderForValue.build()); } return this; } /** * * *
     * Required. A list of inclusive order price upper bounds. The last price's
     * value can be infinity by setting price amount_micros = -1. For example
     * `[{"amount_micros": 10000000, "currency_code": "USD"},
     * {"amount_micros": 500000000, "currency_code": "USD"},
     * {"amount_micros": -1, "currency_code": "USD"}]` represents the headers
     * "<= $10", "<= $500", and "> $500". All prices within a service must have
     * the same currency. Must be non-empty. Must be positive except -1. Can only
     * be set if all other fields are not set.
     * 
* * * repeated .google.shopping.type.Price prices = 1 [(.google.api.field_behavior) = REQUIRED]; * */ public Builder addPrices(int index, com.google.shopping.type.Price.Builder builderForValue) { if (pricesBuilder_ == null) { ensurePricesIsMutable(); prices_.add(index, builderForValue.build()); onChanged(); } else { pricesBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * * *
     * Required. A list of inclusive order price upper bounds. The last price's
     * value can be infinity by setting price amount_micros = -1. For example
     * `[{"amount_micros": 10000000, "currency_code": "USD"},
     * {"amount_micros": 500000000, "currency_code": "USD"},
     * {"amount_micros": -1, "currency_code": "USD"}]` represents the headers
     * "<= $10", "<= $500", and "> $500". All prices within a service must have
     * the same currency. Must be non-empty. Must be positive except -1. Can only
     * be set if all other fields are not set.
     * 
* * * repeated .google.shopping.type.Price prices = 1 [(.google.api.field_behavior) = REQUIRED]; * */ public Builder addAllPrices( java.lang.Iterable values) { if (pricesBuilder_ == null) { ensurePricesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, prices_); onChanged(); } else { pricesBuilder_.addAllMessages(values); } return this; } /** * * *
     * Required. A list of inclusive order price upper bounds. The last price's
     * value can be infinity by setting price amount_micros = -1. For example
     * `[{"amount_micros": 10000000, "currency_code": "USD"},
     * {"amount_micros": 500000000, "currency_code": "USD"},
     * {"amount_micros": -1, "currency_code": "USD"}]` represents the headers
     * "<= $10", "<= $500", and "> $500". All prices within a service must have
     * the same currency. Must be non-empty. Must be positive except -1. Can only
     * be set if all other fields are not set.
     * 
* * * repeated .google.shopping.type.Price prices = 1 [(.google.api.field_behavior) = REQUIRED]; * */ public Builder clearPrices() { if (pricesBuilder_ == null) { prices_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { pricesBuilder_.clear(); } return this; } /** * * *
     * Required. A list of inclusive order price upper bounds. The last price's
     * value can be infinity by setting price amount_micros = -1. For example
     * `[{"amount_micros": 10000000, "currency_code": "USD"},
     * {"amount_micros": 500000000, "currency_code": "USD"},
     * {"amount_micros": -1, "currency_code": "USD"}]` represents the headers
     * "<= $10", "<= $500", and "> $500". All prices within a service must have
     * the same currency. Must be non-empty. Must be positive except -1. Can only
     * be set if all other fields are not set.
     * 
* * * repeated .google.shopping.type.Price prices = 1 [(.google.api.field_behavior) = REQUIRED]; * */ public Builder removePrices(int index) { if (pricesBuilder_ == null) { ensurePricesIsMutable(); prices_.remove(index); onChanged(); } else { pricesBuilder_.remove(index); } return this; } /** * * *
     * Required. A list of inclusive order price upper bounds. The last price's
     * value can be infinity by setting price amount_micros = -1. For example
     * `[{"amount_micros": 10000000, "currency_code": "USD"},
     * {"amount_micros": 500000000, "currency_code": "USD"},
     * {"amount_micros": -1, "currency_code": "USD"}]` represents the headers
     * "<= $10", "<= $500", and "> $500". All prices within a service must have
     * the same currency. Must be non-empty. Must be positive except -1. Can only
     * be set if all other fields are not set.
     * 
* * * repeated .google.shopping.type.Price prices = 1 [(.google.api.field_behavior) = REQUIRED]; * */ public com.google.shopping.type.Price.Builder getPricesBuilder(int index) { return getPricesFieldBuilder().getBuilder(index); } /** * * *
     * Required. A list of inclusive order price upper bounds. The last price's
     * value can be infinity by setting price amount_micros = -1. For example
     * `[{"amount_micros": 10000000, "currency_code": "USD"},
     * {"amount_micros": 500000000, "currency_code": "USD"},
     * {"amount_micros": -1, "currency_code": "USD"}]` represents the headers
     * "<= $10", "<= $500", and "> $500". All prices within a service must have
     * the same currency. Must be non-empty. Must be positive except -1. Can only
     * be set if all other fields are not set.
     * 
* * * repeated .google.shopping.type.Price prices = 1 [(.google.api.field_behavior) = REQUIRED]; * */ public com.google.shopping.type.PriceOrBuilder getPricesOrBuilder(int index) { if (pricesBuilder_ == null) { return prices_.get(index); } else { return pricesBuilder_.getMessageOrBuilder(index); } } /** * * *
     * Required. A list of inclusive order price upper bounds. The last price's
     * value can be infinity by setting price amount_micros = -1. For example
     * `[{"amount_micros": 10000000, "currency_code": "USD"},
     * {"amount_micros": 500000000, "currency_code": "USD"},
     * {"amount_micros": -1, "currency_code": "USD"}]` represents the headers
     * "<= $10", "<= $500", and "> $500". All prices within a service must have
     * the same currency. Must be non-empty. Must be positive except -1. Can only
     * be set if all other fields are not set.
     * 
* * * repeated .google.shopping.type.Price prices = 1 [(.google.api.field_behavior) = REQUIRED]; * */ public java.util.List getPricesOrBuilderList() { if (pricesBuilder_ != null) { return pricesBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(prices_); } } /** * * *
     * Required. A list of inclusive order price upper bounds. The last price's
     * value can be infinity by setting price amount_micros = -1. For example
     * `[{"amount_micros": 10000000, "currency_code": "USD"},
     * {"amount_micros": 500000000, "currency_code": "USD"},
     * {"amount_micros": -1, "currency_code": "USD"}]` represents the headers
     * "<= $10", "<= $500", and "> $500". All prices within a service must have
     * the same currency. Must be non-empty. Must be positive except -1. Can only
     * be set if all other fields are not set.
     * 
* * * repeated .google.shopping.type.Price prices = 1 [(.google.api.field_behavior) = REQUIRED]; * */ public com.google.shopping.type.Price.Builder addPricesBuilder() { return getPricesFieldBuilder() .addBuilder(com.google.shopping.type.Price.getDefaultInstance()); } /** * * *
     * Required. A list of inclusive order price upper bounds. The last price's
     * value can be infinity by setting price amount_micros = -1. For example
     * `[{"amount_micros": 10000000, "currency_code": "USD"},
     * {"amount_micros": 500000000, "currency_code": "USD"},
     * {"amount_micros": -1, "currency_code": "USD"}]` represents the headers
     * "<= $10", "<= $500", and "> $500". All prices within a service must have
     * the same currency. Must be non-empty. Must be positive except -1. Can only
     * be set if all other fields are not set.
     * 
* * * repeated .google.shopping.type.Price prices = 1 [(.google.api.field_behavior) = REQUIRED]; * */ public com.google.shopping.type.Price.Builder addPricesBuilder(int index) { return getPricesFieldBuilder() .addBuilder(index, com.google.shopping.type.Price.getDefaultInstance()); } /** * * *
     * Required. A list of inclusive order price upper bounds. The last price's
     * value can be infinity by setting price amount_micros = -1. For example
     * `[{"amount_micros": 10000000, "currency_code": "USD"},
     * {"amount_micros": 500000000, "currency_code": "USD"},
     * {"amount_micros": -1, "currency_code": "USD"}]` represents the headers
     * "<= $10", "<= $500", and "> $500". All prices within a service must have
     * the same currency. Must be non-empty. Must be positive except -1. Can only
     * be set if all other fields are not set.
     * 
* * * repeated .google.shopping.type.Price prices = 1 [(.google.api.field_behavior) = REQUIRED]; * */ public java.util.List getPricesBuilderList() { return getPricesFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.shopping.type.Price, com.google.shopping.type.Price.Builder, com.google.shopping.type.PriceOrBuilder> getPricesFieldBuilder() { if (pricesBuilder_ == null) { pricesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.google.shopping.type.Price, com.google.shopping.type.Price.Builder, com.google.shopping.type.PriceOrBuilder>( prices_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); prices_ = null; } return pricesBuilder_; } private java.util.List weights_ = java.util.Collections.emptyList(); private void ensureWeightsIsMutable() { if (!((bitField0_ & 0x00000002) != 0)) { weights_ = new java.util.ArrayList(weights_); bitField0_ |= 0x00000002; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.shopping.type.Weight, com.google.shopping.type.Weight.Builder, com.google.shopping.type.WeightOrBuilder> weightsBuilder_; /** * * *
     * Required. A list of inclusive order weight upper bounds. The last weight's
     * value can be infinity by setting price amount_micros = -1. For example
     * `[{"amount_micros": 10000000, "unit": "kg"}, {"amount_micros": 50000000,
     * "unit": "kg"},
     * {"amount_micros": -1, "unit": "kg"}]` represents the headers
     * "<= 10kg", "<= 50kg", and "> 50kg". All weights within a service must have
     * the same unit. Must be non-empty. Must be positive except -1. Can only be
     * set if all other fields are not set.
     * 
* * * repeated .google.shopping.type.Weight weights = 2 [(.google.api.field_behavior) = REQUIRED]; * */ public java.util.List getWeightsList() { if (weightsBuilder_ == null) { return java.util.Collections.unmodifiableList(weights_); } else { return weightsBuilder_.getMessageList(); } } /** * * *
     * Required. A list of inclusive order weight upper bounds. The last weight's
     * value can be infinity by setting price amount_micros = -1. For example
     * `[{"amount_micros": 10000000, "unit": "kg"}, {"amount_micros": 50000000,
     * "unit": "kg"},
     * {"amount_micros": -1, "unit": "kg"}]` represents the headers
     * "<= 10kg", "<= 50kg", and "> 50kg". All weights within a service must have
     * the same unit. Must be non-empty. Must be positive except -1. Can only be
     * set if all other fields are not set.
     * 
* * * repeated .google.shopping.type.Weight weights = 2 [(.google.api.field_behavior) = REQUIRED]; * */ public int getWeightsCount() { if (weightsBuilder_ == null) { return weights_.size(); } else { return weightsBuilder_.getCount(); } } /** * * *
     * Required. A list of inclusive order weight upper bounds. The last weight's
     * value can be infinity by setting price amount_micros = -1. For example
     * `[{"amount_micros": 10000000, "unit": "kg"}, {"amount_micros": 50000000,
     * "unit": "kg"},
     * {"amount_micros": -1, "unit": "kg"}]` represents the headers
     * "<= 10kg", "<= 50kg", and "> 50kg". All weights within a service must have
     * the same unit. Must be non-empty. Must be positive except -1. Can only be
     * set if all other fields are not set.
     * 
* * * repeated .google.shopping.type.Weight weights = 2 [(.google.api.field_behavior) = REQUIRED]; * */ public com.google.shopping.type.Weight getWeights(int index) { if (weightsBuilder_ == null) { return weights_.get(index); } else { return weightsBuilder_.getMessage(index); } } /** * * *
     * Required. A list of inclusive order weight upper bounds. The last weight's
     * value can be infinity by setting price amount_micros = -1. For example
     * `[{"amount_micros": 10000000, "unit": "kg"}, {"amount_micros": 50000000,
     * "unit": "kg"},
     * {"amount_micros": -1, "unit": "kg"}]` represents the headers
     * "<= 10kg", "<= 50kg", and "> 50kg". All weights within a service must have
     * the same unit. Must be non-empty. Must be positive except -1. Can only be
     * set if all other fields are not set.
     * 
* * * repeated .google.shopping.type.Weight weights = 2 [(.google.api.field_behavior) = REQUIRED]; * */ public Builder setWeights(int index, com.google.shopping.type.Weight value) { if (weightsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureWeightsIsMutable(); weights_.set(index, value); onChanged(); } else { weightsBuilder_.setMessage(index, value); } return this; } /** * * *
     * Required. A list of inclusive order weight upper bounds. The last weight's
     * value can be infinity by setting price amount_micros = -1. For example
     * `[{"amount_micros": 10000000, "unit": "kg"}, {"amount_micros": 50000000,
     * "unit": "kg"},
     * {"amount_micros": -1, "unit": "kg"}]` represents the headers
     * "<= 10kg", "<= 50kg", and "> 50kg". All weights within a service must have
     * the same unit. Must be non-empty. Must be positive except -1. Can only be
     * set if all other fields are not set.
     * 
* * * repeated .google.shopping.type.Weight weights = 2 [(.google.api.field_behavior) = REQUIRED]; * */ public Builder setWeights(int index, com.google.shopping.type.Weight.Builder builderForValue) { if (weightsBuilder_ == null) { ensureWeightsIsMutable(); weights_.set(index, builderForValue.build()); onChanged(); } else { weightsBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * * *
     * Required. A list of inclusive order weight upper bounds. The last weight's
     * value can be infinity by setting price amount_micros = -1. For example
     * `[{"amount_micros": 10000000, "unit": "kg"}, {"amount_micros": 50000000,
     * "unit": "kg"},
     * {"amount_micros": -1, "unit": "kg"}]` represents the headers
     * "<= 10kg", "<= 50kg", and "> 50kg". All weights within a service must have
     * the same unit. Must be non-empty. Must be positive except -1. Can only be
     * set if all other fields are not set.
     * 
* * * repeated .google.shopping.type.Weight weights = 2 [(.google.api.field_behavior) = REQUIRED]; * */ public Builder addWeights(com.google.shopping.type.Weight value) { if (weightsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureWeightsIsMutable(); weights_.add(value); onChanged(); } else { weightsBuilder_.addMessage(value); } return this; } /** * * *
     * Required. A list of inclusive order weight upper bounds. The last weight's
     * value can be infinity by setting price amount_micros = -1. For example
     * `[{"amount_micros": 10000000, "unit": "kg"}, {"amount_micros": 50000000,
     * "unit": "kg"},
     * {"amount_micros": -1, "unit": "kg"}]` represents the headers
     * "<= 10kg", "<= 50kg", and "> 50kg". All weights within a service must have
     * the same unit. Must be non-empty. Must be positive except -1. Can only be
     * set if all other fields are not set.
     * 
* * * repeated .google.shopping.type.Weight weights = 2 [(.google.api.field_behavior) = REQUIRED]; * */ public Builder addWeights(int index, com.google.shopping.type.Weight value) { if (weightsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureWeightsIsMutable(); weights_.add(index, value); onChanged(); } else { weightsBuilder_.addMessage(index, value); } return this; } /** * * *
     * Required. A list of inclusive order weight upper bounds. The last weight's
     * value can be infinity by setting price amount_micros = -1. For example
     * `[{"amount_micros": 10000000, "unit": "kg"}, {"amount_micros": 50000000,
     * "unit": "kg"},
     * {"amount_micros": -1, "unit": "kg"}]` represents the headers
     * "<= 10kg", "<= 50kg", and "> 50kg". All weights within a service must have
     * the same unit. Must be non-empty. Must be positive except -1. Can only be
     * set if all other fields are not set.
     * 
* * * repeated .google.shopping.type.Weight weights = 2 [(.google.api.field_behavior) = REQUIRED]; * */ public Builder addWeights(com.google.shopping.type.Weight.Builder builderForValue) { if (weightsBuilder_ == null) { ensureWeightsIsMutable(); weights_.add(builderForValue.build()); onChanged(); } else { weightsBuilder_.addMessage(builderForValue.build()); } return this; } /** * * *
     * Required. A list of inclusive order weight upper bounds. The last weight's
     * value can be infinity by setting price amount_micros = -1. For example
     * `[{"amount_micros": 10000000, "unit": "kg"}, {"amount_micros": 50000000,
     * "unit": "kg"},
     * {"amount_micros": -1, "unit": "kg"}]` represents the headers
     * "<= 10kg", "<= 50kg", and "> 50kg". All weights within a service must have
     * the same unit. Must be non-empty. Must be positive except -1. Can only be
     * set if all other fields are not set.
     * 
* * * repeated .google.shopping.type.Weight weights = 2 [(.google.api.field_behavior) = REQUIRED]; * */ public Builder addWeights(int index, com.google.shopping.type.Weight.Builder builderForValue) { if (weightsBuilder_ == null) { ensureWeightsIsMutable(); weights_.add(index, builderForValue.build()); onChanged(); } else { weightsBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * * *
     * Required. A list of inclusive order weight upper bounds. The last weight's
     * value can be infinity by setting price amount_micros = -1. For example
     * `[{"amount_micros": 10000000, "unit": "kg"}, {"amount_micros": 50000000,
     * "unit": "kg"},
     * {"amount_micros": -1, "unit": "kg"}]` represents the headers
     * "<= 10kg", "<= 50kg", and "> 50kg". All weights within a service must have
     * the same unit. Must be non-empty. Must be positive except -1. Can only be
     * set if all other fields are not set.
     * 
* * * repeated .google.shopping.type.Weight weights = 2 [(.google.api.field_behavior) = REQUIRED]; * */ public Builder addAllWeights( java.lang.Iterable values) { if (weightsBuilder_ == null) { ensureWeightsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, weights_); onChanged(); } else { weightsBuilder_.addAllMessages(values); } return this; } /** * * *
     * Required. A list of inclusive order weight upper bounds. The last weight's
     * value can be infinity by setting price amount_micros = -1. For example
     * `[{"amount_micros": 10000000, "unit": "kg"}, {"amount_micros": 50000000,
     * "unit": "kg"},
     * {"amount_micros": -1, "unit": "kg"}]` represents the headers
     * "<= 10kg", "<= 50kg", and "> 50kg". All weights within a service must have
     * the same unit. Must be non-empty. Must be positive except -1. Can only be
     * set if all other fields are not set.
     * 
* * * repeated .google.shopping.type.Weight weights = 2 [(.google.api.field_behavior) = REQUIRED]; * */ public Builder clearWeights() { if (weightsBuilder_ == null) { weights_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); } else { weightsBuilder_.clear(); } return this; } /** * * *
     * Required. A list of inclusive order weight upper bounds. The last weight's
     * value can be infinity by setting price amount_micros = -1. For example
     * `[{"amount_micros": 10000000, "unit": "kg"}, {"amount_micros": 50000000,
     * "unit": "kg"},
     * {"amount_micros": -1, "unit": "kg"}]` represents the headers
     * "<= 10kg", "<= 50kg", and "> 50kg". All weights within a service must have
     * the same unit. Must be non-empty. Must be positive except -1. Can only be
     * set if all other fields are not set.
     * 
* * * repeated .google.shopping.type.Weight weights = 2 [(.google.api.field_behavior) = REQUIRED]; * */ public Builder removeWeights(int index) { if (weightsBuilder_ == null) { ensureWeightsIsMutable(); weights_.remove(index); onChanged(); } else { weightsBuilder_.remove(index); } return this; } /** * * *
     * Required. A list of inclusive order weight upper bounds. The last weight's
     * value can be infinity by setting price amount_micros = -1. For example
     * `[{"amount_micros": 10000000, "unit": "kg"}, {"amount_micros": 50000000,
     * "unit": "kg"},
     * {"amount_micros": -1, "unit": "kg"}]` represents the headers
     * "<= 10kg", "<= 50kg", and "> 50kg". All weights within a service must have
     * the same unit. Must be non-empty. Must be positive except -1. Can only be
     * set if all other fields are not set.
     * 
* * * repeated .google.shopping.type.Weight weights = 2 [(.google.api.field_behavior) = REQUIRED]; * */ public com.google.shopping.type.Weight.Builder getWeightsBuilder(int index) { return getWeightsFieldBuilder().getBuilder(index); } /** * * *
     * Required. A list of inclusive order weight upper bounds. The last weight's
     * value can be infinity by setting price amount_micros = -1. For example
     * `[{"amount_micros": 10000000, "unit": "kg"}, {"amount_micros": 50000000,
     * "unit": "kg"},
     * {"amount_micros": -1, "unit": "kg"}]` represents the headers
     * "<= 10kg", "<= 50kg", and "> 50kg". All weights within a service must have
     * the same unit. Must be non-empty. Must be positive except -1. Can only be
     * set if all other fields are not set.
     * 
* * * repeated .google.shopping.type.Weight weights = 2 [(.google.api.field_behavior) = REQUIRED]; * */ public com.google.shopping.type.WeightOrBuilder getWeightsOrBuilder(int index) { if (weightsBuilder_ == null) { return weights_.get(index); } else { return weightsBuilder_.getMessageOrBuilder(index); } } /** * * *
     * Required. A list of inclusive order weight upper bounds. The last weight's
     * value can be infinity by setting price amount_micros = -1. For example
     * `[{"amount_micros": 10000000, "unit": "kg"}, {"amount_micros": 50000000,
     * "unit": "kg"},
     * {"amount_micros": -1, "unit": "kg"}]` represents the headers
     * "<= 10kg", "<= 50kg", and "> 50kg". All weights within a service must have
     * the same unit. Must be non-empty. Must be positive except -1. Can only be
     * set if all other fields are not set.
     * 
* * * repeated .google.shopping.type.Weight weights = 2 [(.google.api.field_behavior) = REQUIRED]; * */ public java.util.List getWeightsOrBuilderList() { if (weightsBuilder_ != null) { return weightsBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(weights_); } } /** * * *
     * Required. A list of inclusive order weight upper bounds. The last weight's
     * value can be infinity by setting price amount_micros = -1. For example
     * `[{"amount_micros": 10000000, "unit": "kg"}, {"amount_micros": 50000000,
     * "unit": "kg"},
     * {"amount_micros": -1, "unit": "kg"}]` represents the headers
     * "<= 10kg", "<= 50kg", and "> 50kg". All weights within a service must have
     * the same unit. Must be non-empty. Must be positive except -1. Can only be
     * set if all other fields are not set.
     * 
* * * repeated .google.shopping.type.Weight weights = 2 [(.google.api.field_behavior) = REQUIRED]; * */ public com.google.shopping.type.Weight.Builder addWeightsBuilder() { return getWeightsFieldBuilder() .addBuilder(com.google.shopping.type.Weight.getDefaultInstance()); } /** * * *
     * Required. A list of inclusive order weight upper bounds. The last weight's
     * value can be infinity by setting price amount_micros = -1. For example
     * `[{"amount_micros": 10000000, "unit": "kg"}, {"amount_micros": 50000000,
     * "unit": "kg"},
     * {"amount_micros": -1, "unit": "kg"}]` represents the headers
     * "<= 10kg", "<= 50kg", and "> 50kg". All weights within a service must have
     * the same unit. Must be non-empty. Must be positive except -1. Can only be
     * set if all other fields are not set.
     * 
* * * repeated .google.shopping.type.Weight weights = 2 [(.google.api.field_behavior) = REQUIRED]; * */ public com.google.shopping.type.Weight.Builder addWeightsBuilder(int index) { return getWeightsFieldBuilder() .addBuilder(index, com.google.shopping.type.Weight.getDefaultInstance()); } /** * * *
     * Required. A list of inclusive order weight upper bounds. The last weight's
     * value can be infinity by setting price amount_micros = -1. For example
     * `[{"amount_micros": 10000000, "unit": "kg"}, {"amount_micros": 50000000,
     * "unit": "kg"},
     * {"amount_micros": -1, "unit": "kg"}]` represents the headers
     * "<= 10kg", "<= 50kg", and "> 50kg". All weights within a service must have
     * the same unit. Must be non-empty. Must be positive except -1. Can only be
     * set if all other fields are not set.
     * 
* * * repeated .google.shopping.type.Weight weights = 2 [(.google.api.field_behavior) = REQUIRED]; * */ public java.util.List getWeightsBuilderList() { return getWeightsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.shopping.type.Weight, com.google.shopping.type.Weight.Builder, com.google.shopping.type.WeightOrBuilder> getWeightsFieldBuilder() { if (weightsBuilder_ == null) { weightsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.google.shopping.type.Weight, com.google.shopping.type.Weight.Builder, com.google.shopping.type.WeightOrBuilder>( weights_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); weights_ = null; } return weightsBuilder_; } private com.google.protobuf.LazyStringArrayList numberOfItems_ = com.google.protobuf.LazyStringArrayList.emptyList(); private void ensureNumberOfItemsIsMutable() { if (!numberOfItems_.isModifiable()) { numberOfItems_ = new com.google.protobuf.LazyStringArrayList(numberOfItems_); } bitField0_ |= 0x00000004; } /** * * *
     * Required. A list of inclusive number of items upper bounds. The last value
     * can be
     * `"infinity"`. For example
     * `["10", "50", "infinity"]` represents the headers
     * "<= 10 items", "<= 50 items", and "> 50 items". Must be non-empty. Can
     * only be set if all other fields are not set.
     * 
* * repeated string number_of_items = 3 [(.google.api.field_behavior) = REQUIRED]; * * @return A list containing the numberOfItems. */ public com.google.protobuf.ProtocolStringList getNumberOfItemsList() { numberOfItems_.makeImmutable(); return numberOfItems_; } /** * * *
     * Required. A list of inclusive number of items upper bounds. The last value
     * can be
     * `"infinity"`. For example
     * `["10", "50", "infinity"]` represents the headers
     * "<= 10 items", "<= 50 items", and "> 50 items". Must be non-empty. Can
     * only be set if all other fields are not set.
     * 
* * repeated string number_of_items = 3 [(.google.api.field_behavior) = REQUIRED]; * * @return The count of numberOfItems. */ public int getNumberOfItemsCount() { return numberOfItems_.size(); } /** * * *
     * Required. A list of inclusive number of items upper bounds. The last value
     * can be
     * `"infinity"`. For example
     * `["10", "50", "infinity"]` represents the headers
     * "<= 10 items", "<= 50 items", and "> 50 items". Must be non-empty. Can
     * only be set if all other fields are not set.
     * 
* * repeated string number_of_items = 3 [(.google.api.field_behavior) = REQUIRED]; * * @param index The index of the element to return. * @return The numberOfItems at the given index. */ public java.lang.String getNumberOfItems(int index) { return numberOfItems_.get(index); } /** * * *
     * Required. A list of inclusive number of items upper bounds. The last value
     * can be
     * `"infinity"`. For example
     * `["10", "50", "infinity"]` represents the headers
     * "<= 10 items", "<= 50 items", and "> 50 items". Must be non-empty. Can
     * only be set if all other fields are not set.
     * 
* * repeated string number_of_items = 3 [(.google.api.field_behavior) = REQUIRED]; * * @param index The index of the value to return. * @return The bytes of the numberOfItems at the given index. */ public com.google.protobuf.ByteString getNumberOfItemsBytes(int index) { return numberOfItems_.getByteString(index); } /** * * *
     * Required. A list of inclusive number of items upper bounds. The last value
     * can be
     * `"infinity"`. For example
     * `["10", "50", "infinity"]` represents the headers
     * "<= 10 items", "<= 50 items", and "> 50 items". Must be non-empty. Can
     * only be set if all other fields are not set.
     * 
* * repeated string number_of_items = 3 [(.google.api.field_behavior) = REQUIRED]; * * @param index The index to set the value at. * @param value The numberOfItems to set. * @return This builder for chaining. */ public Builder setNumberOfItems(int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureNumberOfItemsIsMutable(); numberOfItems_.set(index, value); bitField0_ |= 0x00000004; onChanged(); return this; } /** * * *
     * Required. A list of inclusive number of items upper bounds. The last value
     * can be
     * `"infinity"`. For example
     * `["10", "50", "infinity"]` represents the headers
     * "<= 10 items", "<= 50 items", and "> 50 items". Must be non-empty. Can
     * only be set if all other fields are not set.
     * 
* * repeated string number_of_items = 3 [(.google.api.field_behavior) = REQUIRED]; * * @param value The numberOfItems to add. * @return This builder for chaining. */ public Builder addNumberOfItems(java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureNumberOfItemsIsMutable(); numberOfItems_.add(value); bitField0_ |= 0x00000004; onChanged(); return this; } /** * * *
     * Required. A list of inclusive number of items upper bounds. The last value
     * can be
     * `"infinity"`. For example
     * `["10", "50", "infinity"]` represents the headers
     * "<= 10 items", "<= 50 items", and "> 50 items". Must be non-empty. Can
     * only be set if all other fields are not set.
     * 
* * repeated string number_of_items = 3 [(.google.api.field_behavior) = REQUIRED]; * * @param values The numberOfItems to add. * @return This builder for chaining. */ public Builder addAllNumberOfItems(java.lang.Iterable values) { ensureNumberOfItemsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, numberOfItems_); bitField0_ |= 0x00000004; onChanged(); return this; } /** * * *
     * Required. A list of inclusive number of items upper bounds. The last value
     * can be
     * `"infinity"`. For example
     * `["10", "50", "infinity"]` represents the headers
     * "<= 10 items", "<= 50 items", and "> 50 items". Must be non-empty. Can
     * only be set if all other fields are not set.
     * 
* * repeated string number_of_items = 3 [(.google.api.field_behavior) = REQUIRED]; * * @return This builder for chaining. */ public Builder clearNumberOfItems() { numberOfItems_ = com.google.protobuf.LazyStringArrayList.emptyList(); bitField0_ = (bitField0_ & ~0x00000004); ; onChanged(); return this; } /** * * *
     * Required. A list of inclusive number of items upper bounds. The last value
     * can be
     * `"infinity"`. For example
     * `["10", "50", "infinity"]` represents the headers
     * "<= 10 items", "<= 50 items", and "> 50 items". Must be non-empty. Can
     * only be set if all other fields are not set.
     * 
* * repeated string number_of_items = 3 [(.google.api.field_behavior) = REQUIRED]; * * @param value The bytes of the numberOfItems to add. * @return This builder for chaining. */ public Builder addNumberOfItemsBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); ensureNumberOfItemsIsMutable(); numberOfItems_.add(value); bitField0_ |= 0x00000004; onChanged(); return this; } private com.google.protobuf.LazyStringArrayList postalCodeGroupNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); private void ensurePostalCodeGroupNamesIsMutable() { if (!postalCodeGroupNames_.isModifiable()) { postalCodeGroupNames_ = new com.google.protobuf.LazyStringArrayList(postalCodeGroupNames_); } bitField0_ |= 0x00000008; } /** * * *
     * Required. A list of postal group names. The last value can be
     * `"all other locations"`. Example:
     * `["zone 1", "zone 2", "all other locations"]`. The referred
     * postal code groups must match the delivery country of the service. Must
     * be non-empty. Can only be set if all other fields are not set.
     * 
* * repeated string postal_code_group_names = 4 [(.google.api.field_behavior) = REQUIRED]; * * * @return A list containing the postalCodeGroupNames. */ public com.google.protobuf.ProtocolStringList getPostalCodeGroupNamesList() { postalCodeGroupNames_.makeImmutable(); return postalCodeGroupNames_; } /** * * *
     * Required. A list of postal group names. The last value can be
     * `"all other locations"`. Example:
     * `["zone 1", "zone 2", "all other locations"]`. The referred
     * postal code groups must match the delivery country of the service. Must
     * be non-empty. Can only be set if all other fields are not set.
     * 
* * repeated string postal_code_group_names = 4 [(.google.api.field_behavior) = REQUIRED]; * * * @return The count of postalCodeGroupNames. */ public int getPostalCodeGroupNamesCount() { return postalCodeGroupNames_.size(); } /** * * *
     * Required. A list of postal group names. The last value can be
     * `"all other locations"`. Example:
     * `["zone 1", "zone 2", "all other locations"]`. The referred
     * postal code groups must match the delivery country of the service. Must
     * be non-empty. Can only be set if all other fields are not set.
     * 
* * repeated string postal_code_group_names = 4 [(.google.api.field_behavior) = REQUIRED]; * * * @param index The index of the element to return. * @return The postalCodeGroupNames at the given index. */ public java.lang.String getPostalCodeGroupNames(int index) { return postalCodeGroupNames_.get(index); } /** * * *
     * Required. A list of postal group names. The last value can be
     * `"all other locations"`. Example:
     * `["zone 1", "zone 2", "all other locations"]`. The referred
     * postal code groups must match the delivery country of the service. Must
     * be non-empty. Can only be set if all other fields are not set.
     * 
* * repeated string postal_code_group_names = 4 [(.google.api.field_behavior) = REQUIRED]; * * * @param index The index of the value to return. * @return The bytes of the postalCodeGroupNames at the given index. */ public com.google.protobuf.ByteString getPostalCodeGroupNamesBytes(int index) { return postalCodeGroupNames_.getByteString(index); } /** * * *
     * Required. A list of postal group names. The last value can be
     * `"all other locations"`. Example:
     * `["zone 1", "zone 2", "all other locations"]`. The referred
     * postal code groups must match the delivery country of the service. Must
     * be non-empty. Can only be set if all other fields are not set.
     * 
* * repeated string postal_code_group_names = 4 [(.google.api.field_behavior) = REQUIRED]; * * * @param index The index to set the value at. * @param value The postalCodeGroupNames to set. * @return This builder for chaining. */ public Builder setPostalCodeGroupNames(int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensurePostalCodeGroupNamesIsMutable(); postalCodeGroupNames_.set(index, value); bitField0_ |= 0x00000008; onChanged(); return this; } /** * * *
     * Required. A list of postal group names. The last value can be
     * `"all other locations"`. Example:
     * `["zone 1", "zone 2", "all other locations"]`. The referred
     * postal code groups must match the delivery country of the service. Must
     * be non-empty. Can only be set if all other fields are not set.
     * 
* * repeated string postal_code_group_names = 4 [(.google.api.field_behavior) = REQUIRED]; * * * @param value The postalCodeGroupNames to add. * @return This builder for chaining. */ public Builder addPostalCodeGroupNames(java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensurePostalCodeGroupNamesIsMutable(); postalCodeGroupNames_.add(value); bitField0_ |= 0x00000008; onChanged(); return this; } /** * * *
     * Required. A list of postal group names. The last value can be
     * `"all other locations"`. Example:
     * `["zone 1", "zone 2", "all other locations"]`. The referred
     * postal code groups must match the delivery country of the service. Must
     * be non-empty. Can only be set if all other fields are not set.
     * 
* * repeated string postal_code_group_names = 4 [(.google.api.field_behavior) = REQUIRED]; * * * @param values The postalCodeGroupNames to add. * @return This builder for chaining. */ public Builder addAllPostalCodeGroupNames(java.lang.Iterable values) { ensurePostalCodeGroupNamesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, postalCodeGroupNames_); bitField0_ |= 0x00000008; onChanged(); return this; } /** * * *
     * Required. A list of postal group names. The last value can be
     * `"all other locations"`. Example:
     * `["zone 1", "zone 2", "all other locations"]`. The referred
     * postal code groups must match the delivery country of the service. Must
     * be non-empty. Can only be set if all other fields are not set.
     * 
* * repeated string postal_code_group_names = 4 [(.google.api.field_behavior) = REQUIRED]; * * * @return This builder for chaining. */ public Builder clearPostalCodeGroupNames() { postalCodeGroupNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); bitField0_ = (bitField0_ & ~0x00000008); ; onChanged(); return this; } /** * * *
     * Required. A list of postal group names. The last value can be
     * `"all other locations"`. Example:
     * `["zone 1", "zone 2", "all other locations"]`. The referred
     * postal code groups must match the delivery country of the service. Must
     * be non-empty. Can only be set if all other fields are not set.
     * 
* * repeated string postal_code_group_names = 4 [(.google.api.field_behavior) = REQUIRED]; * * * @param value The bytes of the postalCodeGroupNames to add. * @return This builder for chaining. */ public Builder addPostalCodeGroupNamesBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); ensurePostalCodeGroupNamesIsMutable(); postalCodeGroupNames_.add(value); bitField0_ |= 0x00000008; onChanged(); return this; } private java.util.List locations_ = java.util.Collections.emptyList(); private void ensureLocationsIsMutable() { if (!((bitField0_ & 0x00000010) != 0)) { locations_ = new java.util.ArrayList( locations_); bitField0_ |= 0x00000010; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.shopping.merchant.accounts.v1beta.LocationIdSet, com.google.shopping.merchant.accounts.v1beta.LocationIdSet.Builder, com.google.shopping.merchant.accounts.v1beta.LocationIdSetOrBuilder> locationsBuilder_; /** * * *
     * Required. A list of location ID sets. Must be non-empty. Can only be set if
     * all other fields are not set.
     * 
* * * repeated .google.shopping.merchant.accounts.v1beta.LocationIdSet locations = 5 [(.google.api.field_behavior) = REQUIRED]; * */ public java.util.List getLocationsList() { if (locationsBuilder_ == null) { return java.util.Collections.unmodifiableList(locations_); } else { return locationsBuilder_.getMessageList(); } } /** * * *
     * Required. A list of location ID sets. Must be non-empty. Can only be set if
     * all other fields are not set.
     * 
* * * repeated .google.shopping.merchant.accounts.v1beta.LocationIdSet locations = 5 [(.google.api.field_behavior) = REQUIRED]; * */ public int getLocationsCount() { if (locationsBuilder_ == null) { return locations_.size(); } else { return locationsBuilder_.getCount(); } } /** * * *
     * Required. A list of location ID sets. Must be non-empty. Can only be set if
     * all other fields are not set.
     * 
* * * repeated .google.shopping.merchant.accounts.v1beta.LocationIdSet locations = 5 [(.google.api.field_behavior) = REQUIRED]; * */ public com.google.shopping.merchant.accounts.v1beta.LocationIdSet getLocations(int index) { if (locationsBuilder_ == null) { return locations_.get(index); } else { return locationsBuilder_.getMessage(index); } } /** * * *
     * Required. A list of location ID sets. Must be non-empty. Can only be set if
     * all other fields are not set.
     * 
* * * repeated .google.shopping.merchant.accounts.v1beta.LocationIdSet locations = 5 [(.google.api.field_behavior) = REQUIRED]; * */ public Builder setLocations( int index, com.google.shopping.merchant.accounts.v1beta.LocationIdSet value) { if (locationsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureLocationsIsMutable(); locations_.set(index, value); onChanged(); } else { locationsBuilder_.setMessage(index, value); } return this; } /** * * *
     * Required. A list of location ID sets. Must be non-empty. Can only be set if
     * all other fields are not set.
     * 
* * * repeated .google.shopping.merchant.accounts.v1beta.LocationIdSet locations = 5 [(.google.api.field_behavior) = REQUIRED]; * */ public Builder setLocations( int index, com.google.shopping.merchant.accounts.v1beta.LocationIdSet.Builder builderForValue) { if (locationsBuilder_ == null) { ensureLocationsIsMutable(); locations_.set(index, builderForValue.build()); onChanged(); } else { locationsBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * * *
     * Required. A list of location ID sets. Must be non-empty. Can only be set if
     * all other fields are not set.
     * 
* * * repeated .google.shopping.merchant.accounts.v1beta.LocationIdSet locations = 5 [(.google.api.field_behavior) = REQUIRED]; * */ public Builder addLocations(com.google.shopping.merchant.accounts.v1beta.LocationIdSet value) { if (locationsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureLocationsIsMutable(); locations_.add(value); onChanged(); } else { locationsBuilder_.addMessage(value); } return this; } /** * * *
     * Required. A list of location ID sets. Must be non-empty. Can only be set if
     * all other fields are not set.
     * 
* * * repeated .google.shopping.merchant.accounts.v1beta.LocationIdSet locations = 5 [(.google.api.field_behavior) = REQUIRED]; * */ public Builder addLocations( int index, com.google.shopping.merchant.accounts.v1beta.LocationIdSet value) { if (locationsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureLocationsIsMutable(); locations_.add(index, value); onChanged(); } else { locationsBuilder_.addMessage(index, value); } return this; } /** * * *
     * Required. A list of location ID sets. Must be non-empty. Can only be set if
     * all other fields are not set.
     * 
* * * repeated .google.shopping.merchant.accounts.v1beta.LocationIdSet locations = 5 [(.google.api.field_behavior) = REQUIRED]; * */ public Builder addLocations( com.google.shopping.merchant.accounts.v1beta.LocationIdSet.Builder builderForValue) { if (locationsBuilder_ == null) { ensureLocationsIsMutable(); locations_.add(builderForValue.build()); onChanged(); } else { locationsBuilder_.addMessage(builderForValue.build()); } return this; } /** * * *
     * Required. A list of location ID sets. Must be non-empty. Can only be set if
     * all other fields are not set.
     * 
* * * repeated .google.shopping.merchant.accounts.v1beta.LocationIdSet locations = 5 [(.google.api.field_behavior) = REQUIRED]; * */ public Builder addLocations( int index, com.google.shopping.merchant.accounts.v1beta.LocationIdSet.Builder builderForValue) { if (locationsBuilder_ == null) { ensureLocationsIsMutable(); locations_.add(index, builderForValue.build()); onChanged(); } else { locationsBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * * *
     * Required. A list of location ID sets. Must be non-empty. Can only be set if
     * all other fields are not set.
     * 
* * * repeated .google.shopping.merchant.accounts.v1beta.LocationIdSet locations = 5 [(.google.api.field_behavior) = REQUIRED]; * */ public Builder addAllLocations( java.lang.Iterable values) { if (locationsBuilder_ == null) { ensureLocationsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, locations_); onChanged(); } else { locationsBuilder_.addAllMessages(values); } return this; } /** * * *
     * Required. A list of location ID sets. Must be non-empty. Can only be set if
     * all other fields are not set.
     * 
* * * repeated .google.shopping.merchant.accounts.v1beta.LocationIdSet locations = 5 [(.google.api.field_behavior) = REQUIRED]; * */ public Builder clearLocations() { if (locationsBuilder_ == null) { locations_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000010); onChanged(); } else { locationsBuilder_.clear(); } return this; } /** * * *
     * Required. A list of location ID sets. Must be non-empty. Can only be set if
     * all other fields are not set.
     * 
* * * repeated .google.shopping.merchant.accounts.v1beta.LocationIdSet locations = 5 [(.google.api.field_behavior) = REQUIRED]; * */ public Builder removeLocations(int index) { if (locationsBuilder_ == null) { ensureLocationsIsMutable(); locations_.remove(index); onChanged(); } else { locationsBuilder_.remove(index); } return this; } /** * * *
     * Required. A list of location ID sets. Must be non-empty. Can only be set if
     * all other fields are not set.
     * 
* * * repeated .google.shopping.merchant.accounts.v1beta.LocationIdSet locations = 5 [(.google.api.field_behavior) = REQUIRED]; * */ public com.google.shopping.merchant.accounts.v1beta.LocationIdSet.Builder getLocationsBuilder( int index) { return getLocationsFieldBuilder().getBuilder(index); } /** * * *
     * Required. A list of location ID sets. Must be non-empty. Can only be set if
     * all other fields are not set.
     * 
* * * repeated .google.shopping.merchant.accounts.v1beta.LocationIdSet locations = 5 [(.google.api.field_behavior) = REQUIRED]; * */ public com.google.shopping.merchant.accounts.v1beta.LocationIdSetOrBuilder getLocationsOrBuilder(int index) { if (locationsBuilder_ == null) { return locations_.get(index); } else { return locationsBuilder_.getMessageOrBuilder(index); } } /** * * *
     * Required. A list of location ID sets. Must be non-empty. Can only be set if
     * all other fields are not set.
     * 
* * * repeated .google.shopping.merchant.accounts.v1beta.LocationIdSet locations = 5 [(.google.api.field_behavior) = REQUIRED]; * */ public java.util.List< ? extends com.google.shopping.merchant.accounts.v1beta.LocationIdSetOrBuilder> getLocationsOrBuilderList() { if (locationsBuilder_ != null) { return locationsBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(locations_); } } /** * * *
     * Required. A list of location ID sets. Must be non-empty. Can only be set if
     * all other fields are not set.
     * 
* * * repeated .google.shopping.merchant.accounts.v1beta.LocationIdSet locations = 5 [(.google.api.field_behavior) = REQUIRED]; * */ public com.google.shopping.merchant.accounts.v1beta.LocationIdSet.Builder addLocationsBuilder() { return getLocationsFieldBuilder() .addBuilder( com.google.shopping.merchant.accounts.v1beta.LocationIdSet.getDefaultInstance()); } /** * * *
     * Required. A list of location ID sets. Must be non-empty. Can only be set if
     * all other fields are not set.
     * 
* * * repeated .google.shopping.merchant.accounts.v1beta.LocationIdSet locations = 5 [(.google.api.field_behavior) = REQUIRED]; * */ public com.google.shopping.merchant.accounts.v1beta.LocationIdSet.Builder addLocationsBuilder( int index) { return getLocationsFieldBuilder() .addBuilder( index, com.google.shopping.merchant.accounts.v1beta.LocationIdSet.getDefaultInstance()); } /** * * *
     * Required. A list of location ID sets. Must be non-empty. Can only be set if
     * all other fields are not set.
     * 
* * * repeated .google.shopping.merchant.accounts.v1beta.LocationIdSet locations = 5 [(.google.api.field_behavior) = REQUIRED]; * */ public java.util.List getLocationsBuilderList() { return getLocationsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.shopping.merchant.accounts.v1beta.LocationIdSet, com.google.shopping.merchant.accounts.v1beta.LocationIdSet.Builder, com.google.shopping.merchant.accounts.v1beta.LocationIdSetOrBuilder> getLocationsFieldBuilder() { if (locationsBuilder_ == null) { locationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.google.shopping.merchant.accounts.v1beta.LocationIdSet, com.google.shopping.merchant.accounts.v1beta.LocationIdSet.Builder, com.google.shopping.merchant.accounts.v1beta.LocationIdSetOrBuilder>( locations_, ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean()); locations_ = null; } return locationsBuilder_; } @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.shopping.merchant.accounts.v1beta.Headers) } // @@protoc_insertion_point(class_scope:google.shopping.merchant.accounts.v1beta.Headers) private static final com.google.shopping.merchant.accounts.v1beta.Headers DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.shopping.merchant.accounts.v1beta.Headers(); } public static com.google.shopping.merchant.accounts.v1beta.Headers getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public Headers 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.shopping.merchant.accounts.v1beta.Headers getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy