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

com.google.shopping.merchant.accounts.v1beta.RateGroup 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;

/**
 *
 *
 * 
 * Shipping rate group definitions. Only the last one is allowed to have an
 * empty `applicable_shipping_labels`, which means
 * "everything else". The other `applicable_shipping_labels` must
 * not overlap.
 * 
* * Protobuf type {@code google.shopping.merchant.accounts.v1beta.RateGroup} */ public final class RateGroup extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.shopping.merchant.accounts.v1beta.RateGroup) RateGroupOrBuilder { private static final long serialVersionUID = 0L; // Use RateGroup.newBuilder() to construct. private RateGroup(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private RateGroup() { applicableShippingLabels_ = com.google.protobuf.LazyStringArrayList.emptyList(); subtables_ = java.util.Collections.emptyList(); carrierRates_ = java.util.Collections.emptyList(); name_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new RateGroup(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.shopping.merchant.accounts.v1beta.ShippingSettingsProto .internal_static_google_shopping_merchant_accounts_v1beta_RateGroup_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_RateGroup_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.shopping.merchant.accounts.v1beta.RateGroup.class, com.google.shopping.merchant.accounts.v1beta.RateGroup.Builder.class); } private int bitField0_; public static final int APPLICABLE_SHIPPING_LABELS_FIELD_NUMBER = 1; @SuppressWarnings("serial") private com.google.protobuf.LazyStringArrayList applicableShippingLabels_ = com.google.protobuf.LazyStringArrayList.emptyList(); /** * * *
   * Required. A list of [shipping
   * labels](https://support.google.com/merchants/answer/6324504) defining the
   * products to which this rate group applies to. This is a disjunction: only
   * one of the labels has to match for the rate group to apply. May only be
   * empty for the last rate group of a service.
   * 
* * repeated string applicable_shipping_labels = 1 [(.google.api.field_behavior) = REQUIRED]; * * * @return A list containing the applicableShippingLabels. */ public com.google.protobuf.ProtocolStringList getApplicableShippingLabelsList() { return applicableShippingLabels_; } /** * * *
   * Required. A list of [shipping
   * labels](https://support.google.com/merchants/answer/6324504) defining the
   * products to which this rate group applies to. This is a disjunction: only
   * one of the labels has to match for the rate group to apply. May only be
   * empty for the last rate group of a service.
   * 
* * repeated string applicable_shipping_labels = 1 [(.google.api.field_behavior) = REQUIRED]; * * * @return The count of applicableShippingLabels. */ public int getApplicableShippingLabelsCount() { return applicableShippingLabels_.size(); } /** * * *
   * Required. A list of [shipping
   * labels](https://support.google.com/merchants/answer/6324504) defining the
   * products to which this rate group applies to. This is a disjunction: only
   * one of the labels has to match for the rate group to apply. May only be
   * empty for the last rate group of a service.
   * 
* * repeated string applicable_shipping_labels = 1 [(.google.api.field_behavior) = REQUIRED]; * * * @param index The index of the element to return. * @return The applicableShippingLabels at the given index. */ public java.lang.String getApplicableShippingLabels(int index) { return applicableShippingLabels_.get(index); } /** * * *
   * Required. A list of [shipping
   * labels](https://support.google.com/merchants/answer/6324504) defining the
   * products to which this rate group applies to. This is a disjunction: only
   * one of the labels has to match for the rate group to apply. May only be
   * empty for the last rate group of a service.
   * 
* * repeated string applicable_shipping_labels = 1 [(.google.api.field_behavior) = REQUIRED]; * * * @param index The index of the value to return. * @return The bytes of the applicableShippingLabels at the given index. */ public com.google.protobuf.ByteString getApplicableShippingLabelsBytes(int index) { return applicableShippingLabels_.getByteString(index); } public static final int SINGLE_VALUE_FIELD_NUMBER = 2; private com.google.shopping.merchant.accounts.v1beta.Value singleValue_; /** * * *
   * The value of the rate group (For example flat rate $10). Can only be set
   * if `main_table` and `subtables` are not set.
   * 
* * optional .google.shopping.merchant.accounts.v1beta.Value single_value = 2; * * @return Whether the singleValue field is set. */ @java.lang.Override public boolean hasSingleValue() { return ((bitField0_ & 0x00000001) != 0); } /** * * *
   * The value of the rate group (For example flat rate $10). Can only be set
   * if `main_table` and `subtables` are not set.
   * 
* * optional .google.shopping.merchant.accounts.v1beta.Value single_value = 2; * * @return The singleValue. */ @java.lang.Override public com.google.shopping.merchant.accounts.v1beta.Value getSingleValue() { return singleValue_ == null ? com.google.shopping.merchant.accounts.v1beta.Value.getDefaultInstance() : singleValue_; } /** * * *
   * The value of the rate group (For example flat rate $10). Can only be set
   * if `main_table` and `subtables` are not set.
   * 
* * optional .google.shopping.merchant.accounts.v1beta.Value single_value = 2; */ @java.lang.Override public com.google.shopping.merchant.accounts.v1beta.ValueOrBuilder getSingleValueOrBuilder() { return singleValue_ == null ? com.google.shopping.merchant.accounts.v1beta.Value.getDefaultInstance() : singleValue_; } public static final int MAIN_TABLE_FIELD_NUMBER = 3; private com.google.shopping.merchant.accounts.v1beta.Table mainTable_; /** * * *
   * A table defining the rate group, when `single_value` is not
   * expressive enough. Can only be set if `single_value` is not
   * set.
   * 
* * optional .google.shopping.merchant.accounts.v1beta.Table main_table = 3; * * @return Whether the mainTable field is set. */ @java.lang.Override public boolean hasMainTable() { return ((bitField0_ & 0x00000002) != 0); } /** * * *
   * A table defining the rate group, when `single_value` is not
   * expressive enough. Can only be set if `single_value` is not
   * set.
   * 
* * optional .google.shopping.merchant.accounts.v1beta.Table main_table = 3; * * @return The mainTable. */ @java.lang.Override public com.google.shopping.merchant.accounts.v1beta.Table getMainTable() { return mainTable_ == null ? com.google.shopping.merchant.accounts.v1beta.Table.getDefaultInstance() : mainTable_; } /** * * *
   * A table defining the rate group, when `single_value` is not
   * expressive enough. Can only be set if `single_value` is not
   * set.
   * 
* * optional .google.shopping.merchant.accounts.v1beta.Table main_table = 3; */ @java.lang.Override public com.google.shopping.merchant.accounts.v1beta.TableOrBuilder getMainTableOrBuilder() { return mainTable_ == null ? com.google.shopping.merchant.accounts.v1beta.Table.getDefaultInstance() : mainTable_; } public static final int SUBTABLES_FIELD_NUMBER = 4; @SuppressWarnings("serial") private java.util.List subtables_; /** * * *
   * Optional. A list of subtables referred to by `main_table`. Can only
   * be set if `main_table` is set.
   * 
* * * repeated .google.shopping.merchant.accounts.v1beta.Table subtables = 4 [(.google.api.field_behavior) = OPTIONAL]; * */ @java.lang.Override public java.util.List getSubtablesList() { return subtables_; } /** * * *
   * Optional. A list of subtables referred to by `main_table`. Can only
   * be set if `main_table` is set.
   * 
* * * repeated .google.shopping.merchant.accounts.v1beta.Table subtables = 4 [(.google.api.field_behavior) = OPTIONAL]; * */ @java.lang.Override public java.util.List getSubtablesOrBuilderList() { return subtables_; } /** * * *
   * Optional. A list of subtables referred to by `main_table`. Can only
   * be set if `main_table` is set.
   * 
* * * repeated .google.shopping.merchant.accounts.v1beta.Table subtables = 4 [(.google.api.field_behavior) = OPTIONAL]; * */ @java.lang.Override public int getSubtablesCount() { return subtables_.size(); } /** * * *
   * Optional. A list of subtables referred to by `main_table`. Can only
   * be set if `main_table` is set.
   * 
* * * repeated .google.shopping.merchant.accounts.v1beta.Table subtables = 4 [(.google.api.field_behavior) = OPTIONAL]; * */ @java.lang.Override public com.google.shopping.merchant.accounts.v1beta.Table getSubtables(int index) { return subtables_.get(index); } /** * * *
   * Optional. A list of subtables referred to by `main_table`. Can only
   * be set if `main_table` is set.
   * 
* * * repeated .google.shopping.merchant.accounts.v1beta.Table subtables = 4 [(.google.api.field_behavior) = OPTIONAL]; * */ @java.lang.Override public com.google.shopping.merchant.accounts.v1beta.TableOrBuilder getSubtablesOrBuilder( int index) { return subtables_.get(index); } public static final int CARRIER_RATES_FIELD_NUMBER = 5; @SuppressWarnings("serial") private java.util.List carrierRates_; /** * * *
   * Optional. A list of carrier rates that can be referred to by
   * `main_table` or `single_value`.
   * 
* * * repeated .google.shopping.merchant.accounts.v1beta.CarrierRate carrier_rates = 5 [(.google.api.field_behavior) = OPTIONAL]; * */ @java.lang.Override public java.util.List getCarrierRatesList() { return carrierRates_; } /** * * *
   * Optional. A list of carrier rates that can be referred to by
   * `main_table` or `single_value`.
   * 
* * * repeated .google.shopping.merchant.accounts.v1beta.CarrierRate carrier_rates = 5 [(.google.api.field_behavior) = OPTIONAL]; * */ @java.lang.Override public java.util.List getCarrierRatesOrBuilderList() { return carrierRates_; } /** * * *
   * Optional. A list of carrier rates that can be referred to by
   * `main_table` or `single_value`.
   * 
* * * repeated .google.shopping.merchant.accounts.v1beta.CarrierRate carrier_rates = 5 [(.google.api.field_behavior) = OPTIONAL]; * */ @java.lang.Override public int getCarrierRatesCount() { return carrierRates_.size(); } /** * * *
   * Optional. A list of carrier rates that can be referred to by
   * `main_table` or `single_value`.
   * 
* * * repeated .google.shopping.merchant.accounts.v1beta.CarrierRate carrier_rates = 5 [(.google.api.field_behavior) = OPTIONAL]; * */ @java.lang.Override public com.google.shopping.merchant.accounts.v1beta.CarrierRate getCarrierRates(int index) { return carrierRates_.get(index); } /** * * *
   * Optional. A list of carrier rates that can be referred to by
   * `main_table` or `single_value`.
   * 
* * * repeated .google.shopping.merchant.accounts.v1beta.CarrierRate carrier_rates = 5 [(.google.api.field_behavior) = OPTIONAL]; * */ @java.lang.Override public com.google.shopping.merchant.accounts.v1beta.CarrierRateOrBuilder getCarrierRatesOrBuilder( int index) { return carrierRates_.get(index); } public static final int NAME_FIELD_NUMBER = 6; @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; /** * * *
   * Optional. Name of the rate group.
   * If set has to be unique within shipping service.
   * 
* * optional string name = 6 [(.google.api.field_behavior) = OPTIONAL]; * * @return Whether the name field is set. */ @java.lang.Override public boolean hasName() { return ((bitField0_ & 0x00000004) != 0); } /** * * *
   * Optional. Name of the rate group.
   * If set has to be unique within shipping service.
   * 
* * optional string name = 6 [(.google.api.field_behavior) = OPTIONAL]; * * @return The name. */ @java.lang.Override public java.lang.String getName() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } } /** * * *
   * Optional. Name of the rate group.
   * If set has to be unique within shipping service.
   * 
* * optional string name = 6 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for name. */ @java.lang.Override public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } 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 < applicableShippingLabels_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString( output, 1, applicableShippingLabels_.getRaw(i)); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(2, getSingleValue()); } if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(3, getMainTable()); } for (int i = 0; i < subtables_.size(); i++) { output.writeMessage(4, subtables_.get(i)); } for (int i = 0; i < carrierRates_.size(); i++) { output.writeMessage(5, carrierRates_.get(i)); } if (((bitField0_ & 0x00000004) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 6, name_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; { int dataSize = 0; for (int i = 0; i < applicableShippingLabels_.size(); i++) { dataSize += computeStringSizeNoTag(applicableShippingLabels_.getRaw(i)); } size += dataSize; size += 1 * getApplicableShippingLabelsList().size(); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getSingleValue()); } if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getMainTable()); } for (int i = 0; i < subtables_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, subtables_.get(i)); } for (int i = 0; i < carrierRates_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, carrierRates_.get(i)); } if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, name_); } 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.RateGroup)) { return super.equals(obj); } com.google.shopping.merchant.accounts.v1beta.RateGroup other = (com.google.shopping.merchant.accounts.v1beta.RateGroup) obj; if (!getApplicableShippingLabelsList().equals(other.getApplicableShippingLabelsList())) return false; if (hasSingleValue() != other.hasSingleValue()) return false; if (hasSingleValue()) { if (!getSingleValue().equals(other.getSingleValue())) return false; } if (hasMainTable() != other.hasMainTable()) return false; if (hasMainTable()) { if (!getMainTable().equals(other.getMainTable())) return false; } if (!getSubtablesList().equals(other.getSubtablesList())) return false; if (!getCarrierRatesList().equals(other.getCarrierRatesList())) return false; if (hasName() != other.hasName()) return false; if (hasName()) { if (!getName().equals(other.getName())) 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 (getApplicableShippingLabelsCount() > 0) { hash = (37 * hash) + APPLICABLE_SHIPPING_LABELS_FIELD_NUMBER; hash = (53 * hash) + getApplicableShippingLabelsList().hashCode(); } if (hasSingleValue()) { hash = (37 * hash) + SINGLE_VALUE_FIELD_NUMBER; hash = (53 * hash) + getSingleValue().hashCode(); } if (hasMainTable()) { hash = (37 * hash) + MAIN_TABLE_FIELD_NUMBER; hash = (53 * hash) + getMainTable().hashCode(); } if (getSubtablesCount() > 0) { hash = (37 * hash) + SUBTABLES_FIELD_NUMBER; hash = (53 * hash) + getSubtablesList().hashCode(); } if (getCarrierRatesCount() > 0) { hash = (37 * hash) + CARRIER_RATES_FIELD_NUMBER; hash = (53 * hash) + getCarrierRatesList().hashCode(); } if (hasName()) { hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.shopping.merchant.accounts.v1beta.RateGroup parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.shopping.merchant.accounts.v1beta.RateGroup 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.RateGroup parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.shopping.merchant.accounts.v1beta.RateGroup 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.RateGroup parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.shopping.merchant.accounts.v1beta.RateGroup 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.RateGroup 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.RateGroup 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.RateGroup 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.RateGroup 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.RateGroup 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.RateGroup 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.RateGroup 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; } /** * * *
   * Shipping rate group definitions. Only the last one is allowed to have an
   * empty `applicable_shipping_labels`, which means
   * "everything else". The other `applicable_shipping_labels` must
   * not overlap.
   * 
* * Protobuf type {@code google.shopping.merchant.accounts.v1beta.RateGroup} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.shopping.merchant.accounts.v1beta.RateGroup) com.google.shopping.merchant.accounts.v1beta.RateGroupOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.shopping.merchant.accounts.v1beta.ShippingSettingsProto .internal_static_google_shopping_merchant_accounts_v1beta_RateGroup_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_RateGroup_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.shopping.merchant.accounts.v1beta.RateGroup.class, com.google.shopping.merchant.accounts.v1beta.RateGroup.Builder.class); } // Construct using com.google.shopping.merchant.accounts.v1beta.RateGroup.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { getSingleValueFieldBuilder(); getMainTableFieldBuilder(); getSubtablesFieldBuilder(); getCarrierRatesFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; applicableShippingLabels_ = com.google.protobuf.LazyStringArrayList.emptyList(); singleValue_ = null; if (singleValueBuilder_ != null) { singleValueBuilder_.dispose(); singleValueBuilder_ = null; } mainTable_ = null; if (mainTableBuilder_ != null) { mainTableBuilder_.dispose(); mainTableBuilder_ = null; } if (subtablesBuilder_ == null) { subtables_ = java.util.Collections.emptyList(); } else { subtables_ = null; subtablesBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000008); if (carrierRatesBuilder_ == null) { carrierRates_ = java.util.Collections.emptyList(); } else { carrierRates_ = null; carrierRatesBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000010); name_ = ""; 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_RateGroup_descriptor; } @java.lang.Override public com.google.shopping.merchant.accounts.v1beta.RateGroup getDefaultInstanceForType() { return com.google.shopping.merchant.accounts.v1beta.RateGroup.getDefaultInstance(); } @java.lang.Override public com.google.shopping.merchant.accounts.v1beta.RateGroup build() { com.google.shopping.merchant.accounts.v1beta.RateGroup result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.shopping.merchant.accounts.v1beta.RateGroup buildPartial() { com.google.shopping.merchant.accounts.v1beta.RateGroup result = new com.google.shopping.merchant.accounts.v1beta.RateGroup(this); buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartialRepeatedFields( com.google.shopping.merchant.accounts.v1beta.RateGroup result) { if (subtablesBuilder_ == null) { if (((bitField0_ & 0x00000008) != 0)) { subtables_ = java.util.Collections.unmodifiableList(subtables_); bitField0_ = (bitField0_ & ~0x00000008); } result.subtables_ = subtables_; } else { result.subtables_ = subtablesBuilder_.build(); } if (carrierRatesBuilder_ == null) { if (((bitField0_ & 0x00000010) != 0)) { carrierRates_ = java.util.Collections.unmodifiableList(carrierRates_); bitField0_ = (bitField0_ & ~0x00000010); } result.carrierRates_ = carrierRates_; } else { result.carrierRates_ = carrierRatesBuilder_.build(); } } private void buildPartial0(com.google.shopping.merchant.accounts.v1beta.RateGroup result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { applicableShippingLabels_.makeImmutable(); result.applicableShippingLabels_ = applicableShippingLabels_; } int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000002) != 0)) { result.singleValue_ = singleValueBuilder_ == null ? singleValue_ : singleValueBuilder_.build(); to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000004) != 0)) { result.mainTable_ = mainTableBuilder_ == null ? mainTable_ : mainTableBuilder_.build(); to_bitField0_ |= 0x00000002; } if (((from_bitField0_ & 0x00000020) != 0)) { result.name_ = name_; to_bitField0_ |= 0x00000004; } result.bitField0_ |= to_bitField0_; } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.shopping.merchant.accounts.v1beta.RateGroup) { return mergeFrom((com.google.shopping.merchant.accounts.v1beta.RateGroup) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.shopping.merchant.accounts.v1beta.RateGroup other) { if (other == com.google.shopping.merchant.accounts.v1beta.RateGroup.getDefaultInstance()) return this; if (!other.applicableShippingLabels_.isEmpty()) { if (applicableShippingLabels_.isEmpty()) { applicableShippingLabels_ = other.applicableShippingLabels_; bitField0_ |= 0x00000001; } else { ensureApplicableShippingLabelsIsMutable(); applicableShippingLabels_.addAll(other.applicableShippingLabels_); } onChanged(); } if (other.hasSingleValue()) { mergeSingleValue(other.getSingleValue()); } if (other.hasMainTable()) { mergeMainTable(other.getMainTable()); } if (subtablesBuilder_ == null) { if (!other.subtables_.isEmpty()) { if (subtables_.isEmpty()) { subtables_ = other.subtables_; bitField0_ = (bitField0_ & ~0x00000008); } else { ensureSubtablesIsMutable(); subtables_.addAll(other.subtables_); } onChanged(); } } else { if (!other.subtables_.isEmpty()) { if (subtablesBuilder_.isEmpty()) { subtablesBuilder_.dispose(); subtablesBuilder_ = null; subtables_ = other.subtables_; bitField0_ = (bitField0_ & ~0x00000008); subtablesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getSubtablesFieldBuilder() : null; } else { subtablesBuilder_.addAllMessages(other.subtables_); } } } if (carrierRatesBuilder_ == null) { if (!other.carrierRates_.isEmpty()) { if (carrierRates_.isEmpty()) { carrierRates_ = other.carrierRates_; bitField0_ = (bitField0_ & ~0x00000010); } else { ensureCarrierRatesIsMutable(); carrierRates_.addAll(other.carrierRates_); } onChanged(); } } else { if (!other.carrierRates_.isEmpty()) { if (carrierRatesBuilder_.isEmpty()) { carrierRatesBuilder_.dispose(); carrierRatesBuilder_ = null; carrierRates_ = other.carrierRates_; bitField0_ = (bitField0_ & ~0x00000010); carrierRatesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getCarrierRatesFieldBuilder() : null; } else { carrierRatesBuilder_.addAllMessages(other.carrierRates_); } } } if (other.hasName()) { name_ = other.name_; bitField0_ |= 0x00000020; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { java.lang.String s = input.readStringRequireUtf8(); ensureApplicableShippingLabelsIsMutable(); applicableShippingLabels_.add(s); break; } // case 10 case 18: { input.readMessage(getSingleValueFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 case 26: { input.readMessage(getMainTableFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 case 34: { com.google.shopping.merchant.accounts.v1beta.Table m = input.readMessage( com.google.shopping.merchant.accounts.v1beta.Table.parser(), extensionRegistry); if (subtablesBuilder_ == null) { ensureSubtablesIsMutable(); subtables_.add(m); } else { subtablesBuilder_.addMessage(m); } break; } // case 34 case 42: { com.google.shopping.merchant.accounts.v1beta.CarrierRate m = input.readMessage( com.google.shopping.merchant.accounts.v1beta.CarrierRate.parser(), extensionRegistry); if (carrierRatesBuilder_ == null) { ensureCarrierRatesIsMutable(); carrierRates_.add(m); } else { carrierRatesBuilder_.addMessage(m); } break; } // case 42 case 50: { name_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000020; break; } // case 50 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private com.google.protobuf.LazyStringArrayList applicableShippingLabels_ = com.google.protobuf.LazyStringArrayList.emptyList(); private void ensureApplicableShippingLabelsIsMutable() { if (!applicableShippingLabels_.isModifiable()) { applicableShippingLabels_ = new com.google.protobuf.LazyStringArrayList(applicableShippingLabels_); } bitField0_ |= 0x00000001; } /** * * *
     * Required. A list of [shipping
     * labels](https://support.google.com/merchants/answer/6324504) defining the
     * products to which this rate group applies to. This is a disjunction: only
     * one of the labels has to match for the rate group to apply. May only be
     * empty for the last rate group of a service.
     * 
* * * repeated string applicable_shipping_labels = 1 [(.google.api.field_behavior) = REQUIRED]; * * * @return A list containing the applicableShippingLabels. */ public com.google.protobuf.ProtocolStringList getApplicableShippingLabelsList() { applicableShippingLabels_.makeImmutable(); return applicableShippingLabels_; } /** * * *
     * Required. A list of [shipping
     * labels](https://support.google.com/merchants/answer/6324504) defining the
     * products to which this rate group applies to. This is a disjunction: only
     * one of the labels has to match for the rate group to apply. May only be
     * empty for the last rate group of a service.
     * 
* * * repeated string applicable_shipping_labels = 1 [(.google.api.field_behavior) = REQUIRED]; * * * @return The count of applicableShippingLabels. */ public int getApplicableShippingLabelsCount() { return applicableShippingLabels_.size(); } /** * * *
     * Required. A list of [shipping
     * labels](https://support.google.com/merchants/answer/6324504) defining the
     * products to which this rate group applies to. This is a disjunction: only
     * one of the labels has to match for the rate group to apply. May only be
     * empty for the last rate group of a service.
     * 
* * * repeated string applicable_shipping_labels = 1 [(.google.api.field_behavior) = REQUIRED]; * * * @param index The index of the element to return. * @return The applicableShippingLabels at the given index. */ public java.lang.String getApplicableShippingLabels(int index) { return applicableShippingLabels_.get(index); } /** * * *
     * Required. A list of [shipping
     * labels](https://support.google.com/merchants/answer/6324504) defining the
     * products to which this rate group applies to. This is a disjunction: only
     * one of the labels has to match for the rate group to apply. May only be
     * empty for the last rate group of a service.
     * 
* * * repeated string applicable_shipping_labels = 1 [(.google.api.field_behavior) = REQUIRED]; * * * @param index The index of the value to return. * @return The bytes of the applicableShippingLabels at the given index. */ public com.google.protobuf.ByteString getApplicableShippingLabelsBytes(int index) { return applicableShippingLabels_.getByteString(index); } /** * * *
     * Required. A list of [shipping
     * labels](https://support.google.com/merchants/answer/6324504) defining the
     * products to which this rate group applies to. This is a disjunction: only
     * one of the labels has to match for the rate group to apply. May only be
     * empty for the last rate group of a service.
     * 
* * * repeated string applicable_shipping_labels = 1 [(.google.api.field_behavior) = REQUIRED]; * * * @param index The index to set the value at. * @param value The applicableShippingLabels to set. * @return This builder for chaining. */ public Builder setApplicableShippingLabels(int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureApplicableShippingLabelsIsMutable(); applicableShippingLabels_.set(index, value); bitField0_ |= 0x00000001; onChanged(); return this; } /** * * *
     * Required. A list of [shipping
     * labels](https://support.google.com/merchants/answer/6324504) defining the
     * products to which this rate group applies to. This is a disjunction: only
     * one of the labels has to match for the rate group to apply. May only be
     * empty for the last rate group of a service.
     * 
* * * repeated string applicable_shipping_labels = 1 [(.google.api.field_behavior) = REQUIRED]; * * * @param value The applicableShippingLabels to add. * @return This builder for chaining. */ public Builder addApplicableShippingLabels(java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureApplicableShippingLabelsIsMutable(); applicableShippingLabels_.add(value); bitField0_ |= 0x00000001; onChanged(); return this; } /** * * *
     * Required. A list of [shipping
     * labels](https://support.google.com/merchants/answer/6324504) defining the
     * products to which this rate group applies to. This is a disjunction: only
     * one of the labels has to match for the rate group to apply. May only be
     * empty for the last rate group of a service.
     * 
* * * repeated string applicable_shipping_labels = 1 [(.google.api.field_behavior) = REQUIRED]; * * * @param values The applicableShippingLabels to add. * @return This builder for chaining. */ public Builder addAllApplicableShippingLabels(java.lang.Iterable values) { ensureApplicableShippingLabelsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, applicableShippingLabels_); bitField0_ |= 0x00000001; onChanged(); return this; } /** * * *
     * Required. A list of [shipping
     * labels](https://support.google.com/merchants/answer/6324504) defining the
     * products to which this rate group applies to. This is a disjunction: only
     * one of the labels has to match for the rate group to apply. May only be
     * empty for the last rate group of a service.
     * 
* * * repeated string applicable_shipping_labels = 1 [(.google.api.field_behavior) = REQUIRED]; * * * @return This builder for chaining. */ public Builder clearApplicableShippingLabels() { applicableShippingLabels_ = com.google.protobuf.LazyStringArrayList.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); ; onChanged(); return this; } /** * * *
     * Required. A list of [shipping
     * labels](https://support.google.com/merchants/answer/6324504) defining the
     * products to which this rate group applies to. This is a disjunction: only
     * one of the labels has to match for the rate group to apply. May only be
     * empty for the last rate group of a service.
     * 
* * * repeated string applicable_shipping_labels = 1 [(.google.api.field_behavior) = REQUIRED]; * * * @param value The bytes of the applicableShippingLabels to add. * @return This builder for chaining. */ public Builder addApplicableShippingLabelsBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); ensureApplicableShippingLabelsIsMutable(); applicableShippingLabels_.add(value); bitField0_ |= 0x00000001; onChanged(); return this; } private com.google.shopping.merchant.accounts.v1beta.Value singleValue_; private com.google.protobuf.SingleFieldBuilderV3< com.google.shopping.merchant.accounts.v1beta.Value, com.google.shopping.merchant.accounts.v1beta.Value.Builder, com.google.shopping.merchant.accounts.v1beta.ValueOrBuilder> singleValueBuilder_; /** * * *
     * The value of the rate group (For example flat rate $10). Can only be set
     * if `main_table` and `subtables` are not set.
     * 
* * optional .google.shopping.merchant.accounts.v1beta.Value single_value = 2; * * @return Whether the singleValue field is set. */ public boolean hasSingleValue() { return ((bitField0_ & 0x00000002) != 0); } /** * * *
     * The value of the rate group (For example flat rate $10). Can only be set
     * if `main_table` and `subtables` are not set.
     * 
* * optional .google.shopping.merchant.accounts.v1beta.Value single_value = 2; * * @return The singleValue. */ public com.google.shopping.merchant.accounts.v1beta.Value getSingleValue() { if (singleValueBuilder_ == null) { return singleValue_ == null ? com.google.shopping.merchant.accounts.v1beta.Value.getDefaultInstance() : singleValue_; } else { return singleValueBuilder_.getMessage(); } } /** * * *
     * The value of the rate group (For example flat rate $10). Can only be set
     * if `main_table` and `subtables` are not set.
     * 
* * optional .google.shopping.merchant.accounts.v1beta.Value single_value = 2; */ public Builder setSingleValue(com.google.shopping.merchant.accounts.v1beta.Value value) { if (singleValueBuilder_ == null) { if (value == null) { throw new NullPointerException(); } singleValue_ = value; } else { singleValueBuilder_.setMessage(value); } bitField0_ |= 0x00000002; onChanged(); return this; } /** * * *
     * The value of the rate group (For example flat rate $10). Can only be set
     * if `main_table` and `subtables` are not set.
     * 
* * optional .google.shopping.merchant.accounts.v1beta.Value single_value = 2; */ public Builder setSingleValue( com.google.shopping.merchant.accounts.v1beta.Value.Builder builderForValue) { if (singleValueBuilder_ == null) { singleValue_ = builderForValue.build(); } else { singleValueBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000002; onChanged(); return this; } /** * * *
     * The value of the rate group (For example flat rate $10). Can only be set
     * if `main_table` and `subtables` are not set.
     * 
* * optional .google.shopping.merchant.accounts.v1beta.Value single_value = 2; */ public Builder mergeSingleValue(com.google.shopping.merchant.accounts.v1beta.Value value) { if (singleValueBuilder_ == null) { if (((bitField0_ & 0x00000002) != 0) && singleValue_ != null && singleValue_ != com.google.shopping.merchant.accounts.v1beta.Value.getDefaultInstance()) { getSingleValueBuilder().mergeFrom(value); } else { singleValue_ = value; } } else { singleValueBuilder_.mergeFrom(value); } if (singleValue_ != null) { bitField0_ |= 0x00000002; onChanged(); } return this; } /** * * *
     * The value of the rate group (For example flat rate $10). Can only be set
     * if `main_table` and `subtables` are not set.
     * 
* * optional .google.shopping.merchant.accounts.v1beta.Value single_value = 2; */ public Builder clearSingleValue() { bitField0_ = (bitField0_ & ~0x00000002); singleValue_ = null; if (singleValueBuilder_ != null) { singleValueBuilder_.dispose(); singleValueBuilder_ = null; } onChanged(); return this; } /** * * *
     * The value of the rate group (For example flat rate $10). Can only be set
     * if `main_table` and `subtables` are not set.
     * 
* * optional .google.shopping.merchant.accounts.v1beta.Value single_value = 2; */ public com.google.shopping.merchant.accounts.v1beta.Value.Builder getSingleValueBuilder() { bitField0_ |= 0x00000002; onChanged(); return getSingleValueFieldBuilder().getBuilder(); } /** * * *
     * The value of the rate group (For example flat rate $10). Can only be set
     * if `main_table` and `subtables` are not set.
     * 
* * optional .google.shopping.merchant.accounts.v1beta.Value single_value = 2; */ public com.google.shopping.merchant.accounts.v1beta.ValueOrBuilder getSingleValueOrBuilder() { if (singleValueBuilder_ != null) { return singleValueBuilder_.getMessageOrBuilder(); } else { return singleValue_ == null ? com.google.shopping.merchant.accounts.v1beta.Value.getDefaultInstance() : singleValue_; } } /** * * *
     * The value of the rate group (For example flat rate $10). Can only be set
     * if `main_table` and `subtables` are not set.
     * 
* * optional .google.shopping.merchant.accounts.v1beta.Value single_value = 2; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.shopping.merchant.accounts.v1beta.Value, com.google.shopping.merchant.accounts.v1beta.Value.Builder, com.google.shopping.merchant.accounts.v1beta.ValueOrBuilder> getSingleValueFieldBuilder() { if (singleValueBuilder_ == null) { singleValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.shopping.merchant.accounts.v1beta.Value, com.google.shopping.merchant.accounts.v1beta.Value.Builder, com.google.shopping.merchant.accounts.v1beta.ValueOrBuilder>( getSingleValue(), getParentForChildren(), isClean()); singleValue_ = null; } return singleValueBuilder_; } private com.google.shopping.merchant.accounts.v1beta.Table mainTable_; private com.google.protobuf.SingleFieldBuilderV3< com.google.shopping.merchant.accounts.v1beta.Table, com.google.shopping.merchant.accounts.v1beta.Table.Builder, com.google.shopping.merchant.accounts.v1beta.TableOrBuilder> mainTableBuilder_; /** * * *
     * A table defining the rate group, when `single_value` is not
     * expressive enough. Can only be set if `single_value` is not
     * set.
     * 
* * optional .google.shopping.merchant.accounts.v1beta.Table main_table = 3; * * @return Whether the mainTable field is set. */ public boolean hasMainTable() { return ((bitField0_ & 0x00000004) != 0); } /** * * *
     * A table defining the rate group, when `single_value` is not
     * expressive enough. Can only be set if `single_value` is not
     * set.
     * 
* * optional .google.shopping.merchant.accounts.v1beta.Table main_table = 3; * * @return The mainTable. */ public com.google.shopping.merchant.accounts.v1beta.Table getMainTable() { if (mainTableBuilder_ == null) { return mainTable_ == null ? com.google.shopping.merchant.accounts.v1beta.Table.getDefaultInstance() : mainTable_; } else { return mainTableBuilder_.getMessage(); } } /** * * *
     * A table defining the rate group, when `single_value` is not
     * expressive enough. Can only be set if `single_value` is not
     * set.
     * 
* * optional .google.shopping.merchant.accounts.v1beta.Table main_table = 3; */ public Builder setMainTable(com.google.shopping.merchant.accounts.v1beta.Table value) { if (mainTableBuilder_ == null) { if (value == null) { throw new NullPointerException(); } mainTable_ = value; } else { mainTableBuilder_.setMessage(value); } bitField0_ |= 0x00000004; onChanged(); return this; } /** * * *
     * A table defining the rate group, when `single_value` is not
     * expressive enough. Can only be set if `single_value` is not
     * set.
     * 
* * optional .google.shopping.merchant.accounts.v1beta.Table main_table = 3; */ public Builder setMainTable( com.google.shopping.merchant.accounts.v1beta.Table.Builder builderForValue) { if (mainTableBuilder_ == null) { mainTable_ = builderForValue.build(); } else { mainTableBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000004; onChanged(); return this; } /** * * *
     * A table defining the rate group, when `single_value` is not
     * expressive enough. Can only be set if `single_value` is not
     * set.
     * 
* * optional .google.shopping.merchant.accounts.v1beta.Table main_table = 3; */ public Builder mergeMainTable(com.google.shopping.merchant.accounts.v1beta.Table value) { if (mainTableBuilder_ == null) { if (((bitField0_ & 0x00000004) != 0) && mainTable_ != null && mainTable_ != com.google.shopping.merchant.accounts.v1beta.Table.getDefaultInstance()) { getMainTableBuilder().mergeFrom(value); } else { mainTable_ = value; } } else { mainTableBuilder_.mergeFrom(value); } if (mainTable_ != null) { bitField0_ |= 0x00000004; onChanged(); } return this; } /** * * *
     * A table defining the rate group, when `single_value` is not
     * expressive enough. Can only be set if `single_value` is not
     * set.
     * 
* * optional .google.shopping.merchant.accounts.v1beta.Table main_table = 3; */ public Builder clearMainTable() { bitField0_ = (bitField0_ & ~0x00000004); mainTable_ = null; if (mainTableBuilder_ != null) { mainTableBuilder_.dispose(); mainTableBuilder_ = null; } onChanged(); return this; } /** * * *
     * A table defining the rate group, when `single_value` is not
     * expressive enough. Can only be set if `single_value` is not
     * set.
     * 
* * optional .google.shopping.merchant.accounts.v1beta.Table main_table = 3; */ public com.google.shopping.merchant.accounts.v1beta.Table.Builder getMainTableBuilder() { bitField0_ |= 0x00000004; onChanged(); return getMainTableFieldBuilder().getBuilder(); } /** * * *
     * A table defining the rate group, when `single_value` is not
     * expressive enough. Can only be set if `single_value` is not
     * set.
     * 
* * optional .google.shopping.merchant.accounts.v1beta.Table main_table = 3; */ public com.google.shopping.merchant.accounts.v1beta.TableOrBuilder getMainTableOrBuilder() { if (mainTableBuilder_ != null) { return mainTableBuilder_.getMessageOrBuilder(); } else { return mainTable_ == null ? com.google.shopping.merchant.accounts.v1beta.Table.getDefaultInstance() : mainTable_; } } /** * * *
     * A table defining the rate group, when `single_value` is not
     * expressive enough. Can only be set if `single_value` is not
     * set.
     * 
* * optional .google.shopping.merchant.accounts.v1beta.Table main_table = 3; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.shopping.merchant.accounts.v1beta.Table, com.google.shopping.merchant.accounts.v1beta.Table.Builder, com.google.shopping.merchant.accounts.v1beta.TableOrBuilder> getMainTableFieldBuilder() { if (mainTableBuilder_ == null) { mainTableBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.shopping.merchant.accounts.v1beta.Table, com.google.shopping.merchant.accounts.v1beta.Table.Builder, com.google.shopping.merchant.accounts.v1beta.TableOrBuilder>( getMainTable(), getParentForChildren(), isClean()); mainTable_ = null; } return mainTableBuilder_; } private java.util.List subtables_ = java.util.Collections.emptyList(); private void ensureSubtablesIsMutable() { if (!((bitField0_ & 0x00000008) != 0)) { subtables_ = new java.util.ArrayList(subtables_); bitField0_ |= 0x00000008; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.shopping.merchant.accounts.v1beta.Table, com.google.shopping.merchant.accounts.v1beta.Table.Builder, com.google.shopping.merchant.accounts.v1beta.TableOrBuilder> subtablesBuilder_; /** * * *
     * Optional. A list of subtables referred to by `main_table`. Can only
     * be set if `main_table` is set.
     * 
* * * repeated .google.shopping.merchant.accounts.v1beta.Table subtables = 4 [(.google.api.field_behavior) = OPTIONAL]; * */ public java.util.List getSubtablesList() { if (subtablesBuilder_ == null) { return java.util.Collections.unmodifiableList(subtables_); } else { return subtablesBuilder_.getMessageList(); } } /** * * *
     * Optional. A list of subtables referred to by `main_table`. Can only
     * be set if `main_table` is set.
     * 
* * * repeated .google.shopping.merchant.accounts.v1beta.Table subtables = 4 [(.google.api.field_behavior) = OPTIONAL]; * */ public int getSubtablesCount() { if (subtablesBuilder_ == null) { return subtables_.size(); } else { return subtablesBuilder_.getCount(); } } /** * * *
     * Optional. A list of subtables referred to by `main_table`. Can only
     * be set if `main_table` is set.
     * 
* * * repeated .google.shopping.merchant.accounts.v1beta.Table subtables = 4 [(.google.api.field_behavior) = OPTIONAL]; * */ public com.google.shopping.merchant.accounts.v1beta.Table getSubtables(int index) { if (subtablesBuilder_ == null) { return subtables_.get(index); } else { return subtablesBuilder_.getMessage(index); } } /** * * *
     * Optional. A list of subtables referred to by `main_table`. Can only
     * be set if `main_table` is set.
     * 
* * * repeated .google.shopping.merchant.accounts.v1beta.Table subtables = 4 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder setSubtables( int index, com.google.shopping.merchant.accounts.v1beta.Table value) { if (subtablesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureSubtablesIsMutable(); subtables_.set(index, value); onChanged(); } else { subtablesBuilder_.setMessage(index, value); } return this; } /** * * *
     * Optional. A list of subtables referred to by `main_table`. Can only
     * be set if `main_table` is set.
     * 
* * * repeated .google.shopping.merchant.accounts.v1beta.Table subtables = 4 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder setSubtables( int index, com.google.shopping.merchant.accounts.v1beta.Table.Builder builderForValue) { if (subtablesBuilder_ == null) { ensureSubtablesIsMutable(); subtables_.set(index, builderForValue.build()); onChanged(); } else { subtablesBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * * *
     * Optional. A list of subtables referred to by `main_table`. Can only
     * be set if `main_table` is set.
     * 
* * * repeated .google.shopping.merchant.accounts.v1beta.Table subtables = 4 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder addSubtables(com.google.shopping.merchant.accounts.v1beta.Table value) { if (subtablesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureSubtablesIsMutable(); subtables_.add(value); onChanged(); } else { subtablesBuilder_.addMessage(value); } return this; } /** * * *
     * Optional. A list of subtables referred to by `main_table`. Can only
     * be set if `main_table` is set.
     * 
* * * repeated .google.shopping.merchant.accounts.v1beta.Table subtables = 4 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder addSubtables( int index, com.google.shopping.merchant.accounts.v1beta.Table value) { if (subtablesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureSubtablesIsMutable(); subtables_.add(index, value); onChanged(); } else { subtablesBuilder_.addMessage(index, value); } return this; } /** * * *
     * Optional. A list of subtables referred to by `main_table`. Can only
     * be set if `main_table` is set.
     * 
* * * repeated .google.shopping.merchant.accounts.v1beta.Table subtables = 4 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder addSubtables( com.google.shopping.merchant.accounts.v1beta.Table.Builder builderForValue) { if (subtablesBuilder_ == null) { ensureSubtablesIsMutable(); subtables_.add(builderForValue.build()); onChanged(); } else { subtablesBuilder_.addMessage(builderForValue.build()); } return this; } /** * * *
     * Optional. A list of subtables referred to by `main_table`. Can only
     * be set if `main_table` is set.
     * 
* * * repeated .google.shopping.merchant.accounts.v1beta.Table subtables = 4 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder addSubtables( int index, com.google.shopping.merchant.accounts.v1beta.Table.Builder builderForValue) { if (subtablesBuilder_ == null) { ensureSubtablesIsMutable(); subtables_.add(index, builderForValue.build()); onChanged(); } else { subtablesBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * * *
     * Optional. A list of subtables referred to by `main_table`. Can only
     * be set if `main_table` is set.
     * 
* * * repeated .google.shopping.merchant.accounts.v1beta.Table subtables = 4 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder addAllSubtables( java.lang.Iterable values) { if (subtablesBuilder_ == null) { ensureSubtablesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, subtables_); onChanged(); } else { subtablesBuilder_.addAllMessages(values); } return this; } /** * * *
     * Optional. A list of subtables referred to by `main_table`. Can only
     * be set if `main_table` is set.
     * 
* * * repeated .google.shopping.merchant.accounts.v1beta.Table subtables = 4 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder clearSubtables() { if (subtablesBuilder_ == null) { subtables_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000008); onChanged(); } else { subtablesBuilder_.clear(); } return this; } /** * * *
     * Optional. A list of subtables referred to by `main_table`. Can only
     * be set if `main_table` is set.
     * 
* * * repeated .google.shopping.merchant.accounts.v1beta.Table subtables = 4 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder removeSubtables(int index) { if (subtablesBuilder_ == null) { ensureSubtablesIsMutable(); subtables_.remove(index); onChanged(); } else { subtablesBuilder_.remove(index); } return this; } /** * * *
     * Optional. A list of subtables referred to by `main_table`. Can only
     * be set if `main_table` is set.
     * 
* * * repeated .google.shopping.merchant.accounts.v1beta.Table subtables = 4 [(.google.api.field_behavior) = OPTIONAL]; * */ public com.google.shopping.merchant.accounts.v1beta.Table.Builder getSubtablesBuilder( int index) { return getSubtablesFieldBuilder().getBuilder(index); } /** * * *
     * Optional. A list of subtables referred to by `main_table`. Can only
     * be set if `main_table` is set.
     * 
* * * repeated .google.shopping.merchant.accounts.v1beta.Table subtables = 4 [(.google.api.field_behavior) = OPTIONAL]; * */ public com.google.shopping.merchant.accounts.v1beta.TableOrBuilder getSubtablesOrBuilder( int index) { if (subtablesBuilder_ == null) { return subtables_.get(index); } else { return subtablesBuilder_.getMessageOrBuilder(index); } } /** * * *
     * Optional. A list of subtables referred to by `main_table`. Can only
     * be set if `main_table` is set.
     * 
* * * repeated .google.shopping.merchant.accounts.v1beta.Table subtables = 4 [(.google.api.field_behavior) = OPTIONAL]; * */ public java.util.List getSubtablesOrBuilderList() { if (subtablesBuilder_ != null) { return subtablesBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(subtables_); } } /** * * *
     * Optional. A list of subtables referred to by `main_table`. Can only
     * be set if `main_table` is set.
     * 
* * * repeated .google.shopping.merchant.accounts.v1beta.Table subtables = 4 [(.google.api.field_behavior) = OPTIONAL]; * */ public com.google.shopping.merchant.accounts.v1beta.Table.Builder addSubtablesBuilder() { return getSubtablesFieldBuilder() .addBuilder(com.google.shopping.merchant.accounts.v1beta.Table.getDefaultInstance()); } /** * * *
     * Optional. A list of subtables referred to by `main_table`. Can only
     * be set if `main_table` is set.
     * 
* * * repeated .google.shopping.merchant.accounts.v1beta.Table subtables = 4 [(.google.api.field_behavior) = OPTIONAL]; * */ public com.google.shopping.merchant.accounts.v1beta.Table.Builder addSubtablesBuilder( int index) { return getSubtablesFieldBuilder() .addBuilder( index, com.google.shopping.merchant.accounts.v1beta.Table.getDefaultInstance()); } /** * * *
     * Optional. A list of subtables referred to by `main_table`. Can only
     * be set if `main_table` is set.
     * 
* * * repeated .google.shopping.merchant.accounts.v1beta.Table subtables = 4 [(.google.api.field_behavior) = OPTIONAL]; * */ public java.util.List getSubtablesBuilderList() { return getSubtablesFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.shopping.merchant.accounts.v1beta.Table, com.google.shopping.merchant.accounts.v1beta.Table.Builder, com.google.shopping.merchant.accounts.v1beta.TableOrBuilder> getSubtablesFieldBuilder() { if (subtablesBuilder_ == null) { subtablesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.google.shopping.merchant.accounts.v1beta.Table, com.google.shopping.merchant.accounts.v1beta.Table.Builder, com.google.shopping.merchant.accounts.v1beta.TableOrBuilder>( subtables_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); subtables_ = null; } return subtablesBuilder_; } private java.util.List carrierRates_ = java.util.Collections.emptyList(); private void ensureCarrierRatesIsMutable() { if (!((bitField0_ & 0x00000010) != 0)) { carrierRates_ = new java.util.ArrayList( carrierRates_); bitField0_ |= 0x00000010; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.shopping.merchant.accounts.v1beta.CarrierRate, com.google.shopping.merchant.accounts.v1beta.CarrierRate.Builder, com.google.shopping.merchant.accounts.v1beta.CarrierRateOrBuilder> carrierRatesBuilder_; /** * * *
     * Optional. A list of carrier rates that can be referred to by
     * `main_table` or `single_value`.
     * 
* * * repeated .google.shopping.merchant.accounts.v1beta.CarrierRate carrier_rates = 5 [(.google.api.field_behavior) = OPTIONAL]; * */ public java.util.List getCarrierRatesList() { if (carrierRatesBuilder_ == null) { return java.util.Collections.unmodifiableList(carrierRates_); } else { return carrierRatesBuilder_.getMessageList(); } } /** * * *
     * Optional. A list of carrier rates that can be referred to by
     * `main_table` or `single_value`.
     * 
* * * repeated .google.shopping.merchant.accounts.v1beta.CarrierRate carrier_rates = 5 [(.google.api.field_behavior) = OPTIONAL]; * */ public int getCarrierRatesCount() { if (carrierRatesBuilder_ == null) { return carrierRates_.size(); } else { return carrierRatesBuilder_.getCount(); } } /** * * *
     * Optional. A list of carrier rates that can be referred to by
     * `main_table` or `single_value`.
     * 
* * * repeated .google.shopping.merchant.accounts.v1beta.CarrierRate carrier_rates = 5 [(.google.api.field_behavior) = OPTIONAL]; * */ public com.google.shopping.merchant.accounts.v1beta.CarrierRate getCarrierRates(int index) { if (carrierRatesBuilder_ == null) { return carrierRates_.get(index); } else { return carrierRatesBuilder_.getMessage(index); } } /** * * *
     * Optional. A list of carrier rates that can be referred to by
     * `main_table` or `single_value`.
     * 
* * * repeated .google.shopping.merchant.accounts.v1beta.CarrierRate carrier_rates = 5 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder setCarrierRates( int index, com.google.shopping.merchant.accounts.v1beta.CarrierRate value) { if (carrierRatesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureCarrierRatesIsMutable(); carrierRates_.set(index, value); onChanged(); } else { carrierRatesBuilder_.setMessage(index, value); } return this; } /** * * *
     * Optional. A list of carrier rates that can be referred to by
     * `main_table` or `single_value`.
     * 
* * * repeated .google.shopping.merchant.accounts.v1beta.CarrierRate carrier_rates = 5 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder setCarrierRates( int index, com.google.shopping.merchant.accounts.v1beta.CarrierRate.Builder builderForValue) { if (carrierRatesBuilder_ == null) { ensureCarrierRatesIsMutable(); carrierRates_.set(index, builderForValue.build()); onChanged(); } else { carrierRatesBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * * *
     * Optional. A list of carrier rates that can be referred to by
     * `main_table` or `single_value`.
     * 
* * * repeated .google.shopping.merchant.accounts.v1beta.CarrierRate carrier_rates = 5 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder addCarrierRates(com.google.shopping.merchant.accounts.v1beta.CarrierRate value) { if (carrierRatesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureCarrierRatesIsMutable(); carrierRates_.add(value); onChanged(); } else { carrierRatesBuilder_.addMessage(value); } return this; } /** * * *
     * Optional. A list of carrier rates that can be referred to by
     * `main_table` or `single_value`.
     * 
* * * repeated .google.shopping.merchant.accounts.v1beta.CarrierRate carrier_rates = 5 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder addCarrierRates( int index, com.google.shopping.merchant.accounts.v1beta.CarrierRate value) { if (carrierRatesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureCarrierRatesIsMutable(); carrierRates_.add(index, value); onChanged(); } else { carrierRatesBuilder_.addMessage(index, value); } return this; } /** * * *
     * Optional. A list of carrier rates that can be referred to by
     * `main_table` or `single_value`.
     * 
* * * repeated .google.shopping.merchant.accounts.v1beta.CarrierRate carrier_rates = 5 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder addCarrierRates( com.google.shopping.merchant.accounts.v1beta.CarrierRate.Builder builderForValue) { if (carrierRatesBuilder_ == null) { ensureCarrierRatesIsMutable(); carrierRates_.add(builderForValue.build()); onChanged(); } else { carrierRatesBuilder_.addMessage(builderForValue.build()); } return this; } /** * * *
     * Optional. A list of carrier rates that can be referred to by
     * `main_table` or `single_value`.
     * 
* * * repeated .google.shopping.merchant.accounts.v1beta.CarrierRate carrier_rates = 5 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder addCarrierRates( int index, com.google.shopping.merchant.accounts.v1beta.CarrierRate.Builder builderForValue) { if (carrierRatesBuilder_ == null) { ensureCarrierRatesIsMutable(); carrierRates_.add(index, builderForValue.build()); onChanged(); } else { carrierRatesBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * * *
     * Optional. A list of carrier rates that can be referred to by
     * `main_table` or `single_value`.
     * 
* * * repeated .google.shopping.merchant.accounts.v1beta.CarrierRate carrier_rates = 5 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder addAllCarrierRates( java.lang.Iterable values) { if (carrierRatesBuilder_ == null) { ensureCarrierRatesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, carrierRates_); onChanged(); } else { carrierRatesBuilder_.addAllMessages(values); } return this; } /** * * *
     * Optional. A list of carrier rates that can be referred to by
     * `main_table` or `single_value`.
     * 
* * * repeated .google.shopping.merchant.accounts.v1beta.CarrierRate carrier_rates = 5 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder clearCarrierRates() { if (carrierRatesBuilder_ == null) { carrierRates_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000010); onChanged(); } else { carrierRatesBuilder_.clear(); } return this; } /** * * *
     * Optional. A list of carrier rates that can be referred to by
     * `main_table` or `single_value`.
     * 
* * * repeated .google.shopping.merchant.accounts.v1beta.CarrierRate carrier_rates = 5 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder removeCarrierRates(int index) { if (carrierRatesBuilder_ == null) { ensureCarrierRatesIsMutable(); carrierRates_.remove(index); onChanged(); } else { carrierRatesBuilder_.remove(index); } return this; } /** * * *
     * Optional. A list of carrier rates that can be referred to by
     * `main_table` or `single_value`.
     * 
* * * repeated .google.shopping.merchant.accounts.v1beta.CarrierRate carrier_rates = 5 [(.google.api.field_behavior) = OPTIONAL]; * */ public com.google.shopping.merchant.accounts.v1beta.CarrierRate.Builder getCarrierRatesBuilder( int index) { return getCarrierRatesFieldBuilder().getBuilder(index); } /** * * *
     * Optional. A list of carrier rates that can be referred to by
     * `main_table` or `single_value`.
     * 
* * * repeated .google.shopping.merchant.accounts.v1beta.CarrierRate carrier_rates = 5 [(.google.api.field_behavior) = OPTIONAL]; * */ public com.google.shopping.merchant.accounts.v1beta.CarrierRateOrBuilder getCarrierRatesOrBuilder(int index) { if (carrierRatesBuilder_ == null) { return carrierRates_.get(index); } else { return carrierRatesBuilder_.getMessageOrBuilder(index); } } /** * * *
     * Optional. A list of carrier rates that can be referred to by
     * `main_table` or `single_value`.
     * 
* * * repeated .google.shopping.merchant.accounts.v1beta.CarrierRate carrier_rates = 5 [(.google.api.field_behavior) = OPTIONAL]; * */ public java.util.List< ? extends com.google.shopping.merchant.accounts.v1beta.CarrierRateOrBuilder> getCarrierRatesOrBuilderList() { if (carrierRatesBuilder_ != null) { return carrierRatesBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(carrierRates_); } } /** * * *
     * Optional. A list of carrier rates that can be referred to by
     * `main_table` or `single_value`.
     * 
* * * repeated .google.shopping.merchant.accounts.v1beta.CarrierRate carrier_rates = 5 [(.google.api.field_behavior) = OPTIONAL]; * */ public com.google.shopping.merchant.accounts.v1beta.CarrierRate.Builder addCarrierRatesBuilder() { return getCarrierRatesFieldBuilder() .addBuilder( com.google.shopping.merchant.accounts.v1beta.CarrierRate.getDefaultInstance()); } /** * * *
     * Optional. A list of carrier rates that can be referred to by
     * `main_table` or `single_value`.
     * 
* * * repeated .google.shopping.merchant.accounts.v1beta.CarrierRate carrier_rates = 5 [(.google.api.field_behavior) = OPTIONAL]; * */ public com.google.shopping.merchant.accounts.v1beta.CarrierRate.Builder addCarrierRatesBuilder( int index) { return getCarrierRatesFieldBuilder() .addBuilder( index, com.google.shopping.merchant.accounts.v1beta.CarrierRate.getDefaultInstance()); } /** * * *
     * Optional. A list of carrier rates that can be referred to by
     * `main_table` or `single_value`.
     * 
* * * repeated .google.shopping.merchant.accounts.v1beta.CarrierRate carrier_rates = 5 [(.google.api.field_behavior) = OPTIONAL]; * */ public java.util.List getCarrierRatesBuilderList() { return getCarrierRatesFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.shopping.merchant.accounts.v1beta.CarrierRate, com.google.shopping.merchant.accounts.v1beta.CarrierRate.Builder, com.google.shopping.merchant.accounts.v1beta.CarrierRateOrBuilder> getCarrierRatesFieldBuilder() { if (carrierRatesBuilder_ == null) { carrierRatesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.google.shopping.merchant.accounts.v1beta.CarrierRate, com.google.shopping.merchant.accounts.v1beta.CarrierRate.Builder, com.google.shopping.merchant.accounts.v1beta.CarrierRateOrBuilder>( carrierRates_, ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean()); carrierRates_ = null; } return carrierRatesBuilder_; } private java.lang.Object name_ = ""; /** * * *
     * Optional. Name of the rate group.
     * If set has to be unique within shipping service.
     * 
* * optional string name = 6 [(.google.api.field_behavior) = OPTIONAL]; * * @return Whether the name field is set. */ public boolean hasName() { return ((bitField0_ & 0x00000020) != 0); } /** * * *
     * Optional. Name of the rate group.
     * If set has to be unique within shipping service.
     * 
* * optional string name = 6 [(.google.api.field_behavior) = OPTIONAL]; * * @return The name. */ public java.lang.String getName() { java.lang.Object ref = name_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * Optional. Name of the rate group.
     * If set has to be unique within shipping service.
     * 
* * optional string name = 6 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for name. */ public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * Optional. Name of the rate group.
     * If set has to be unique within shipping service.
     * 
* * optional string name = 6 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The name to set. * @return This builder for chaining. */ public Builder setName(java.lang.String value) { if (value == null) { throw new NullPointerException(); } name_ = value; bitField0_ |= 0x00000020; onChanged(); return this; } /** * * *
     * Optional. Name of the rate group.
     * If set has to be unique within shipping service.
     * 
* * optional string name = 6 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ public Builder clearName() { name_ = getDefaultInstance().getName(); bitField0_ = (bitField0_ & ~0x00000020); onChanged(); return this; } /** * * *
     * Optional. Name of the rate group.
     * If set has to be unique within shipping service.
     * 
* * optional string name = 6 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for name to set. * @return This builder for chaining. */ public Builder setNameBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); name_ = value; bitField0_ |= 0x00000020; onChanged(); return this; } @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:google.shopping.merchant.accounts.v1beta.RateGroup) } // @@protoc_insertion_point(class_scope:google.shopping.merchant.accounts.v1beta.RateGroup) private static final com.google.shopping.merchant.accounts.v1beta.RateGroup DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.shopping.merchant.accounts.v1beta.RateGroup(); } public static com.google.shopping.merchant.accounts.v1beta.RateGroup getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public RateGroup 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.RateGroup getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy