
com.google.shopping.merchant.accounts.v1beta.AccountTax 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/account_tax.proto
// Protobuf Java Version: 3.25.5
package com.google.shopping.merchant.accounts.v1beta;
/**
*
*
*
* The tax settings of a merchant account. All methods require the admin role.
*
*
* Protobuf type {@code google.shopping.merchant.accounts.v1beta.AccountTax}
*/
public final class AccountTax extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.shopping.merchant.accounts.v1beta.AccountTax)
AccountTaxOrBuilder {
private static final long serialVersionUID = 0L;
// Use AccountTax.newBuilder() to construct.
private AccountTax(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private AccountTax() {
name_ = "";
taxRules_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new AccountTax();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.shopping.merchant.accounts.v1beta.AccountTaxProto
.internal_static_google_shopping_merchant_accounts_v1beta_AccountTax_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.shopping.merchant.accounts.v1beta.AccountTaxProto
.internal_static_google_shopping_merchant_accounts_v1beta_AccountTax_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.shopping.merchant.accounts.v1beta.AccountTax.class,
com.google.shopping.merchant.accounts.v1beta.AccountTax.Builder.class);
}
public static final int NAME_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object name_ = "";
/**
*
*
*
* Identifier. The name of the tax setting.
* Format:
* "{account_tax.name=accounts/{account}}"
*
*
* string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
*
* @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;
}
}
/**
*
*
*
* Identifier. The name of the tax setting.
* Format:
* "{account_tax.name=accounts/{account}}"
*
*
* string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
*
* @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 ACCOUNT_FIELD_NUMBER = 2;
private long account_ = 0L;
/**
*
*
*
* Output only. The ID of the account to which these account tax settings
* belong.
*
*
* int64 account = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The account.
*/
@java.lang.Override
public long getAccount() {
return account_;
}
public static final int TAX_RULES_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private java.util.List taxRules_;
/**
*
*
*
* Tax rules. "Define the tax rules in each region.
* No tax will be presented if a region has no rule."
*
*
* repeated .google.shopping.merchant.accounts.v1beta.TaxRule tax_rules = 3;
*/
@java.lang.Override
public java.util.List getTaxRulesList() {
return taxRules_;
}
/**
*
*
*
* Tax rules. "Define the tax rules in each region.
* No tax will be presented if a region has no rule."
*
*
* repeated .google.shopping.merchant.accounts.v1beta.TaxRule tax_rules = 3;
*/
@java.lang.Override
public java.util.List extends com.google.shopping.merchant.accounts.v1beta.TaxRuleOrBuilder>
getTaxRulesOrBuilderList() {
return taxRules_;
}
/**
*
*
*
* Tax rules. "Define the tax rules in each region.
* No tax will be presented if a region has no rule."
*
*
* repeated .google.shopping.merchant.accounts.v1beta.TaxRule tax_rules = 3;
*/
@java.lang.Override
public int getTaxRulesCount() {
return taxRules_.size();
}
/**
*
*
*
* Tax rules. "Define the tax rules in each region.
* No tax will be presented if a region has no rule."
*
*
* repeated .google.shopping.merchant.accounts.v1beta.TaxRule tax_rules = 3;
*/
@java.lang.Override
public com.google.shopping.merchant.accounts.v1beta.TaxRule getTaxRules(int index) {
return taxRules_.get(index);
}
/**
*
*
*
* Tax rules. "Define the tax rules in each region.
* No tax will be presented if a region has no rule."
*
*
* repeated .google.shopping.merchant.accounts.v1beta.TaxRule tax_rules = 3;
*/
@java.lang.Override
public com.google.shopping.merchant.accounts.v1beta.TaxRuleOrBuilder getTaxRulesOrBuilder(
int index) {
return taxRules_.get(index);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
if (account_ != 0L) {
output.writeInt64(2, account_);
}
for (int i = 0; i < taxRules_.size(); i++) {
output.writeMessage(3, taxRules_.get(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
}
if (account_ != 0L) {
size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, account_);
}
for (int i = 0; i < taxRules_.size(); i++) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, taxRules_.get(i));
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.shopping.merchant.accounts.v1beta.AccountTax)) {
return super.equals(obj);
}
com.google.shopping.merchant.accounts.v1beta.AccountTax other =
(com.google.shopping.merchant.accounts.v1beta.AccountTax) obj;
if (!getName().equals(other.getName())) return false;
if (getAccount() != other.getAccount()) return false;
if (!getTaxRulesList().equals(other.getTaxRulesList())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
hash = (37 * hash) + ACCOUNT_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getAccount());
if (getTaxRulesCount() > 0) {
hash = (37 * hash) + TAX_RULES_FIELD_NUMBER;
hash = (53 * hash) + getTaxRulesList().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.shopping.merchant.accounts.v1beta.AccountTax parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.shopping.merchant.accounts.v1beta.AccountTax 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.AccountTax parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.shopping.merchant.accounts.v1beta.AccountTax 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.AccountTax parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.shopping.merchant.accounts.v1beta.AccountTax 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.AccountTax 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.AccountTax 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.AccountTax 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.AccountTax 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.AccountTax 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.AccountTax 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.AccountTax 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;
}
/**
*
*
*
* The tax settings of a merchant account. All methods require the admin role.
*
*
* Protobuf type {@code google.shopping.merchant.accounts.v1beta.AccountTax}
*/
public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.shopping.merchant.accounts.v1beta.AccountTax)
com.google.shopping.merchant.accounts.v1beta.AccountTaxOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.shopping.merchant.accounts.v1beta.AccountTaxProto
.internal_static_google_shopping_merchant_accounts_v1beta_AccountTax_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.shopping.merchant.accounts.v1beta.AccountTaxProto
.internal_static_google_shopping_merchant_accounts_v1beta_AccountTax_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.shopping.merchant.accounts.v1beta.AccountTax.class,
com.google.shopping.merchant.accounts.v1beta.AccountTax.Builder.class);
}
// Construct using com.google.shopping.merchant.accounts.v1beta.AccountTax.newBuilder()
private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
name_ = "";
account_ = 0L;
if (taxRulesBuilder_ == null) {
taxRules_ = java.util.Collections.emptyList();
} else {
taxRules_ = null;
taxRulesBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000004);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.shopping.merchant.accounts.v1beta.AccountTaxProto
.internal_static_google_shopping_merchant_accounts_v1beta_AccountTax_descriptor;
}
@java.lang.Override
public com.google.shopping.merchant.accounts.v1beta.AccountTax getDefaultInstanceForType() {
return com.google.shopping.merchant.accounts.v1beta.AccountTax.getDefaultInstance();
}
@java.lang.Override
public com.google.shopping.merchant.accounts.v1beta.AccountTax build() {
com.google.shopping.merchant.accounts.v1beta.AccountTax result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.shopping.merchant.accounts.v1beta.AccountTax buildPartial() {
com.google.shopping.merchant.accounts.v1beta.AccountTax result =
new com.google.shopping.merchant.accounts.v1beta.AccountTax(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartialRepeatedFields(
com.google.shopping.merchant.accounts.v1beta.AccountTax result) {
if (taxRulesBuilder_ == null) {
if (((bitField0_ & 0x00000004) != 0)) {
taxRules_ = java.util.Collections.unmodifiableList(taxRules_);
bitField0_ = (bitField0_ & ~0x00000004);
}
result.taxRules_ = taxRules_;
} else {
result.taxRules_ = taxRulesBuilder_.build();
}
}
private void buildPartial0(com.google.shopping.merchant.accounts.v1beta.AccountTax result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.name_ = name_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.account_ = account_;
}
}
@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.AccountTax) {
return mergeFrom((com.google.shopping.merchant.accounts.v1beta.AccountTax) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.shopping.merchant.accounts.v1beta.AccountTax other) {
if (other == com.google.shopping.merchant.accounts.v1beta.AccountTax.getDefaultInstance())
return this;
if (!other.getName().isEmpty()) {
name_ = other.name_;
bitField0_ |= 0x00000001;
onChanged();
}
if (other.getAccount() != 0L) {
setAccount(other.getAccount());
}
if (taxRulesBuilder_ == null) {
if (!other.taxRules_.isEmpty()) {
if (taxRules_.isEmpty()) {
taxRules_ = other.taxRules_;
bitField0_ = (bitField0_ & ~0x00000004);
} else {
ensureTaxRulesIsMutable();
taxRules_.addAll(other.taxRules_);
}
onChanged();
}
} else {
if (!other.taxRules_.isEmpty()) {
if (taxRulesBuilder_.isEmpty()) {
taxRulesBuilder_.dispose();
taxRulesBuilder_ = null;
taxRules_ = other.taxRules_;
bitField0_ = (bitField0_ & ~0x00000004);
taxRulesBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
? getTaxRulesFieldBuilder()
: null;
} else {
taxRulesBuilder_.addAllMessages(other.taxRules_);
}
}
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
name_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 16:
{
account_ = input.readInt64();
bitField0_ |= 0x00000002;
break;
} // case 16
case 26:
{
com.google.shopping.merchant.accounts.v1beta.TaxRule m =
input.readMessage(
com.google.shopping.merchant.accounts.v1beta.TaxRule.parser(),
extensionRegistry);
if (taxRulesBuilder_ == null) {
ensureTaxRulesIsMutable();
taxRules_.add(m);
} else {
taxRulesBuilder_.addMessage(m);
}
break;
} // case 26
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_ = "";
/**
*
*
*
* Identifier. The name of the tax setting.
* Format:
* "{account_tax.name=accounts/{account}}"
*
*
* string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
*
* @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;
}
}
/**
*
*
*
* Identifier. The name of the tax setting.
* Format:
* "{account_tax.name=accounts/{account}}"
*
*
* string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
*
* @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;
}
}
/**
*
*
*
* Identifier. The name of the tax setting.
* Format:
* "{account_tax.name=accounts/{account}}"
*
*
* string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
*
* @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;
}
/**
*
*
*
* Identifier. The name of the tax setting.
* Format:
* "{account_tax.name=accounts/{account}}"
*
*
* string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
*
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*
* Identifier. The name of the tax setting.
* Format:
* "{account_tax.name=accounts/{account}}"
*
*
* string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
*
* @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 long account_;
/**
*
*
*
* Output only. The ID of the account to which these account tax settings
* belong.
*
*
* int64 account = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The account.
*/
@java.lang.Override
public long getAccount() {
return account_;
}
/**
*
*
*
* Output only. The ID of the account to which these account tax settings
* belong.
*
*
* int64 account = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @param value The account to set.
* @return This builder for chaining.
*/
public Builder setAccount(long value) {
account_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Output only. The ID of the account to which these account tax settings
* belong.
*
*
* int64 account = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return This builder for chaining.
*/
public Builder clearAccount() {
bitField0_ = (bitField0_ & ~0x00000002);
account_ = 0L;
onChanged();
return this;
}
private java.util.List taxRules_ =
java.util.Collections.emptyList();
private void ensureTaxRulesIsMutable() {
if (!((bitField0_ & 0x00000004) != 0)) {
taxRules_ =
new java.util.ArrayList(
taxRules_);
bitField0_ |= 0x00000004;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.shopping.merchant.accounts.v1beta.TaxRule,
com.google.shopping.merchant.accounts.v1beta.TaxRule.Builder,
com.google.shopping.merchant.accounts.v1beta.TaxRuleOrBuilder>
taxRulesBuilder_;
/**
*
*
*
* Tax rules. "Define the tax rules in each region.
* No tax will be presented if a region has no rule."
*
*
* repeated .google.shopping.merchant.accounts.v1beta.TaxRule tax_rules = 3;
*/
public java.util.List getTaxRulesList() {
if (taxRulesBuilder_ == null) {
return java.util.Collections.unmodifiableList(taxRules_);
} else {
return taxRulesBuilder_.getMessageList();
}
}
/**
*
*
*
* Tax rules. "Define the tax rules in each region.
* No tax will be presented if a region has no rule."
*
*
* repeated .google.shopping.merchant.accounts.v1beta.TaxRule tax_rules = 3;
*/
public int getTaxRulesCount() {
if (taxRulesBuilder_ == null) {
return taxRules_.size();
} else {
return taxRulesBuilder_.getCount();
}
}
/**
*
*
*
* Tax rules. "Define the tax rules in each region.
* No tax will be presented if a region has no rule."
*
*
* repeated .google.shopping.merchant.accounts.v1beta.TaxRule tax_rules = 3;
*/
public com.google.shopping.merchant.accounts.v1beta.TaxRule getTaxRules(int index) {
if (taxRulesBuilder_ == null) {
return taxRules_.get(index);
} else {
return taxRulesBuilder_.getMessage(index);
}
}
/**
*
*
*
* Tax rules. "Define the tax rules in each region.
* No tax will be presented if a region has no rule."
*
*
* repeated .google.shopping.merchant.accounts.v1beta.TaxRule tax_rules = 3;
*/
public Builder setTaxRules(
int index, com.google.shopping.merchant.accounts.v1beta.TaxRule value) {
if (taxRulesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureTaxRulesIsMutable();
taxRules_.set(index, value);
onChanged();
} else {
taxRulesBuilder_.setMessage(index, value);
}
return this;
}
/**
*
*
*
* Tax rules. "Define the tax rules in each region.
* No tax will be presented if a region has no rule."
*
*
* repeated .google.shopping.merchant.accounts.v1beta.TaxRule tax_rules = 3;
*/
public Builder setTaxRules(
int index, com.google.shopping.merchant.accounts.v1beta.TaxRule.Builder builderForValue) {
if (taxRulesBuilder_ == null) {
ensureTaxRulesIsMutable();
taxRules_.set(index, builderForValue.build());
onChanged();
} else {
taxRulesBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* Tax rules. "Define the tax rules in each region.
* No tax will be presented if a region has no rule."
*
*
* repeated .google.shopping.merchant.accounts.v1beta.TaxRule tax_rules = 3;
*/
public Builder addTaxRules(com.google.shopping.merchant.accounts.v1beta.TaxRule value) {
if (taxRulesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureTaxRulesIsMutable();
taxRules_.add(value);
onChanged();
} else {
taxRulesBuilder_.addMessage(value);
}
return this;
}
/**
*
*
*
* Tax rules. "Define the tax rules in each region.
* No tax will be presented if a region has no rule."
*
*
* repeated .google.shopping.merchant.accounts.v1beta.TaxRule tax_rules = 3;
*/
public Builder addTaxRules(
int index, com.google.shopping.merchant.accounts.v1beta.TaxRule value) {
if (taxRulesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureTaxRulesIsMutable();
taxRules_.add(index, value);
onChanged();
} else {
taxRulesBuilder_.addMessage(index, value);
}
return this;
}
/**
*
*
*
* Tax rules. "Define the tax rules in each region.
* No tax will be presented if a region has no rule."
*
*
* repeated .google.shopping.merchant.accounts.v1beta.TaxRule tax_rules = 3;
*/
public Builder addTaxRules(
com.google.shopping.merchant.accounts.v1beta.TaxRule.Builder builderForValue) {
if (taxRulesBuilder_ == null) {
ensureTaxRulesIsMutable();
taxRules_.add(builderForValue.build());
onChanged();
} else {
taxRulesBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
*
*
* Tax rules. "Define the tax rules in each region.
* No tax will be presented if a region has no rule."
*
*
* repeated .google.shopping.merchant.accounts.v1beta.TaxRule tax_rules = 3;
*/
public Builder addTaxRules(
int index, com.google.shopping.merchant.accounts.v1beta.TaxRule.Builder builderForValue) {
if (taxRulesBuilder_ == null) {
ensureTaxRulesIsMutable();
taxRules_.add(index, builderForValue.build());
onChanged();
} else {
taxRulesBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* Tax rules. "Define the tax rules in each region.
* No tax will be presented if a region has no rule."
*
*
* repeated .google.shopping.merchant.accounts.v1beta.TaxRule tax_rules = 3;
*/
public Builder addAllTaxRules(
java.lang.Iterable extends com.google.shopping.merchant.accounts.v1beta.TaxRule> values) {
if (taxRulesBuilder_ == null) {
ensureTaxRulesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, taxRules_);
onChanged();
} else {
taxRulesBuilder_.addAllMessages(values);
}
return this;
}
/**
*
*
*
* Tax rules. "Define the tax rules in each region.
* No tax will be presented if a region has no rule."
*
*
* repeated .google.shopping.merchant.accounts.v1beta.TaxRule tax_rules = 3;
*/
public Builder clearTaxRules() {
if (taxRulesBuilder_ == null) {
taxRules_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
} else {
taxRulesBuilder_.clear();
}
return this;
}
/**
*
*
*
* Tax rules. "Define the tax rules in each region.
* No tax will be presented if a region has no rule."
*
*
* repeated .google.shopping.merchant.accounts.v1beta.TaxRule tax_rules = 3;
*/
public Builder removeTaxRules(int index) {
if (taxRulesBuilder_ == null) {
ensureTaxRulesIsMutable();
taxRules_.remove(index);
onChanged();
} else {
taxRulesBuilder_.remove(index);
}
return this;
}
/**
*
*
*
* Tax rules. "Define the tax rules in each region.
* No tax will be presented if a region has no rule."
*
*
* repeated .google.shopping.merchant.accounts.v1beta.TaxRule tax_rules = 3;
*/
public com.google.shopping.merchant.accounts.v1beta.TaxRule.Builder getTaxRulesBuilder(
int index) {
return getTaxRulesFieldBuilder().getBuilder(index);
}
/**
*
*
*
* Tax rules. "Define the tax rules in each region.
* No tax will be presented if a region has no rule."
*
*
* repeated .google.shopping.merchant.accounts.v1beta.TaxRule tax_rules = 3;
*/
public com.google.shopping.merchant.accounts.v1beta.TaxRuleOrBuilder getTaxRulesOrBuilder(
int index) {
if (taxRulesBuilder_ == null) {
return taxRules_.get(index);
} else {
return taxRulesBuilder_.getMessageOrBuilder(index);
}
}
/**
*
*
*
* Tax rules. "Define the tax rules in each region.
* No tax will be presented if a region has no rule."
*
*
* repeated .google.shopping.merchant.accounts.v1beta.TaxRule tax_rules = 3;
*/
public java.util.List extends com.google.shopping.merchant.accounts.v1beta.TaxRuleOrBuilder>
getTaxRulesOrBuilderList() {
if (taxRulesBuilder_ != null) {
return taxRulesBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(taxRules_);
}
}
/**
*
*
*
* Tax rules. "Define the tax rules in each region.
* No tax will be presented if a region has no rule."
*
*
* repeated .google.shopping.merchant.accounts.v1beta.TaxRule tax_rules = 3;
*/
public com.google.shopping.merchant.accounts.v1beta.TaxRule.Builder addTaxRulesBuilder() {
return getTaxRulesFieldBuilder()
.addBuilder(com.google.shopping.merchant.accounts.v1beta.TaxRule.getDefaultInstance());
}
/**
*
*
*
* Tax rules. "Define the tax rules in each region.
* No tax will be presented if a region has no rule."
*
*
* repeated .google.shopping.merchant.accounts.v1beta.TaxRule tax_rules = 3;
*/
public com.google.shopping.merchant.accounts.v1beta.TaxRule.Builder addTaxRulesBuilder(
int index) {
return getTaxRulesFieldBuilder()
.addBuilder(
index, com.google.shopping.merchant.accounts.v1beta.TaxRule.getDefaultInstance());
}
/**
*
*
*
* Tax rules. "Define the tax rules in each region.
* No tax will be presented if a region has no rule."
*
*
* repeated .google.shopping.merchant.accounts.v1beta.TaxRule tax_rules = 3;
*/
public java.util.List
getTaxRulesBuilderList() {
return getTaxRulesFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.shopping.merchant.accounts.v1beta.TaxRule,
com.google.shopping.merchant.accounts.v1beta.TaxRule.Builder,
com.google.shopping.merchant.accounts.v1beta.TaxRuleOrBuilder>
getTaxRulesFieldBuilder() {
if (taxRulesBuilder_ == null) {
taxRulesBuilder_ =
new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.shopping.merchant.accounts.v1beta.TaxRule,
com.google.shopping.merchant.accounts.v1beta.TaxRule.Builder,
com.google.shopping.merchant.accounts.v1beta.TaxRuleOrBuilder>(
taxRules_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean());
taxRules_ = null;
}
return taxRulesBuilder_;
}
@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.AccountTax)
}
// @@protoc_insertion_point(class_scope:google.shopping.merchant.accounts.v1beta.AccountTax)
private static final com.google.shopping.merchant.accounts.v1beta.AccountTax DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.shopping.merchant.accounts.v1beta.AccountTax();
}
public static com.google.shopping.merchant.accounts.v1beta.AccountTax getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public AccountTax 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.AccountTax getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy