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

com.google.shopping.merchant.accounts.v1beta.CarrierRate 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 list of carrier rates that can be referred to by
 * `main_table` or `single_value`.
 * 
* * Protobuf type {@code google.shopping.merchant.accounts.v1beta.CarrierRate} */ public final class CarrierRate extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.shopping.merchant.accounts.v1beta.CarrierRate) CarrierRateOrBuilder { private static final long serialVersionUID = 0L; // Use CarrierRate.newBuilder() to construct. private CarrierRate(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private CarrierRate() { name_ = ""; carrier_ = ""; carrierService_ = ""; originPostalCode_ = ""; percentageAdjustment_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new CarrierRate(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.shopping.merchant.accounts.v1beta.ShippingSettingsProto .internal_static_google_shopping_merchant_accounts_v1beta_CarrierRate_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_CarrierRate_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.shopping.merchant.accounts.v1beta.CarrierRate.class, com.google.shopping.merchant.accounts.v1beta.CarrierRate.Builder.class); } private int bitField0_; public static final int NAME_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; /** * * *
   * Required. Name of the carrier rate. Must be unique per rate group.
   * 
* * optional string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return Whether the name field is set. */ @java.lang.Override public boolean hasName() { return ((bitField0_ & 0x00000001) != 0); } /** * * *
   * Required. Name of the carrier rate. Must be unique per rate group.
   * 
* * optional string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @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; } } /** * * *
   * Required. Name of the carrier rate. Must be unique per rate group.
   * 
* * optional string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for name. */ @java.lang.Override public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int CARRIER_FIELD_NUMBER = 2; @SuppressWarnings("serial") private volatile java.lang.Object carrier_ = ""; /** * * *
   * Required. Carrier service, such as `"UPS"` or `"Fedex"`.
   * 
* * optional string carrier = 2 [(.google.api.field_behavior) = REQUIRED]; * * @return Whether the carrier field is set. */ @java.lang.Override public boolean hasCarrier() { return ((bitField0_ & 0x00000002) != 0); } /** * * *
   * Required. Carrier service, such as `"UPS"` or `"Fedex"`.
   * 
* * optional string carrier = 2 [(.google.api.field_behavior) = REQUIRED]; * * @return The carrier. */ @java.lang.Override public java.lang.String getCarrier() { java.lang.Object ref = carrier_; 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(); carrier_ = s; return s; } } /** * * *
   * Required. Carrier service, such as `"UPS"` or `"Fedex"`.
   * 
* * optional string carrier = 2 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for carrier. */ @java.lang.Override public com.google.protobuf.ByteString getCarrierBytes() { java.lang.Object ref = carrier_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); carrier_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int CARRIER_SERVICE_FIELD_NUMBER = 3; @SuppressWarnings("serial") private volatile java.lang.Object carrierService_ = ""; /** * * *
   * Required. Carrier service, such as `"ground"` or `"2 days"`.
   * 
* * optional string carrier_service = 3 [(.google.api.field_behavior) = REQUIRED]; * * @return Whether the carrierService field is set. */ @java.lang.Override public boolean hasCarrierService() { return ((bitField0_ & 0x00000004) != 0); } /** * * *
   * Required. Carrier service, such as `"ground"` or `"2 days"`.
   * 
* * optional string carrier_service = 3 [(.google.api.field_behavior) = REQUIRED]; * * @return The carrierService. */ @java.lang.Override public java.lang.String getCarrierService() { java.lang.Object ref = carrierService_; 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(); carrierService_ = s; return s; } } /** * * *
   * Required. Carrier service, such as `"ground"` or `"2 days"`.
   * 
* * optional string carrier_service = 3 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for carrierService. */ @java.lang.Override public com.google.protobuf.ByteString getCarrierServiceBytes() { java.lang.Object ref = carrierService_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); carrierService_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int ORIGIN_POSTAL_CODE_FIELD_NUMBER = 4; @SuppressWarnings("serial") private volatile java.lang.Object originPostalCode_ = ""; /** * * *
   * Required. Shipping origin for this carrier rate.
   * 
* * optional string origin_postal_code = 4 [(.google.api.field_behavior) = REQUIRED]; * * @return Whether the originPostalCode field is set. */ @java.lang.Override public boolean hasOriginPostalCode() { return ((bitField0_ & 0x00000008) != 0); } /** * * *
   * Required. Shipping origin for this carrier rate.
   * 
* * optional string origin_postal_code = 4 [(.google.api.field_behavior) = REQUIRED]; * * @return The originPostalCode. */ @java.lang.Override public java.lang.String getOriginPostalCode() { java.lang.Object ref = originPostalCode_; 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(); originPostalCode_ = s; return s; } } /** * * *
   * Required. Shipping origin for this carrier rate.
   * 
* * optional string origin_postal_code = 4 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for originPostalCode. */ @java.lang.Override public com.google.protobuf.ByteString getOriginPostalCodeBytes() { java.lang.Object ref = originPostalCode_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); originPostalCode_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int PERCENTAGE_ADJUSTMENT_FIELD_NUMBER = 5; @SuppressWarnings("serial") private volatile java.lang.Object percentageAdjustment_ = ""; /** * * *
   * Optional. Multiplicative shipping rate modifier as a number in decimal
   * notation. Can be negative. For example `"5.4"` increases the rate by 5.4%,
   * `"-3"` decreases the rate by 3%.
   * 
* * optional string percentage_adjustment = 5 [(.google.api.field_behavior) = OPTIONAL]; * * * @return Whether the percentageAdjustment field is set. */ @java.lang.Override public boolean hasPercentageAdjustment() { return ((bitField0_ & 0x00000010) != 0); } /** * * *
   * Optional. Multiplicative shipping rate modifier as a number in decimal
   * notation. Can be negative. For example `"5.4"` increases the rate by 5.4%,
   * `"-3"` decreases the rate by 3%.
   * 
* * optional string percentage_adjustment = 5 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The percentageAdjustment. */ @java.lang.Override public java.lang.String getPercentageAdjustment() { java.lang.Object ref = percentageAdjustment_; 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(); percentageAdjustment_ = s; return s; } } /** * * *
   * Optional. Multiplicative shipping rate modifier as a number in decimal
   * notation. Can be negative. For example `"5.4"` increases the rate by 5.4%,
   * `"-3"` decreases the rate by 3%.
   * 
* * optional string percentage_adjustment = 5 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The bytes for percentageAdjustment. */ @java.lang.Override public com.google.protobuf.ByteString getPercentageAdjustmentBytes() { java.lang.Object ref = percentageAdjustment_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); percentageAdjustment_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int FLAT_ADJUSTMENT_FIELD_NUMBER = 6; private com.google.shopping.type.Price flatAdjustment_; /** * * *
   * Optional. Additive shipping rate modifier. Can be negative. For example
   * `{ "amount_micros": 1, "currency_code" : "USD" }` adds $1 to the rate,
   * `{ "amount_micros": -3, "currency_code" : "USD" }` removes $3 from the
   * rate.
   * 
* * * optional .google.shopping.type.Price flat_adjustment = 6 [(.google.api.field_behavior) = OPTIONAL]; * * * @return Whether the flatAdjustment field is set. */ @java.lang.Override public boolean hasFlatAdjustment() { return ((bitField0_ & 0x00000020) != 0); } /** * * *
   * Optional. Additive shipping rate modifier. Can be negative. For example
   * `{ "amount_micros": 1, "currency_code" : "USD" }` adds $1 to the rate,
   * `{ "amount_micros": -3, "currency_code" : "USD" }` removes $3 from the
   * rate.
   * 
* * * optional .google.shopping.type.Price flat_adjustment = 6 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The flatAdjustment. */ @java.lang.Override public com.google.shopping.type.Price getFlatAdjustment() { return flatAdjustment_ == null ? com.google.shopping.type.Price.getDefaultInstance() : flatAdjustment_; } /** * * *
   * Optional. Additive shipping rate modifier. Can be negative. For example
   * `{ "amount_micros": 1, "currency_code" : "USD" }` adds $1 to the rate,
   * `{ "amount_micros": -3, "currency_code" : "USD" }` removes $3 from the
   * rate.
   * 
* * * optional .google.shopping.type.Price flat_adjustment = 6 [(.google.api.field_behavior) = OPTIONAL]; * */ @java.lang.Override public com.google.shopping.type.PriceOrBuilder getFlatAdjustmentOrBuilder() { return flatAdjustment_ == null ? com.google.shopping.type.Price.getDefaultInstance() : flatAdjustment_; } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } if (((bitField0_ & 0x00000002) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, carrier_); } if (((bitField0_ & 0x00000004) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, carrierService_); } if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, originPostalCode_); } if (((bitField0_ & 0x00000010) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, percentageAdjustment_); } if (((bitField0_ & 0x00000020) != 0)) { output.writeMessage(6, getFlatAdjustment()); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, carrier_); } if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, carrierService_); } if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, originPostalCode_); } if (((bitField0_ & 0x00000010) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, percentageAdjustment_); } if (((bitField0_ & 0x00000020) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getFlatAdjustment()); } 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.CarrierRate)) { return super.equals(obj); } com.google.shopping.merchant.accounts.v1beta.CarrierRate other = (com.google.shopping.merchant.accounts.v1beta.CarrierRate) obj; if (hasName() != other.hasName()) return false; if (hasName()) { if (!getName().equals(other.getName())) return false; } if (hasCarrier() != other.hasCarrier()) return false; if (hasCarrier()) { if (!getCarrier().equals(other.getCarrier())) return false; } if (hasCarrierService() != other.hasCarrierService()) return false; if (hasCarrierService()) { if (!getCarrierService().equals(other.getCarrierService())) return false; } if (hasOriginPostalCode() != other.hasOriginPostalCode()) return false; if (hasOriginPostalCode()) { if (!getOriginPostalCode().equals(other.getOriginPostalCode())) return false; } if (hasPercentageAdjustment() != other.hasPercentageAdjustment()) return false; if (hasPercentageAdjustment()) { if (!getPercentageAdjustment().equals(other.getPercentageAdjustment())) return false; } if (hasFlatAdjustment() != other.hasFlatAdjustment()) return false; if (hasFlatAdjustment()) { if (!getFlatAdjustment().equals(other.getFlatAdjustment())) 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 (hasName()) { hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); } if (hasCarrier()) { hash = (37 * hash) + CARRIER_FIELD_NUMBER; hash = (53 * hash) + getCarrier().hashCode(); } if (hasCarrierService()) { hash = (37 * hash) + CARRIER_SERVICE_FIELD_NUMBER; hash = (53 * hash) + getCarrierService().hashCode(); } if (hasOriginPostalCode()) { hash = (37 * hash) + ORIGIN_POSTAL_CODE_FIELD_NUMBER; hash = (53 * hash) + getOriginPostalCode().hashCode(); } if (hasPercentageAdjustment()) { hash = (37 * hash) + PERCENTAGE_ADJUSTMENT_FIELD_NUMBER; hash = (53 * hash) + getPercentageAdjustment().hashCode(); } if (hasFlatAdjustment()) { hash = (37 * hash) + FLAT_ADJUSTMENT_FIELD_NUMBER; hash = (53 * hash) + getFlatAdjustment().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.shopping.merchant.accounts.v1beta.CarrierRate parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.shopping.merchant.accounts.v1beta.CarrierRate 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.CarrierRate parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.shopping.merchant.accounts.v1beta.CarrierRate 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.CarrierRate parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.shopping.merchant.accounts.v1beta.CarrierRate 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.CarrierRate 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.CarrierRate 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.CarrierRate 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.CarrierRate 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.CarrierRate 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.CarrierRate 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.CarrierRate 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 list of carrier rates that can be referred to by
   * `main_table` or `single_value`.
   * 
* * Protobuf type {@code google.shopping.merchant.accounts.v1beta.CarrierRate} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.shopping.merchant.accounts.v1beta.CarrierRate) com.google.shopping.merchant.accounts.v1beta.CarrierRateOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.shopping.merchant.accounts.v1beta.ShippingSettingsProto .internal_static_google_shopping_merchant_accounts_v1beta_CarrierRate_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_CarrierRate_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.shopping.merchant.accounts.v1beta.CarrierRate.class, com.google.shopping.merchant.accounts.v1beta.CarrierRate.Builder.class); } // Construct using com.google.shopping.merchant.accounts.v1beta.CarrierRate.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { getFlatAdjustmentFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; name_ = ""; carrier_ = ""; carrierService_ = ""; originPostalCode_ = ""; percentageAdjustment_ = ""; flatAdjustment_ = null; if (flatAdjustmentBuilder_ != null) { flatAdjustmentBuilder_.dispose(); flatAdjustmentBuilder_ = null; } 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_CarrierRate_descriptor; } @java.lang.Override public com.google.shopping.merchant.accounts.v1beta.CarrierRate getDefaultInstanceForType() { return com.google.shopping.merchant.accounts.v1beta.CarrierRate.getDefaultInstance(); } @java.lang.Override public com.google.shopping.merchant.accounts.v1beta.CarrierRate build() { com.google.shopping.merchant.accounts.v1beta.CarrierRate result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.shopping.merchant.accounts.v1beta.CarrierRate buildPartial() { com.google.shopping.merchant.accounts.v1beta.CarrierRate result = new com.google.shopping.merchant.accounts.v1beta.CarrierRate(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(com.google.shopping.merchant.accounts.v1beta.CarrierRate result) { int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { result.name_ = name_; to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000002) != 0)) { result.carrier_ = carrier_; to_bitField0_ |= 0x00000002; } if (((from_bitField0_ & 0x00000004) != 0)) { result.carrierService_ = carrierService_; to_bitField0_ |= 0x00000004; } if (((from_bitField0_ & 0x00000008) != 0)) { result.originPostalCode_ = originPostalCode_; to_bitField0_ |= 0x00000008; } if (((from_bitField0_ & 0x00000010) != 0)) { result.percentageAdjustment_ = percentageAdjustment_; to_bitField0_ |= 0x00000010; } if (((from_bitField0_ & 0x00000020) != 0)) { result.flatAdjustment_ = flatAdjustmentBuilder_ == null ? flatAdjustment_ : flatAdjustmentBuilder_.build(); to_bitField0_ |= 0x00000020; } 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.CarrierRate) { return mergeFrom((com.google.shopping.merchant.accounts.v1beta.CarrierRate) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.shopping.merchant.accounts.v1beta.CarrierRate other) { if (other == com.google.shopping.merchant.accounts.v1beta.CarrierRate.getDefaultInstance()) return this; if (other.hasName()) { name_ = other.name_; bitField0_ |= 0x00000001; onChanged(); } if (other.hasCarrier()) { carrier_ = other.carrier_; bitField0_ |= 0x00000002; onChanged(); } if (other.hasCarrierService()) { carrierService_ = other.carrierService_; bitField0_ |= 0x00000004; onChanged(); } if (other.hasOriginPostalCode()) { originPostalCode_ = other.originPostalCode_; bitField0_ |= 0x00000008; onChanged(); } if (other.hasPercentageAdjustment()) { percentageAdjustment_ = other.percentageAdjustment_; bitField0_ |= 0x00000010; onChanged(); } if (other.hasFlatAdjustment()) { mergeFlatAdjustment(other.getFlatAdjustment()); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { name_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 10 case 18: { carrier_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000002; break; } // case 18 case 26: { carrierService_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000004; break; } // case 26 case 34: { originPostalCode_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000008; break; } // case 34 case 42: { percentageAdjustment_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000010; break; } // case 42 case 50: { input.readMessage(getFlatAdjustmentFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000020; break; } // case 50 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private java.lang.Object name_ = ""; /** * * *
     * Required. Name of the carrier rate. Must be unique per rate group.
     * 
* * optional string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return Whether the name field is set. */ public boolean hasName() { return ((bitField0_ & 0x00000001) != 0); } /** * * *
     * Required. Name of the carrier rate. Must be unique per rate group.
     * 
* * optional string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @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; } } /** * * *
     * Required. Name of the carrier rate. Must be unique per rate group.
     * 
* * optional string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @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; } } /** * * *
     * Required. Name of the carrier rate. Must be unique per rate group.
     * 
* * optional string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @param value The name to set. * @return This builder for chaining. */ public Builder setName(java.lang.String value) { if (value == null) { throw new NullPointerException(); } name_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** * * *
     * Required. Name of the carrier rate. Must be unique per rate group.
     * 
* * optional string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return This builder for chaining. */ public Builder clearName() { name_ = getDefaultInstance().getName(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** * * *
     * Required. Name of the carrier rate. Must be unique per rate group.
     * 
* * optional string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @param value The bytes for name to set. * @return This builder for chaining. */ public Builder setNameBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); name_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } private java.lang.Object carrier_ = ""; /** * * *
     * Required. Carrier service, such as `"UPS"` or `"Fedex"`.
     * 
* * optional string carrier = 2 [(.google.api.field_behavior) = REQUIRED]; * * @return Whether the carrier field is set. */ public boolean hasCarrier() { return ((bitField0_ & 0x00000002) != 0); } /** * * *
     * Required. Carrier service, such as `"UPS"` or `"Fedex"`.
     * 
* * optional string carrier = 2 [(.google.api.field_behavior) = REQUIRED]; * * @return The carrier. */ public java.lang.String getCarrier() { java.lang.Object ref = carrier_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); carrier_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * Required. Carrier service, such as `"UPS"` or `"Fedex"`.
     * 
* * optional string carrier = 2 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for carrier. */ public com.google.protobuf.ByteString getCarrierBytes() { java.lang.Object ref = carrier_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); carrier_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * Required. Carrier service, such as `"UPS"` or `"Fedex"`.
     * 
* * optional string carrier = 2 [(.google.api.field_behavior) = REQUIRED]; * * @param value The carrier to set. * @return This builder for chaining. */ public Builder setCarrier(java.lang.String value) { if (value == null) { throw new NullPointerException(); } carrier_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** * * *
     * Required. Carrier service, such as `"UPS"` or `"Fedex"`.
     * 
* * optional string carrier = 2 [(.google.api.field_behavior) = REQUIRED]; * * @return This builder for chaining. */ public Builder clearCarrier() { carrier_ = getDefaultInstance().getCarrier(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** * * *
     * Required. Carrier service, such as `"UPS"` or `"Fedex"`.
     * 
* * optional string carrier = 2 [(.google.api.field_behavior) = REQUIRED]; * * @param value The bytes for carrier to set. * @return This builder for chaining. */ public Builder setCarrierBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); carrier_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } private java.lang.Object carrierService_ = ""; /** * * *
     * Required. Carrier service, such as `"ground"` or `"2 days"`.
     * 
* * optional string carrier_service = 3 [(.google.api.field_behavior) = REQUIRED]; * * @return Whether the carrierService field is set. */ public boolean hasCarrierService() { return ((bitField0_ & 0x00000004) != 0); } /** * * *
     * Required. Carrier service, such as `"ground"` or `"2 days"`.
     * 
* * optional string carrier_service = 3 [(.google.api.field_behavior) = REQUIRED]; * * @return The carrierService. */ public java.lang.String getCarrierService() { java.lang.Object ref = carrierService_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); carrierService_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * Required. Carrier service, such as `"ground"` or `"2 days"`.
     * 
* * optional string carrier_service = 3 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for carrierService. */ public com.google.protobuf.ByteString getCarrierServiceBytes() { java.lang.Object ref = carrierService_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); carrierService_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * Required. Carrier service, such as `"ground"` or `"2 days"`.
     * 
* * optional string carrier_service = 3 [(.google.api.field_behavior) = REQUIRED]; * * @param value The carrierService to set. * @return This builder for chaining. */ public Builder setCarrierService(java.lang.String value) { if (value == null) { throw new NullPointerException(); } carrierService_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } /** * * *
     * Required. Carrier service, such as `"ground"` or `"2 days"`.
     * 
* * optional string carrier_service = 3 [(.google.api.field_behavior) = REQUIRED]; * * @return This builder for chaining. */ public Builder clearCarrierService() { carrierService_ = getDefaultInstance().getCarrierService(); bitField0_ = (bitField0_ & ~0x00000004); onChanged(); return this; } /** * * *
     * Required. Carrier service, such as `"ground"` or `"2 days"`.
     * 
* * optional string carrier_service = 3 [(.google.api.field_behavior) = REQUIRED]; * * @param value The bytes for carrierService to set. * @return This builder for chaining. */ public Builder setCarrierServiceBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); carrierService_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } private java.lang.Object originPostalCode_ = ""; /** * * *
     * Required. Shipping origin for this carrier rate.
     * 
* * optional string origin_postal_code = 4 [(.google.api.field_behavior) = REQUIRED]; * * * @return Whether the originPostalCode field is set. */ public boolean hasOriginPostalCode() { return ((bitField0_ & 0x00000008) != 0); } /** * * *
     * Required. Shipping origin for this carrier rate.
     * 
* * optional string origin_postal_code = 4 [(.google.api.field_behavior) = REQUIRED]; * * * @return The originPostalCode. */ public java.lang.String getOriginPostalCode() { java.lang.Object ref = originPostalCode_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); originPostalCode_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * Required. Shipping origin for this carrier rate.
     * 
* * optional string origin_postal_code = 4 [(.google.api.field_behavior) = REQUIRED]; * * * @return The bytes for originPostalCode. */ public com.google.protobuf.ByteString getOriginPostalCodeBytes() { java.lang.Object ref = originPostalCode_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); originPostalCode_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * Required. Shipping origin for this carrier rate.
     * 
* * optional string origin_postal_code = 4 [(.google.api.field_behavior) = REQUIRED]; * * * @param value The originPostalCode to set. * @return This builder for chaining. */ public Builder setOriginPostalCode(java.lang.String value) { if (value == null) { throw new NullPointerException(); } originPostalCode_ = value; bitField0_ |= 0x00000008; onChanged(); return this; } /** * * *
     * Required. Shipping origin for this carrier rate.
     * 
* * optional string origin_postal_code = 4 [(.google.api.field_behavior) = REQUIRED]; * * * @return This builder for chaining. */ public Builder clearOriginPostalCode() { originPostalCode_ = getDefaultInstance().getOriginPostalCode(); bitField0_ = (bitField0_ & ~0x00000008); onChanged(); return this; } /** * * *
     * Required. Shipping origin for this carrier rate.
     * 
* * optional string origin_postal_code = 4 [(.google.api.field_behavior) = REQUIRED]; * * * @param value The bytes for originPostalCode to set. * @return This builder for chaining. */ public Builder setOriginPostalCodeBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); originPostalCode_ = value; bitField0_ |= 0x00000008; onChanged(); return this; } private java.lang.Object percentageAdjustment_ = ""; /** * * *
     * Optional. Multiplicative shipping rate modifier as a number in decimal
     * notation. Can be negative. For example `"5.4"` increases the rate by 5.4%,
     * `"-3"` decreases the rate by 3%.
     * 
* * optional string percentage_adjustment = 5 [(.google.api.field_behavior) = OPTIONAL]; * * * @return Whether the percentageAdjustment field is set. */ public boolean hasPercentageAdjustment() { return ((bitField0_ & 0x00000010) != 0); } /** * * *
     * Optional. Multiplicative shipping rate modifier as a number in decimal
     * notation. Can be negative. For example `"5.4"` increases the rate by 5.4%,
     * `"-3"` decreases the rate by 3%.
     * 
* * optional string percentage_adjustment = 5 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The percentageAdjustment. */ public java.lang.String getPercentageAdjustment() { java.lang.Object ref = percentageAdjustment_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); percentageAdjustment_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * Optional. Multiplicative shipping rate modifier as a number in decimal
     * notation. Can be negative. For example `"5.4"` increases the rate by 5.4%,
     * `"-3"` decreases the rate by 3%.
     * 
* * optional string percentage_adjustment = 5 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The bytes for percentageAdjustment. */ public com.google.protobuf.ByteString getPercentageAdjustmentBytes() { java.lang.Object ref = percentageAdjustment_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); percentageAdjustment_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * Optional. Multiplicative shipping rate modifier as a number in decimal
     * notation. Can be negative. For example `"5.4"` increases the rate by 5.4%,
     * `"-3"` decreases the rate by 3%.
     * 
* * optional string percentage_adjustment = 5 [(.google.api.field_behavior) = OPTIONAL]; * * * @param value The percentageAdjustment to set. * @return This builder for chaining. */ public Builder setPercentageAdjustment(java.lang.String value) { if (value == null) { throw new NullPointerException(); } percentageAdjustment_ = value; bitField0_ |= 0x00000010; onChanged(); return this; } /** * * *
     * Optional. Multiplicative shipping rate modifier as a number in decimal
     * notation. Can be negative. For example `"5.4"` increases the rate by 5.4%,
     * `"-3"` decreases the rate by 3%.
     * 
* * optional string percentage_adjustment = 5 [(.google.api.field_behavior) = OPTIONAL]; * * * @return This builder for chaining. */ public Builder clearPercentageAdjustment() { percentageAdjustment_ = getDefaultInstance().getPercentageAdjustment(); bitField0_ = (bitField0_ & ~0x00000010); onChanged(); return this; } /** * * *
     * Optional. Multiplicative shipping rate modifier as a number in decimal
     * notation. Can be negative. For example `"5.4"` increases the rate by 5.4%,
     * `"-3"` decreases the rate by 3%.
     * 
* * optional string percentage_adjustment = 5 [(.google.api.field_behavior) = OPTIONAL]; * * * @param value The bytes for percentageAdjustment to set. * @return This builder for chaining. */ public Builder setPercentageAdjustmentBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); percentageAdjustment_ = value; bitField0_ |= 0x00000010; onChanged(); return this; } private com.google.shopping.type.Price flatAdjustment_; private com.google.protobuf.SingleFieldBuilderV3< com.google.shopping.type.Price, com.google.shopping.type.Price.Builder, com.google.shopping.type.PriceOrBuilder> flatAdjustmentBuilder_; /** * * *
     * Optional. Additive shipping rate modifier. Can be negative. For example
     * `{ "amount_micros": 1, "currency_code" : "USD" }` adds $1 to the rate,
     * `{ "amount_micros": -3, "currency_code" : "USD" }` removes $3 from the
     * rate.
     * 
* * * optional .google.shopping.type.Price flat_adjustment = 6 [(.google.api.field_behavior) = OPTIONAL]; * * * @return Whether the flatAdjustment field is set. */ public boolean hasFlatAdjustment() { return ((bitField0_ & 0x00000020) != 0); } /** * * *
     * Optional. Additive shipping rate modifier. Can be negative. For example
     * `{ "amount_micros": 1, "currency_code" : "USD" }` adds $1 to the rate,
     * `{ "amount_micros": -3, "currency_code" : "USD" }` removes $3 from the
     * rate.
     * 
* * * optional .google.shopping.type.Price flat_adjustment = 6 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The flatAdjustment. */ public com.google.shopping.type.Price getFlatAdjustment() { if (flatAdjustmentBuilder_ == null) { return flatAdjustment_ == null ? com.google.shopping.type.Price.getDefaultInstance() : flatAdjustment_; } else { return flatAdjustmentBuilder_.getMessage(); } } /** * * *
     * Optional. Additive shipping rate modifier. Can be negative. For example
     * `{ "amount_micros": 1, "currency_code" : "USD" }` adds $1 to the rate,
     * `{ "amount_micros": -3, "currency_code" : "USD" }` removes $3 from the
     * rate.
     * 
* * * optional .google.shopping.type.Price flat_adjustment = 6 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder setFlatAdjustment(com.google.shopping.type.Price value) { if (flatAdjustmentBuilder_ == null) { if (value == null) { throw new NullPointerException(); } flatAdjustment_ = value; } else { flatAdjustmentBuilder_.setMessage(value); } bitField0_ |= 0x00000020; onChanged(); return this; } /** * * *
     * Optional. Additive shipping rate modifier. Can be negative. For example
     * `{ "amount_micros": 1, "currency_code" : "USD" }` adds $1 to the rate,
     * `{ "amount_micros": -3, "currency_code" : "USD" }` removes $3 from the
     * rate.
     * 
* * * optional .google.shopping.type.Price flat_adjustment = 6 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder setFlatAdjustment(com.google.shopping.type.Price.Builder builderForValue) { if (flatAdjustmentBuilder_ == null) { flatAdjustment_ = builderForValue.build(); } else { flatAdjustmentBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000020; onChanged(); return this; } /** * * *
     * Optional. Additive shipping rate modifier. Can be negative. For example
     * `{ "amount_micros": 1, "currency_code" : "USD" }` adds $1 to the rate,
     * `{ "amount_micros": -3, "currency_code" : "USD" }` removes $3 from the
     * rate.
     * 
* * * optional .google.shopping.type.Price flat_adjustment = 6 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder mergeFlatAdjustment(com.google.shopping.type.Price value) { if (flatAdjustmentBuilder_ == null) { if (((bitField0_ & 0x00000020) != 0) && flatAdjustment_ != null && flatAdjustment_ != com.google.shopping.type.Price.getDefaultInstance()) { getFlatAdjustmentBuilder().mergeFrom(value); } else { flatAdjustment_ = value; } } else { flatAdjustmentBuilder_.mergeFrom(value); } if (flatAdjustment_ != null) { bitField0_ |= 0x00000020; onChanged(); } return this; } /** * * *
     * Optional. Additive shipping rate modifier. Can be negative. For example
     * `{ "amount_micros": 1, "currency_code" : "USD" }` adds $1 to the rate,
     * `{ "amount_micros": -3, "currency_code" : "USD" }` removes $3 from the
     * rate.
     * 
* * * optional .google.shopping.type.Price flat_adjustment = 6 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder clearFlatAdjustment() { bitField0_ = (bitField0_ & ~0x00000020); flatAdjustment_ = null; if (flatAdjustmentBuilder_ != null) { flatAdjustmentBuilder_.dispose(); flatAdjustmentBuilder_ = null; } onChanged(); return this; } /** * * *
     * Optional. Additive shipping rate modifier. Can be negative. For example
     * `{ "amount_micros": 1, "currency_code" : "USD" }` adds $1 to the rate,
     * `{ "amount_micros": -3, "currency_code" : "USD" }` removes $3 from the
     * rate.
     * 
* * * optional .google.shopping.type.Price flat_adjustment = 6 [(.google.api.field_behavior) = OPTIONAL]; * */ public com.google.shopping.type.Price.Builder getFlatAdjustmentBuilder() { bitField0_ |= 0x00000020; onChanged(); return getFlatAdjustmentFieldBuilder().getBuilder(); } /** * * *
     * Optional. Additive shipping rate modifier. Can be negative. For example
     * `{ "amount_micros": 1, "currency_code" : "USD" }` adds $1 to the rate,
     * `{ "amount_micros": -3, "currency_code" : "USD" }` removes $3 from the
     * rate.
     * 
* * * optional .google.shopping.type.Price flat_adjustment = 6 [(.google.api.field_behavior) = OPTIONAL]; * */ public com.google.shopping.type.PriceOrBuilder getFlatAdjustmentOrBuilder() { if (flatAdjustmentBuilder_ != null) { return flatAdjustmentBuilder_.getMessageOrBuilder(); } else { return flatAdjustment_ == null ? com.google.shopping.type.Price.getDefaultInstance() : flatAdjustment_; } } /** * * *
     * Optional. Additive shipping rate modifier. Can be negative. For example
     * `{ "amount_micros": 1, "currency_code" : "USD" }` adds $1 to the rate,
     * `{ "amount_micros": -3, "currency_code" : "USD" }` removes $3 from the
     * rate.
     * 
* * * optional .google.shopping.type.Price flat_adjustment = 6 [(.google.api.field_behavior) = OPTIONAL]; * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.shopping.type.Price, com.google.shopping.type.Price.Builder, com.google.shopping.type.PriceOrBuilder> getFlatAdjustmentFieldBuilder() { if (flatAdjustmentBuilder_ == null) { flatAdjustmentBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.shopping.type.Price, com.google.shopping.type.Price.Builder, com.google.shopping.type.PriceOrBuilder>( getFlatAdjustment(), getParentForChildren(), isClean()); flatAdjustment_ = null; } return flatAdjustmentBuilder_; } @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.CarrierRate) } // @@protoc_insertion_point(class_scope:google.shopping.merchant.accounts.v1beta.CarrierRate) private static final com.google.shopping.merchant.accounts.v1beta.CarrierRate DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.shopping.merchant.accounts.v1beta.CarrierRate(); } public static com.google.shopping.merchant.accounts.v1beta.CarrierRate getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public CarrierRate 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.CarrierRate getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy