nl.topicus.jdbc.shaded.com.google.api.Billing Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spanner-jdbc Show documentation
Show all versions of spanner-jdbc Show documentation
JDBC Driver for Google Cloud Spanner
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/api/billing.proto
package nl.topicus.jdbc.shaded.com.google.api;
/**
*
* Billing related configuration of the service.
* The following example shows how to configure monitored resources and metrics
* for billing:
* monitored_resources:
* - type: library.googleapis.com/branch
* labels:
* - key: /city
* description: The city where the library branch is located in.
* - key: /name
* description: The name of the branch.
* metrics:
* - name: library.googleapis.com/book/borrowed_count
* metric_kind: DELTA
* value_type: INT64
* billing:
* consumer_destinations:
* - monitored_resource: library.googleapis.com/branch
* metrics:
* - library.googleapis.com/book/borrowed_count
*
*
* Protobuf type {@code google.api.Billing}
*/
public final class Billing extends
nl.topicus.jdbc.shaded.com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:google.api.Billing)
BillingOrBuilder {
private static final long serialVersionUID = 0L;
// Use Billing.newBuilder() to construct.
private Billing(nl.topicus.jdbc.shaded.com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Billing() {
consumerDestinations_ = java.util.Collections.emptyList();
}
@java.lang.Override
public final nl.topicus.jdbc.shaded.com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Billing(
nl.topicus.jdbc.shaded.com.google.protobuf.CodedInputStream input,
nl.topicus.jdbc.shaded.com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws nl.topicus.jdbc.shaded.com.google.protobuf.InvalidProtocolBufferException {
this();
int mutable_bitField0_ = 0;
nl.topicus.jdbc.shaded.com.google.protobuf.UnknownFieldSet.Builder unknownFields =
nl.topicus.jdbc.shaded.com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
case 66: {
if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
consumerDestinations_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
consumerDestinations_.add(
input.readMessage(nl.topicus.jdbc.shaded.com.google.api.Billing.BillingDestination.parser(), extensionRegistry));
break;
}
}
}
} catch (nl.topicus.jdbc.shaded.com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new nl.topicus.jdbc.shaded.com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
consumerDestinations_ = java.util.Collections.unmodifiableList(consumerDestinations_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final nl.topicus.jdbc.shaded.com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return nl.topicus.jdbc.shaded.com.google.api.BillingProto.internal_static_google_api_Billing_descriptor;
}
protected nl.topicus.jdbc.shaded.com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return nl.topicus.jdbc.shaded.com.google.api.BillingProto.internal_static_google_api_Billing_fieldAccessorTable
.ensureFieldAccessorsInitialized(
nl.topicus.jdbc.shaded.com.google.api.Billing.class, nl.topicus.jdbc.shaded.com.google.api.Billing.Builder.class);
}
public interface BillingDestinationOrBuilder extends
// @@protoc_insertion_point(interface_extends:google.api.Billing.BillingDestination)
nl.topicus.jdbc.shaded.com.google.protobuf.MessageOrBuilder {
/**
*
* The monitored resource type. The type must be defined in
* [Service.monitored_resources][google.api.Service.monitored_resources] section.
*
*
* string monitored_resource = 1;
*/
java.lang.String getMonitoredResource();
/**
*
* The monitored resource type. The type must be defined in
* [Service.monitored_resources][google.api.Service.monitored_resources] section.
*
*
* string monitored_resource = 1;
*/
nl.topicus.jdbc.shaded.com.google.protobuf.ByteString
getMonitoredResourceBytes();
/**
*
* Names of the metrics to report to this billing destination.
* Each name must be defined in [Service.metrics][google.api.Service.metrics] section.
*
*
* repeated string metrics = 2;
*/
java.util.List
getMetricsList();
/**
*
* Names of the metrics to report to this billing destination.
* Each name must be defined in [Service.metrics][google.api.Service.metrics] section.
*
*
* repeated string metrics = 2;
*/
int getMetricsCount();
/**
*
* Names of the metrics to report to this billing destination.
* Each name must be defined in [Service.metrics][google.api.Service.metrics] section.
*
*
* repeated string metrics = 2;
*/
java.lang.String getMetrics(int index);
/**
*
* Names of the metrics to report to this billing destination.
* Each name must be defined in [Service.metrics][google.api.Service.metrics] section.
*
*
* repeated string metrics = 2;
*/
nl.topicus.jdbc.shaded.com.google.protobuf.ByteString
getMetricsBytes(int index);
}
/**
*
* Configuration of a specific billing destination (Currently only support
* bill against consumer project).
*
*
* Protobuf type {@code google.api.Billing.BillingDestination}
*/
public static final class BillingDestination extends
nl.topicus.jdbc.shaded.com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:google.api.Billing.BillingDestination)
BillingDestinationOrBuilder {
private static final long serialVersionUID = 0L;
// Use BillingDestination.newBuilder() to construct.
private BillingDestination(nl.topicus.jdbc.shaded.com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private BillingDestination() {
monitoredResource_ = "";
metrics_ = nl.topicus.jdbc.shaded.com.google.protobuf.LazyStringArrayList.EMPTY;
}
@java.lang.Override
public final nl.topicus.jdbc.shaded.com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private BillingDestination(
nl.topicus.jdbc.shaded.com.google.protobuf.CodedInputStream input,
nl.topicus.jdbc.shaded.com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws nl.topicus.jdbc.shaded.com.google.protobuf.InvalidProtocolBufferException {
this();
int mutable_bitField0_ = 0;
nl.topicus.jdbc.shaded.com.google.protobuf.UnknownFieldSet.Builder unknownFields =
nl.topicus.jdbc.shaded.com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
java.lang.String s = input.readStringRequireUtf8();
monitoredResource_ = s;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
metrics_ = new nl.topicus.jdbc.shaded.com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000002;
}
metrics_.add(s);
break;
}
}
}
} catch (nl.topicus.jdbc.shaded.com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new nl.topicus.jdbc.shaded.com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
metrics_ = metrics_.getUnmodifiableView();
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final nl.topicus.jdbc.shaded.com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return nl.topicus.jdbc.shaded.com.google.api.BillingProto.internal_static_google_api_Billing_BillingDestination_descriptor;
}
protected nl.topicus.jdbc.shaded.com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return nl.topicus.jdbc.shaded.com.google.api.BillingProto.internal_static_google_api_Billing_BillingDestination_fieldAccessorTable
.ensureFieldAccessorsInitialized(
nl.topicus.jdbc.shaded.com.google.api.Billing.BillingDestination.class, nl.topicus.jdbc.shaded.com.google.api.Billing.BillingDestination.Builder.class);
}
private int bitField0_;
public static final int MONITORED_RESOURCE_FIELD_NUMBER = 1;
private volatile java.lang.Object monitoredResource_;
/**
*
* The monitored resource type. The type must be defined in
* [Service.monitored_resources][google.api.Service.monitored_resources] section.
*
*
* string monitored_resource = 1;
*/
public java.lang.String getMonitoredResource() {
java.lang.Object ref = monitoredResource_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
nl.topicus.jdbc.shaded.com.google.protobuf.ByteString bs =
(nl.topicus.jdbc.shaded.com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
monitoredResource_ = s;
return s;
}
}
/**
*
* The monitored resource type. The type must be defined in
* [Service.monitored_resources][google.api.Service.monitored_resources] section.
*
*
* string monitored_resource = 1;
*/
public nl.topicus.jdbc.shaded.com.google.protobuf.ByteString
getMonitoredResourceBytes() {
java.lang.Object ref = monitoredResource_;
if (ref instanceof java.lang.String) {
nl.topicus.jdbc.shaded.com.google.protobuf.ByteString b =
nl.topicus.jdbc.shaded.com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
monitoredResource_ = b;
return b;
} else {
return (nl.topicus.jdbc.shaded.com.google.protobuf.ByteString) ref;
}
}
public static final int METRICS_FIELD_NUMBER = 2;
private nl.topicus.jdbc.shaded.com.google.protobuf.LazyStringList metrics_;
/**
*
* Names of the metrics to report to this billing destination.
* Each name must be defined in [Service.metrics][google.api.Service.metrics] section.
*
*
* repeated string metrics = 2;
*/
public nl.topicus.jdbc.shaded.com.google.protobuf.ProtocolStringList
getMetricsList() {
return metrics_;
}
/**
*
* Names of the metrics to report to this billing destination.
* Each name must be defined in [Service.metrics][google.api.Service.metrics] section.
*
*
* repeated string metrics = 2;
*/
public int getMetricsCount() {
return metrics_.size();
}
/**
*
* Names of the metrics to report to this billing destination.
* Each name must be defined in [Service.metrics][google.api.Service.metrics] section.
*
*
* repeated string metrics = 2;
*/
public java.lang.String getMetrics(int index) {
return metrics_.get(index);
}
/**
*
* Names of the metrics to report to this billing destination.
* Each name must be defined in [Service.metrics][google.api.Service.metrics] section.
*
*
* repeated string metrics = 2;
*/
public nl.topicus.jdbc.shaded.com.google.protobuf.ByteString
getMetricsBytes(int index) {
return metrics_.getByteString(index);
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(nl.topicus.jdbc.shaded.com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getMonitoredResourceBytes().isEmpty()) {
nl.topicus.jdbc.shaded.com.google.protobuf.GeneratedMessageV3.writeString(output, 1, monitoredResource_);
}
for (int i = 0; i < metrics_.size(); i++) {
nl.topicus.jdbc.shaded.com.google.protobuf.GeneratedMessageV3.writeString(output, 2, metrics_.getRaw(i));
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getMonitoredResourceBytes().isEmpty()) {
size += nl.topicus.jdbc.shaded.com.google.protobuf.GeneratedMessageV3.computeStringSize(1, monitoredResource_);
}
{
int dataSize = 0;
for (int i = 0; i < metrics_.size(); i++) {
dataSize += computeStringSizeNoTag(metrics_.getRaw(i));
}
size += dataSize;
size += 1 * getMetricsList().size();
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof nl.topicus.jdbc.shaded.com.google.api.Billing.BillingDestination)) {
return super.equals(obj);
}
nl.topicus.jdbc.shaded.com.google.api.Billing.BillingDestination other = (nl.topicus.jdbc.shaded.com.google.api.Billing.BillingDestination) obj;
boolean result = true;
result = result && getMonitoredResource()
.equals(other.getMonitoredResource());
result = result && getMetricsList()
.equals(other.getMetricsList());
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + MONITORED_RESOURCE_FIELD_NUMBER;
hash = (53 * hash) + getMonitoredResource().hashCode();
if (getMetricsCount() > 0) {
hash = (37 * hash) + METRICS_FIELD_NUMBER;
hash = (53 * hash) + getMetricsList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static nl.topicus.jdbc.shaded.com.google.api.Billing.BillingDestination parseFrom(
java.nio.ByteBuffer data)
throws nl.topicus.jdbc.shaded.com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static nl.topicus.jdbc.shaded.com.google.api.Billing.BillingDestination parseFrom(
java.nio.ByteBuffer data,
nl.topicus.jdbc.shaded.com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws nl.topicus.jdbc.shaded.com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static nl.topicus.jdbc.shaded.com.google.api.Billing.BillingDestination parseFrom(
nl.topicus.jdbc.shaded.com.google.protobuf.ByteString data)
throws nl.topicus.jdbc.shaded.com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static nl.topicus.jdbc.shaded.com.google.api.Billing.BillingDestination parseFrom(
nl.topicus.jdbc.shaded.com.google.protobuf.ByteString data,
nl.topicus.jdbc.shaded.com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws nl.topicus.jdbc.shaded.com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static nl.topicus.jdbc.shaded.com.google.api.Billing.BillingDestination parseFrom(byte[] data)
throws nl.topicus.jdbc.shaded.com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static nl.topicus.jdbc.shaded.com.google.api.Billing.BillingDestination parseFrom(
byte[] data,
nl.topicus.jdbc.shaded.com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws nl.topicus.jdbc.shaded.com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static nl.topicus.jdbc.shaded.com.google.api.Billing.BillingDestination parseFrom(java.io.InputStream input)
throws java.io.IOException {
return nl.topicus.jdbc.shaded.com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static nl.topicus.jdbc.shaded.com.google.api.Billing.BillingDestination parseFrom(
java.io.InputStream input,
nl.topicus.jdbc.shaded.com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return nl.topicus.jdbc.shaded.com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static nl.topicus.jdbc.shaded.com.google.api.Billing.BillingDestination parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return nl.topicus.jdbc.shaded.com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static nl.topicus.jdbc.shaded.com.google.api.Billing.BillingDestination parseDelimitedFrom(
java.io.InputStream input,
nl.topicus.jdbc.shaded.com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return nl.topicus.jdbc.shaded.com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static nl.topicus.jdbc.shaded.com.google.api.Billing.BillingDestination parseFrom(
nl.topicus.jdbc.shaded.com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return nl.topicus.jdbc.shaded.com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static nl.topicus.jdbc.shaded.com.google.api.Billing.BillingDestination parseFrom(
nl.topicus.jdbc.shaded.com.google.protobuf.CodedInputStream input,
nl.topicus.jdbc.shaded.com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return nl.topicus.jdbc.shaded.com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(nl.topicus.jdbc.shaded.com.google.api.Billing.BillingDestination prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
nl.topicus.jdbc.shaded.com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* Configuration of a specific billing destination (Currently only support
* bill against consumer project).
*
*
* Protobuf type {@code google.api.Billing.BillingDestination}
*/
public static final class Builder extends
nl.topicus.jdbc.shaded.com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:google.api.Billing.BillingDestination)
nl.topicus.jdbc.shaded.com.google.api.Billing.BillingDestinationOrBuilder {
public static final nl.topicus.jdbc.shaded.com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return nl.topicus.jdbc.shaded.com.google.api.BillingProto.internal_static_google_api_Billing_BillingDestination_descriptor;
}
protected nl.topicus.jdbc.shaded.com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return nl.topicus.jdbc.shaded.com.google.api.BillingProto.internal_static_google_api_Billing_BillingDestination_fieldAccessorTable
.ensureFieldAccessorsInitialized(
nl.topicus.jdbc.shaded.com.google.api.Billing.BillingDestination.class, nl.topicus.jdbc.shaded.com.google.api.Billing.BillingDestination.Builder.class);
}
// Construct using nl.topicus.jdbc.shaded.com.google.api.Billing.BillingDestination.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
nl.topicus.jdbc.shaded.com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (nl.topicus.jdbc.shaded.com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
monitoredResource_ = "";
metrics_ = nl.topicus.jdbc.shaded.com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000002);
return this;
}
public nl.topicus.jdbc.shaded.com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return nl.topicus.jdbc.shaded.com.google.api.BillingProto.internal_static_google_api_Billing_BillingDestination_descriptor;
}
public nl.topicus.jdbc.shaded.com.google.api.Billing.BillingDestination getDefaultInstanceForType() {
return nl.topicus.jdbc.shaded.com.google.api.Billing.BillingDestination.getDefaultInstance();
}
public nl.topicus.jdbc.shaded.com.google.api.Billing.BillingDestination build() {
nl.topicus.jdbc.shaded.com.google.api.Billing.BillingDestination result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public nl.topicus.jdbc.shaded.com.google.api.Billing.BillingDestination buildPartial() {
nl.topicus.jdbc.shaded.com.google.api.Billing.BillingDestination result = new nl.topicus.jdbc.shaded.com.google.api.Billing.BillingDestination(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
result.monitoredResource_ = monitoredResource_;
if (((bitField0_ & 0x00000002) == 0x00000002)) {
metrics_ = metrics_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000002);
}
result.metrics_ = metrics_;
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
nl.topicus.jdbc.shaded.com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
nl.topicus.jdbc.shaded.com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
nl.topicus.jdbc.shaded.com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
nl.topicus.jdbc.shaded.com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
nl.topicus.jdbc.shaded.com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(nl.topicus.jdbc.shaded.com.google.protobuf.Message other) {
if (other instanceof nl.topicus.jdbc.shaded.com.google.api.Billing.BillingDestination) {
return mergeFrom((nl.topicus.jdbc.shaded.com.google.api.Billing.BillingDestination)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(nl.topicus.jdbc.shaded.com.google.api.Billing.BillingDestination other) {
if (other == nl.topicus.jdbc.shaded.com.google.api.Billing.BillingDestination.getDefaultInstance()) return this;
if (!other.getMonitoredResource().isEmpty()) {
monitoredResource_ = other.monitoredResource_;
onChanged();
}
if (!other.metrics_.isEmpty()) {
if (metrics_.isEmpty()) {
metrics_ = other.metrics_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureMetricsIsMutable();
metrics_.addAll(other.metrics_);
}
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
nl.topicus.jdbc.shaded.com.google.protobuf.CodedInputStream input,
nl.topicus.jdbc.shaded.com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
nl.topicus.jdbc.shaded.com.google.api.Billing.BillingDestination parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (nl.topicus.jdbc.shaded.com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (nl.topicus.jdbc.shaded.com.google.api.Billing.BillingDestination) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object monitoredResource_ = "";
/**
*
* The monitored resource type. The type must be defined in
* [Service.monitored_resources][google.api.Service.monitored_resources] section.
*
*
* string monitored_resource = 1;
*/
public java.lang.String getMonitoredResource() {
java.lang.Object ref = monitoredResource_;
if (!(ref instanceof java.lang.String)) {
nl.topicus.jdbc.shaded.com.google.protobuf.ByteString bs =
(nl.topicus.jdbc.shaded.com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
monitoredResource_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The monitored resource type. The type must be defined in
* [Service.monitored_resources][google.api.Service.monitored_resources] section.
*
*
* string monitored_resource = 1;
*/
public nl.topicus.jdbc.shaded.com.google.protobuf.ByteString
getMonitoredResourceBytes() {
java.lang.Object ref = monitoredResource_;
if (ref instanceof String) {
nl.topicus.jdbc.shaded.com.google.protobuf.ByteString b =
nl.topicus.jdbc.shaded.com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
monitoredResource_ = b;
return b;
} else {
return (nl.topicus.jdbc.shaded.com.google.protobuf.ByteString) ref;
}
}
/**
*
* The monitored resource type. The type must be defined in
* [Service.monitored_resources][google.api.Service.monitored_resources] section.
*
*
* string monitored_resource = 1;
*/
public Builder setMonitoredResource(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
monitoredResource_ = value;
onChanged();
return this;
}
/**
*
* The monitored resource type. The type must be defined in
* [Service.monitored_resources][google.api.Service.monitored_resources] section.
*
*
* string monitored_resource = 1;
*/
public Builder clearMonitoredResource() {
monitoredResource_ = getDefaultInstance().getMonitoredResource();
onChanged();
return this;
}
/**
*
* The monitored resource type. The type must be defined in
* [Service.monitored_resources][google.api.Service.monitored_resources] section.
*
*
* string monitored_resource = 1;
*/
public Builder setMonitoredResourceBytes(
nl.topicus.jdbc.shaded.com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
monitoredResource_ = value;
onChanged();
return this;
}
private nl.topicus.jdbc.shaded.com.google.protobuf.LazyStringList metrics_ = nl.topicus.jdbc.shaded.com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureMetricsIsMutable() {
if (!((bitField0_ & 0x00000002) == 0x00000002)) {
metrics_ = new nl.topicus.jdbc.shaded.com.google.protobuf.LazyStringArrayList(metrics_);
bitField0_ |= 0x00000002;
}
}
/**
*
* Names of the metrics to report to this billing destination.
* Each name must be defined in [Service.metrics][google.api.Service.metrics] section.
*
*
* repeated string metrics = 2;
*/
public nl.topicus.jdbc.shaded.com.google.protobuf.ProtocolStringList
getMetricsList() {
return metrics_.getUnmodifiableView();
}
/**
*
* Names of the metrics to report to this billing destination.
* Each name must be defined in [Service.metrics][google.api.Service.metrics] section.
*
*
* repeated string metrics = 2;
*/
public int getMetricsCount() {
return metrics_.size();
}
/**
*
* Names of the metrics to report to this billing destination.
* Each name must be defined in [Service.metrics][google.api.Service.metrics] section.
*
*
* repeated string metrics = 2;
*/
public java.lang.String getMetrics(int index) {
return metrics_.get(index);
}
/**
*
* Names of the metrics to report to this billing destination.
* Each name must be defined in [Service.metrics][google.api.Service.metrics] section.
*
*
* repeated string metrics = 2;
*/
public nl.topicus.jdbc.shaded.com.google.protobuf.ByteString
getMetricsBytes(int index) {
return metrics_.getByteString(index);
}
/**
*
* Names of the metrics to report to this billing destination.
* Each name must be defined in [Service.metrics][google.api.Service.metrics] section.
*
*
* repeated string metrics = 2;
*/
public Builder setMetrics(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureMetricsIsMutable();
metrics_.set(index, value);
onChanged();
return this;
}
/**
*
* Names of the metrics to report to this billing destination.
* Each name must be defined in [Service.metrics][google.api.Service.metrics] section.
*
*
* repeated string metrics = 2;
*/
public Builder addMetrics(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureMetricsIsMutable();
metrics_.add(value);
onChanged();
return this;
}
/**
*
* Names of the metrics to report to this billing destination.
* Each name must be defined in [Service.metrics][google.api.Service.metrics] section.
*
*
* repeated string metrics = 2;
*/
public Builder addAllMetrics(
java.lang.Iterable values) {
ensureMetricsIsMutable();
nl.topicus.jdbc.shaded.com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, metrics_);
onChanged();
return this;
}
/**
*
* Names of the metrics to report to this billing destination.
* Each name must be defined in [Service.metrics][google.api.Service.metrics] section.
*
*
* repeated string metrics = 2;
*/
public Builder clearMetrics() {
metrics_ = nl.topicus.jdbc.shaded.com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
* Names of the metrics to report to this billing destination.
* Each name must be defined in [Service.metrics][google.api.Service.metrics] section.
*
*
* repeated string metrics = 2;
*/
public Builder addMetricsBytes(
nl.topicus.jdbc.shaded.com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureMetricsIsMutable();
metrics_.add(value);
onChanged();
return this;
}
public final Builder setUnknownFields(
final nl.topicus.jdbc.shaded.com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
}
public final Builder mergeUnknownFields(
final nl.topicus.jdbc.shaded.com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.api.Billing.BillingDestination)
}
// @@protoc_insertion_point(class_scope:google.api.Billing.BillingDestination)
private static final nl.topicus.jdbc.shaded.com.google.api.Billing.BillingDestination DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new nl.topicus.jdbc.shaded.com.google.api.Billing.BillingDestination();
}
public static nl.topicus.jdbc.shaded.com.google.api.Billing.BillingDestination getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final nl.topicus.jdbc.shaded.com.google.protobuf.Parser
PARSER = new nl.topicus.jdbc.shaded.com.google.protobuf.AbstractParser() {
public BillingDestination parsePartialFrom(
nl.topicus.jdbc.shaded.com.google.protobuf.CodedInputStream input,
nl.topicus.jdbc.shaded.com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws nl.topicus.jdbc.shaded.com.google.protobuf.InvalidProtocolBufferException {
return new BillingDestination(input, extensionRegistry);
}
};
public static nl.topicus.jdbc.shaded.com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public nl.topicus.jdbc.shaded.com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public nl.topicus.jdbc.shaded.com.google.api.Billing.BillingDestination getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public static final int CONSUMER_DESTINATIONS_FIELD_NUMBER = 8;
private java.util.List consumerDestinations_;
/**
*
* Billing configurations for sending metrics to the consumer project.
* There can be multiple consumer destinations per service, each one must have
* a different monitored resource type. A metric can be used in at most
* one consumer destination.
*
*
* repeated .google.api.Billing.BillingDestination consumer_destinations = 8;
*/
public java.util.List getConsumerDestinationsList() {
return consumerDestinations_;
}
/**
*
* Billing configurations for sending metrics to the consumer project.
* There can be multiple consumer destinations per service, each one must have
* a different monitored resource type. A metric can be used in at most
* one consumer destination.
*
*
* repeated .google.api.Billing.BillingDestination consumer_destinations = 8;
*/
public java.util.List extends nl.topicus.jdbc.shaded.com.google.api.Billing.BillingDestinationOrBuilder>
getConsumerDestinationsOrBuilderList() {
return consumerDestinations_;
}
/**
*
* Billing configurations for sending metrics to the consumer project.
* There can be multiple consumer destinations per service, each one must have
* a different monitored resource type. A metric can be used in at most
* one consumer destination.
*
*
* repeated .google.api.Billing.BillingDestination consumer_destinations = 8;
*/
public int getConsumerDestinationsCount() {
return consumerDestinations_.size();
}
/**
*
* Billing configurations for sending metrics to the consumer project.
* There can be multiple consumer destinations per service, each one must have
* a different monitored resource type. A metric can be used in at most
* one consumer destination.
*
*
* repeated .google.api.Billing.BillingDestination consumer_destinations = 8;
*/
public nl.topicus.jdbc.shaded.com.google.api.Billing.BillingDestination getConsumerDestinations(int index) {
return consumerDestinations_.get(index);
}
/**
*
* Billing configurations for sending metrics to the consumer project.
* There can be multiple consumer destinations per service, each one must have
* a different monitored resource type. A metric can be used in at most
* one consumer destination.
*
*
* repeated .google.api.Billing.BillingDestination consumer_destinations = 8;
*/
public nl.topicus.jdbc.shaded.com.google.api.Billing.BillingDestinationOrBuilder getConsumerDestinationsOrBuilder(
int index) {
return consumerDestinations_.get(index);
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(nl.topicus.jdbc.shaded.com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
for (int i = 0; i < consumerDestinations_.size(); i++) {
output.writeMessage(8, consumerDestinations_.get(i));
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < consumerDestinations_.size(); i++) {
size += nl.topicus.jdbc.shaded.com.google.protobuf.CodedOutputStream
.computeMessageSize(8, consumerDestinations_.get(i));
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof nl.topicus.jdbc.shaded.com.google.api.Billing)) {
return super.equals(obj);
}
nl.topicus.jdbc.shaded.com.google.api.Billing other = (nl.topicus.jdbc.shaded.com.google.api.Billing) obj;
boolean result = true;
result = result && getConsumerDestinationsList()
.equals(other.getConsumerDestinationsList());
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (getConsumerDestinationsCount() > 0) {
hash = (37 * hash) + CONSUMER_DESTINATIONS_FIELD_NUMBER;
hash = (53 * hash) + getConsumerDestinationsList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static nl.topicus.jdbc.shaded.com.google.api.Billing parseFrom(
java.nio.ByteBuffer data)
throws nl.topicus.jdbc.shaded.com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static nl.topicus.jdbc.shaded.com.google.api.Billing parseFrom(
java.nio.ByteBuffer data,
nl.topicus.jdbc.shaded.com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws nl.topicus.jdbc.shaded.com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static nl.topicus.jdbc.shaded.com.google.api.Billing parseFrom(
nl.topicus.jdbc.shaded.com.google.protobuf.ByteString data)
throws nl.topicus.jdbc.shaded.com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static nl.topicus.jdbc.shaded.com.google.api.Billing parseFrom(
nl.topicus.jdbc.shaded.com.google.protobuf.ByteString data,
nl.topicus.jdbc.shaded.com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws nl.topicus.jdbc.shaded.com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static nl.topicus.jdbc.shaded.com.google.api.Billing parseFrom(byte[] data)
throws nl.topicus.jdbc.shaded.com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static nl.topicus.jdbc.shaded.com.google.api.Billing parseFrom(
byte[] data,
nl.topicus.jdbc.shaded.com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws nl.topicus.jdbc.shaded.com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static nl.topicus.jdbc.shaded.com.google.api.Billing parseFrom(java.io.InputStream input)
throws java.io.IOException {
return nl.topicus.jdbc.shaded.com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static nl.topicus.jdbc.shaded.com.google.api.Billing parseFrom(
java.io.InputStream input,
nl.topicus.jdbc.shaded.com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return nl.topicus.jdbc.shaded.com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static nl.topicus.jdbc.shaded.com.google.api.Billing parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return nl.topicus.jdbc.shaded.com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static nl.topicus.jdbc.shaded.com.google.api.Billing parseDelimitedFrom(
java.io.InputStream input,
nl.topicus.jdbc.shaded.com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return nl.topicus.jdbc.shaded.com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static nl.topicus.jdbc.shaded.com.google.api.Billing parseFrom(
nl.topicus.jdbc.shaded.com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return nl.topicus.jdbc.shaded.com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static nl.topicus.jdbc.shaded.com.google.api.Billing parseFrom(
nl.topicus.jdbc.shaded.com.google.protobuf.CodedInputStream input,
nl.topicus.jdbc.shaded.com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return nl.topicus.jdbc.shaded.com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(nl.topicus.jdbc.shaded.com.google.api.Billing prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
nl.topicus.jdbc.shaded.com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* Billing related configuration of the service.
* The following example shows how to configure monitored resources and metrics
* for billing:
* monitored_resources:
* - type: library.googleapis.com/branch
* labels:
* - key: /city
* description: The city where the library branch is located in.
* - key: /name
* description: The name of the branch.
* metrics:
* - name: library.googleapis.com/book/borrowed_count
* metric_kind: DELTA
* value_type: INT64
* billing:
* consumer_destinations:
* - monitored_resource: library.googleapis.com/branch
* metrics:
* - library.googleapis.com/book/borrowed_count
*
*
* Protobuf type {@code google.api.Billing}
*/
public static final class Builder extends
nl.topicus.jdbc.shaded.com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:google.api.Billing)
nl.topicus.jdbc.shaded.com.google.api.BillingOrBuilder {
public static final nl.topicus.jdbc.shaded.com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return nl.topicus.jdbc.shaded.com.google.api.BillingProto.internal_static_google_api_Billing_descriptor;
}
protected nl.topicus.jdbc.shaded.com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return nl.topicus.jdbc.shaded.com.google.api.BillingProto.internal_static_google_api_Billing_fieldAccessorTable
.ensureFieldAccessorsInitialized(
nl.topicus.jdbc.shaded.com.google.api.Billing.class, nl.topicus.jdbc.shaded.com.google.api.Billing.Builder.class);
}
// Construct using nl.topicus.jdbc.shaded.com.google.api.Billing.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
nl.topicus.jdbc.shaded.com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (nl.topicus.jdbc.shaded.com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getConsumerDestinationsFieldBuilder();
}
}
public Builder clear() {
super.clear();
if (consumerDestinationsBuilder_ == null) {
consumerDestinations_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
consumerDestinationsBuilder_.clear();
}
return this;
}
public nl.topicus.jdbc.shaded.com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return nl.topicus.jdbc.shaded.com.google.api.BillingProto.internal_static_google_api_Billing_descriptor;
}
public nl.topicus.jdbc.shaded.com.google.api.Billing getDefaultInstanceForType() {
return nl.topicus.jdbc.shaded.com.google.api.Billing.getDefaultInstance();
}
public nl.topicus.jdbc.shaded.com.google.api.Billing build() {
nl.topicus.jdbc.shaded.com.google.api.Billing result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public nl.topicus.jdbc.shaded.com.google.api.Billing buildPartial() {
nl.topicus.jdbc.shaded.com.google.api.Billing result = new nl.topicus.jdbc.shaded.com.google.api.Billing(this);
int from_bitField0_ = bitField0_;
if (consumerDestinationsBuilder_ == null) {
if (((bitField0_ & 0x00000001) == 0x00000001)) {
consumerDestinations_ = java.util.Collections.unmodifiableList(consumerDestinations_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.consumerDestinations_ = consumerDestinations_;
} else {
result.consumerDestinations_ = consumerDestinationsBuilder_.build();
}
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
nl.topicus.jdbc.shaded.com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
nl.topicus.jdbc.shaded.com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
nl.topicus.jdbc.shaded.com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
nl.topicus.jdbc.shaded.com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
nl.topicus.jdbc.shaded.com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(nl.topicus.jdbc.shaded.com.google.protobuf.Message other) {
if (other instanceof nl.topicus.jdbc.shaded.com.google.api.Billing) {
return mergeFrom((nl.topicus.jdbc.shaded.com.google.api.Billing)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(nl.topicus.jdbc.shaded.com.google.api.Billing other) {
if (other == nl.topicus.jdbc.shaded.com.google.api.Billing.getDefaultInstance()) return this;
if (consumerDestinationsBuilder_ == null) {
if (!other.consumerDestinations_.isEmpty()) {
if (consumerDestinations_.isEmpty()) {
consumerDestinations_ = other.consumerDestinations_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureConsumerDestinationsIsMutable();
consumerDestinations_.addAll(other.consumerDestinations_);
}
onChanged();
}
} else {
if (!other.consumerDestinations_.isEmpty()) {
if (consumerDestinationsBuilder_.isEmpty()) {
consumerDestinationsBuilder_.dispose();
consumerDestinationsBuilder_ = null;
consumerDestinations_ = other.consumerDestinations_;
bitField0_ = (bitField0_ & ~0x00000001);
consumerDestinationsBuilder_ =
nl.topicus.jdbc.shaded.com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getConsumerDestinationsFieldBuilder() : null;
} else {
consumerDestinationsBuilder_.addAllMessages(other.consumerDestinations_);
}
}
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
nl.topicus.jdbc.shaded.com.google.protobuf.CodedInputStream input,
nl.topicus.jdbc.shaded.com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
nl.topicus.jdbc.shaded.com.google.api.Billing parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (nl.topicus.jdbc.shaded.com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (nl.topicus.jdbc.shaded.com.google.api.Billing) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.util.List consumerDestinations_ =
java.util.Collections.emptyList();
private void ensureConsumerDestinationsIsMutable() {
if (!((bitField0_ & 0x00000001) == 0x00000001)) {
consumerDestinations_ = new java.util.ArrayList(consumerDestinations_);
bitField0_ |= 0x00000001;
}
}
private nl.topicus.jdbc.shaded.com.google.protobuf.RepeatedFieldBuilderV3<
nl.topicus.jdbc.shaded.com.google.api.Billing.BillingDestination, nl.topicus.jdbc.shaded.com.google.api.Billing.BillingDestination.Builder, nl.topicus.jdbc.shaded.com.google.api.Billing.BillingDestinationOrBuilder> consumerDestinationsBuilder_;
/**
*
* Billing configurations for sending metrics to the consumer project.
* There can be multiple consumer destinations per service, each one must have
* a different monitored resource type. A metric can be used in at most
* one consumer destination.
*
*
* repeated .google.api.Billing.BillingDestination consumer_destinations = 8;
*/
public java.util.List getConsumerDestinationsList() {
if (consumerDestinationsBuilder_ == null) {
return java.util.Collections.unmodifiableList(consumerDestinations_);
} else {
return consumerDestinationsBuilder_.getMessageList();
}
}
/**
*
* Billing configurations for sending metrics to the consumer project.
* There can be multiple consumer destinations per service, each one must have
* a different monitored resource type. A metric can be used in at most
* one consumer destination.
*
*
* repeated .google.api.Billing.BillingDestination consumer_destinations = 8;
*/
public int getConsumerDestinationsCount() {
if (consumerDestinationsBuilder_ == null) {
return consumerDestinations_.size();
} else {
return consumerDestinationsBuilder_.getCount();
}
}
/**
*
* Billing configurations for sending metrics to the consumer project.
* There can be multiple consumer destinations per service, each one must have
* a different monitored resource type. A metric can be used in at most
* one consumer destination.
*
*
* repeated .google.api.Billing.BillingDestination consumer_destinations = 8;
*/
public nl.topicus.jdbc.shaded.com.google.api.Billing.BillingDestination getConsumerDestinations(int index) {
if (consumerDestinationsBuilder_ == null) {
return consumerDestinations_.get(index);
} else {
return consumerDestinationsBuilder_.getMessage(index);
}
}
/**
*
* Billing configurations for sending metrics to the consumer project.
* There can be multiple consumer destinations per service, each one must have
* a different monitored resource type. A metric can be used in at most
* one consumer destination.
*
*
* repeated .google.api.Billing.BillingDestination consumer_destinations = 8;
*/
public Builder setConsumerDestinations(
int index, nl.topicus.jdbc.shaded.com.google.api.Billing.BillingDestination value) {
if (consumerDestinationsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureConsumerDestinationsIsMutable();
consumerDestinations_.set(index, value);
onChanged();
} else {
consumerDestinationsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Billing configurations for sending metrics to the consumer project.
* There can be multiple consumer destinations per service, each one must have
* a different monitored resource type. A metric can be used in at most
* one consumer destination.
*
*
* repeated .google.api.Billing.BillingDestination consumer_destinations = 8;
*/
public Builder setConsumerDestinations(
int index, nl.topicus.jdbc.shaded.com.google.api.Billing.BillingDestination.Builder builderForValue) {
if (consumerDestinationsBuilder_ == null) {
ensureConsumerDestinationsIsMutable();
consumerDestinations_.set(index, builderForValue.build());
onChanged();
} else {
consumerDestinationsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Billing configurations for sending metrics to the consumer project.
* There can be multiple consumer destinations per service, each one must have
* a different monitored resource type. A metric can be used in at most
* one consumer destination.
*
*
* repeated .google.api.Billing.BillingDestination consumer_destinations = 8;
*/
public Builder addConsumerDestinations(nl.topicus.jdbc.shaded.com.google.api.Billing.BillingDestination value) {
if (consumerDestinationsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureConsumerDestinationsIsMutable();
consumerDestinations_.add(value);
onChanged();
} else {
consumerDestinationsBuilder_.addMessage(value);
}
return this;
}
/**
*
* Billing configurations for sending metrics to the consumer project.
* There can be multiple consumer destinations per service, each one must have
* a different monitored resource type. A metric can be used in at most
* one consumer destination.
*
*
* repeated .google.api.Billing.BillingDestination consumer_destinations = 8;
*/
public Builder addConsumerDestinations(
int index, nl.topicus.jdbc.shaded.com.google.api.Billing.BillingDestination value) {
if (consumerDestinationsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureConsumerDestinationsIsMutable();
consumerDestinations_.add(index, value);
onChanged();
} else {
consumerDestinationsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Billing configurations for sending metrics to the consumer project.
* There can be multiple consumer destinations per service, each one must have
* a different monitored resource type. A metric can be used in at most
* one consumer destination.
*
*
* repeated .google.api.Billing.BillingDestination consumer_destinations = 8;
*/
public Builder addConsumerDestinations(
nl.topicus.jdbc.shaded.com.google.api.Billing.BillingDestination.Builder builderForValue) {
if (consumerDestinationsBuilder_ == null) {
ensureConsumerDestinationsIsMutable();
consumerDestinations_.add(builderForValue.build());
onChanged();
} else {
consumerDestinationsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Billing configurations for sending metrics to the consumer project.
* There can be multiple consumer destinations per service, each one must have
* a different monitored resource type. A metric can be used in at most
* one consumer destination.
*
*
* repeated .google.api.Billing.BillingDestination consumer_destinations = 8;
*/
public Builder addConsumerDestinations(
int index, nl.topicus.jdbc.shaded.com.google.api.Billing.BillingDestination.Builder builderForValue) {
if (consumerDestinationsBuilder_ == null) {
ensureConsumerDestinationsIsMutable();
consumerDestinations_.add(index, builderForValue.build());
onChanged();
} else {
consumerDestinationsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Billing configurations for sending metrics to the consumer project.
* There can be multiple consumer destinations per service, each one must have
* a different monitored resource type. A metric can be used in at most
* one consumer destination.
*
*
* repeated .google.api.Billing.BillingDestination consumer_destinations = 8;
*/
public Builder addAllConsumerDestinations(
java.lang.Iterable extends nl.topicus.jdbc.shaded.com.google.api.Billing.BillingDestination> values) {
if (consumerDestinationsBuilder_ == null) {
ensureConsumerDestinationsIsMutable();
nl.topicus.jdbc.shaded.com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, consumerDestinations_);
onChanged();
} else {
consumerDestinationsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Billing configurations for sending metrics to the consumer project.
* There can be multiple consumer destinations per service, each one must have
* a different monitored resource type. A metric can be used in at most
* one consumer destination.
*
*
* repeated .google.api.Billing.BillingDestination consumer_destinations = 8;
*/
public Builder clearConsumerDestinations() {
if (consumerDestinationsBuilder_ == null) {
consumerDestinations_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
consumerDestinationsBuilder_.clear();
}
return this;
}
/**
*
* Billing configurations for sending metrics to the consumer project.
* There can be multiple consumer destinations per service, each one must have
* a different monitored resource type. A metric can be used in at most
* one consumer destination.
*
*
* repeated .google.api.Billing.BillingDestination consumer_destinations = 8;
*/
public Builder removeConsumerDestinations(int index) {
if (consumerDestinationsBuilder_ == null) {
ensureConsumerDestinationsIsMutable();
consumerDestinations_.remove(index);
onChanged();
} else {
consumerDestinationsBuilder_.remove(index);
}
return this;
}
/**
*
* Billing configurations for sending metrics to the consumer project.
* There can be multiple consumer destinations per service, each one must have
* a different monitored resource type. A metric can be used in at most
* one consumer destination.
*
*
* repeated .google.api.Billing.BillingDestination consumer_destinations = 8;
*/
public nl.topicus.jdbc.shaded.com.google.api.Billing.BillingDestination.Builder getConsumerDestinationsBuilder(
int index) {
return getConsumerDestinationsFieldBuilder().getBuilder(index);
}
/**
*
* Billing configurations for sending metrics to the consumer project.
* There can be multiple consumer destinations per service, each one must have
* a different monitored resource type. A metric can be used in at most
* one consumer destination.
*
*
* repeated .google.api.Billing.BillingDestination consumer_destinations = 8;
*/
public nl.topicus.jdbc.shaded.com.google.api.Billing.BillingDestinationOrBuilder getConsumerDestinationsOrBuilder(
int index) {
if (consumerDestinationsBuilder_ == null) {
return consumerDestinations_.get(index); } else {
return consumerDestinationsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Billing configurations for sending metrics to the consumer project.
* There can be multiple consumer destinations per service, each one must have
* a different monitored resource type. A metric can be used in at most
* one consumer destination.
*
*
* repeated .google.api.Billing.BillingDestination consumer_destinations = 8;
*/
public java.util.List extends nl.topicus.jdbc.shaded.com.google.api.Billing.BillingDestinationOrBuilder>
getConsumerDestinationsOrBuilderList() {
if (consumerDestinationsBuilder_ != null) {
return consumerDestinationsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(consumerDestinations_);
}
}
/**
*
* Billing configurations for sending metrics to the consumer project.
* There can be multiple consumer destinations per service, each one must have
* a different monitored resource type. A metric can be used in at most
* one consumer destination.
*
*
* repeated .google.api.Billing.BillingDestination consumer_destinations = 8;
*/
public nl.topicus.jdbc.shaded.com.google.api.Billing.BillingDestination.Builder addConsumerDestinationsBuilder() {
return getConsumerDestinationsFieldBuilder().addBuilder(
nl.topicus.jdbc.shaded.com.google.api.Billing.BillingDestination.getDefaultInstance());
}
/**
*
* Billing configurations for sending metrics to the consumer project.
* There can be multiple consumer destinations per service, each one must have
* a different monitored resource type. A metric can be used in at most
* one consumer destination.
*
*
* repeated .google.api.Billing.BillingDestination consumer_destinations = 8;
*/
public nl.topicus.jdbc.shaded.com.google.api.Billing.BillingDestination.Builder addConsumerDestinationsBuilder(
int index) {
return getConsumerDestinationsFieldBuilder().addBuilder(
index, nl.topicus.jdbc.shaded.com.google.api.Billing.BillingDestination.getDefaultInstance());
}
/**
*
* Billing configurations for sending metrics to the consumer project.
* There can be multiple consumer destinations per service, each one must have
* a different monitored resource type. A metric can be used in at most
* one consumer destination.
*
*
* repeated .google.api.Billing.BillingDestination consumer_destinations = 8;
*/
public java.util.List
getConsumerDestinationsBuilderList() {
return getConsumerDestinationsFieldBuilder().getBuilderList();
}
private nl.topicus.jdbc.shaded.com.google.protobuf.RepeatedFieldBuilderV3<
nl.topicus.jdbc.shaded.com.google.api.Billing.BillingDestination, nl.topicus.jdbc.shaded.com.google.api.Billing.BillingDestination.Builder, nl.topicus.jdbc.shaded.com.google.api.Billing.BillingDestinationOrBuilder>
getConsumerDestinationsFieldBuilder() {
if (consumerDestinationsBuilder_ == null) {
consumerDestinationsBuilder_ = new nl.topicus.jdbc.shaded.com.google.protobuf.RepeatedFieldBuilderV3<
nl.topicus.jdbc.shaded.com.google.api.Billing.BillingDestination, nl.topicus.jdbc.shaded.com.google.api.Billing.BillingDestination.Builder, nl.topicus.jdbc.shaded.com.google.api.Billing.BillingDestinationOrBuilder>(
consumerDestinations_,
((bitField0_ & 0x00000001) == 0x00000001),
getParentForChildren(),
isClean());
consumerDestinations_ = null;
}
return consumerDestinationsBuilder_;
}
public final Builder setUnknownFields(
final nl.topicus.jdbc.shaded.com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
}
public final Builder mergeUnknownFields(
final nl.topicus.jdbc.shaded.com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.api.Billing)
}
// @@protoc_insertion_point(class_scope:google.api.Billing)
private static final nl.topicus.jdbc.shaded.com.google.api.Billing DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new nl.topicus.jdbc.shaded.com.google.api.Billing();
}
public static nl.topicus.jdbc.shaded.com.google.api.Billing getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final nl.topicus.jdbc.shaded.com.google.protobuf.Parser
PARSER = new nl.topicus.jdbc.shaded.com.google.protobuf.AbstractParser() {
public Billing parsePartialFrom(
nl.topicus.jdbc.shaded.com.google.protobuf.CodedInputStream input,
nl.topicus.jdbc.shaded.com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws nl.topicus.jdbc.shaded.com.google.protobuf.InvalidProtocolBufferException {
return new Billing(input, extensionRegistry);
}
};
public static nl.topicus.jdbc.shaded.com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public nl.topicus.jdbc.shaded.com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public nl.topicus.jdbc.shaded.com.google.api.Billing getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}