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

com.google.api.Monitoring Maven / Gradle / Ivy

There is a newer version: 0.0.6
Show newest version
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/api/monitoring.proto

package com.google.api;

/**
 * Protobuf type {@code google.api.Monitoring}
 *
 * 
 * Monitoring configuration of the service.
 * The example below shows how to configure monitored resources and metrics
 * for monitoring. In the example, a monitored resource and two metrics are
 * defined. The `library.googleapis.com/book/returned_count` metric is sent
 * to both producer and consumer projects, whereas the
 * `library.googleapis.com/book/overdue_count` metric is only sent to the
 * consumer project.
 *     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/returned_count
 *       metric_kind: DELTA
 *       value_type: INT64
 *       labels:
 *       - key: /customer_id
 *     - name: library.googleapis.com/book/overdue_count
 *       metric_kind: GAUGE
 *       value_type: INT64
 *       labels:
 *       - key: /customer_id
 *     monitoring:
 *       producer_destinations:
 *       - monitored_resource: library.googleapis.com/branch
 *         metrics:
 *         - library.googleapis.com/book/returned_count
 *       consumer_destinations:
 *       - monitored_resource: library.googleapis.com/branch
 *         metrics:
 *         - library.googleapis.com/book/returned_count
 *         - library.googleapis.com/book/overdue_count
 * 
*/ public final class Monitoring extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.api.Monitoring) MonitoringOrBuilder { // Use Monitoring.newBuilder() to construct. private Monitoring(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private Monitoring() { producerDestinations_ = java.util.Collections.emptyList(); consumerDestinations_ = java.util.Collections.emptyList(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private Monitoring( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) { this(); int mutable_bitField0_ = 0; try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; default: { if (!input.skipField(tag)) { done = true; } break; } case 10: { if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { producerDestinations_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } producerDestinations_.add(input.readMessage(com.google.api.Monitoring.MonitoringDestination.parser(), extensionRegistry)); break; } case 18: { if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { consumerDestinations_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000002; } consumerDestinations_.add(input.readMessage(com.google.api.Monitoring.MonitoringDestination.parser(), extensionRegistry)); break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw new RuntimeException(e.setUnfinishedMessage(this)); } catch (java.io.IOException e) { throw new RuntimeException( new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this)); } finally { if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { producerDestinations_ = java.util.Collections.unmodifiableList(producerDestinations_); } if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { consumerDestinations_ = java.util.Collections.unmodifiableList(consumerDestinations_); } makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.api.MonitoringProto.internal_static_google_api_Monitoring_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.api.MonitoringProto.internal_static_google_api_Monitoring_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.api.Monitoring.class, com.google.api.Monitoring.Builder.class); } public interface MonitoringDestinationOrBuilder extends // @@protoc_insertion_point(interface_extends:google.api.Monitoring.MonitoringDestination) com.google.protobuf.MessageOrBuilder { /** * optional string monitored_resource = 1; * *
     * The monitored resource type. The type must be defined in
     * [Service.monitored_resources][google.api.Service.monitored_resources] section.
     * 
*/ java.lang.String getMonitoredResource(); /** * optional string monitored_resource = 1; * *
     * The monitored resource type. The type must be defined in
     * [Service.monitored_resources][google.api.Service.monitored_resources] section.
     * 
*/ com.google.protobuf.ByteString getMonitoredResourceBytes(); /** * repeated string metrics = 2; * *
     * Names of the metrics to report to this monitoring destination.
     * Each name must be defined in [Service.metrics][google.api.Service.metrics] section.
     * 
*/ com.google.protobuf.ProtocolStringList getMetricsList(); /** * repeated string metrics = 2; * *
     * Names of the metrics to report to this monitoring destination.
     * Each name must be defined in [Service.metrics][google.api.Service.metrics] section.
     * 
*/ int getMetricsCount(); /** * repeated string metrics = 2; * *
     * Names of the metrics to report to this monitoring destination.
     * Each name must be defined in [Service.metrics][google.api.Service.metrics] section.
     * 
*/ java.lang.String getMetrics(int index); /** * repeated string metrics = 2; * *
     * Names of the metrics to report to this monitoring destination.
     * Each name must be defined in [Service.metrics][google.api.Service.metrics] section.
     * 
*/ com.google.protobuf.ByteString getMetricsBytes(int index); } /** * Protobuf type {@code google.api.Monitoring.MonitoringDestination} * *
   * Configuration of a specific monitoring destination (the producer project
   * or the consumer project).
   * 
*/ public static final class MonitoringDestination extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.api.Monitoring.MonitoringDestination) MonitoringDestinationOrBuilder { // Use MonitoringDestination.newBuilder() to construct. private MonitoringDestination(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private MonitoringDestination() { monitoredResource_ = ""; metrics_ = com.google.protobuf.LazyStringArrayList.EMPTY; } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private MonitoringDestination( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) { this(); int mutable_bitField0_ = 0; try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; default: { if (!input.skipField(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 com.google.protobuf.LazyStringArrayList(); mutable_bitField0_ |= 0x00000002; } metrics_.add(s); break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw new RuntimeException(e.setUnfinishedMessage(this)); } catch (java.io.IOException e) { throw new RuntimeException( new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this)); } finally { if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { metrics_ = metrics_.getUnmodifiableView(); } makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.api.MonitoringProto.internal_static_google_api_Monitoring_MonitoringDestination_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.api.MonitoringProto.internal_static_google_api_Monitoring_MonitoringDestination_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.api.Monitoring.MonitoringDestination.class, com.google.api.Monitoring.MonitoringDestination.Builder.class); } private int bitField0_; public static final int MONITORED_RESOURCE_FIELD_NUMBER = 1; private volatile java.lang.Object monitoredResource_; /** * optional string monitored_resource = 1; * *
     * The monitored resource type. The type must be defined in
     * [Service.monitored_resources][google.api.Service.monitored_resources] section.
     * 
*/ public java.lang.String getMonitoredResource() { java.lang.Object ref = monitoredResource_; 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(); monitoredResource_ = s; return s; } } /** * optional string monitored_resource = 1; * *
     * The monitored resource type. The type must be defined in
     * [Service.monitored_resources][google.api.Service.monitored_resources] section.
     * 
*/ public com.google.protobuf.ByteString getMonitoredResourceBytes() { java.lang.Object ref = monitoredResource_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); monitoredResource_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int METRICS_FIELD_NUMBER = 2; private com.google.protobuf.LazyStringList metrics_; /** * repeated string metrics = 2; * *
     * Names of the metrics to report to this monitoring destination.
     * Each name must be defined in [Service.metrics][google.api.Service.metrics] section.
     * 
*/ public com.google.protobuf.ProtocolStringList getMetricsList() { return metrics_; } /** * repeated string metrics = 2; * *
     * Names of the metrics to report to this monitoring destination.
     * Each name must be defined in [Service.metrics][google.api.Service.metrics] section.
     * 
*/ public int getMetricsCount() { return metrics_.size(); } /** * repeated string metrics = 2; * *
     * Names of the metrics to report to this monitoring destination.
     * Each name must be defined in [Service.metrics][google.api.Service.metrics] section.
     * 
*/ public java.lang.String getMetrics(int index) { return metrics_.get(index); } /** * repeated string metrics = 2; * *
     * Names of the metrics to report to this monitoring destination.
     * Each name must be defined in [Service.metrics][google.api.Service.metrics] section.
     * 
*/ public 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(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getMonitoredResourceBytes().isEmpty()) { com.google.protobuf.GeneratedMessage.writeString(output, 1, monitoredResource_); } for (int i = 0; i < metrics_.size(); i++) { com.google.protobuf.GeneratedMessage.writeString(output, 2, metrics_.getRaw(i)); } } public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getMonitoredResourceBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessage.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(); } memoizedSize = size; return size; } private static final long serialVersionUID = 0L; public static com.google.api.Monitoring.MonitoringDestination parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.api.Monitoring.MonitoringDestination 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.api.Monitoring.MonitoringDestination parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.api.Monitoring.MonitoringDestination parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.api.Monitoring.MonitoringDestination parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.google.api.Monitoring.MonitoringDestination parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static com.google.api.Monitoring.MonitoringDestination parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static com.google.api.Monitoring.MonitoringDestination parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.google.api.Monitoring.MonitoringDestination parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.google.api.Monitoring.MonitoringDestination parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(com.google.api.Monitoring.MonitoringDestination 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( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code google.api.Monitoring.MonitoringDestination} * *
     * Configuration of a specific monitoring destination (the producer project
     * or the consumer project).
     * 
*/ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.api.Monitoring.MonitoringDestination) com.google.api.Monitoring.MonitoringDestinationOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.api.MonitoringProto.internal_static_google_api_Monitoring_MonitoringDestination_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.api.MonitoringProto.internal_static_google_api_Monitoring_MonitoringDestination_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.api.Monitoring.MonitoringDestination.class, com.google.api.Monitoring.MonitoringDestination.Builder.class); } // Construct using com.google.api.Monitoring.MonitoringDestination.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } public Builder clear() { super.clear(); monitoredResource_ = ""; metrics_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000002); return this; } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.api.MonitoringProto.internal_static_google_api_Monitoring_MonitoringDestination_descriptor; } public com.google.api.Monitoring.MonitoringDestination getDefaultInstanceForType() { return com.google.api.Monitoring.MonitoringDestination.getDefaultInstance(); } public com.google.api.Monitoring.MonitoringDestination build() { com.google.api.Monitoring.MonitoringDestination result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public com.google.api.Monitoring.MonitoringDestination buildPartial() { com.google.api.Monitoring.MonitoringDestination result = new com.google.api.Monitoring.MonitoringDestination(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 mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.api.Monitoring.MonitoringDestination) { return mergeFrom((com.google.api.Monitoring.MonitoringDestination)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.api.Monitoring.MonitoringDestination other) { if (other == com.google.api.Monitoring.MonitoringDestination.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(); } onChanged(); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.google.api.Monitoring.MonitoringDestination parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.google.api.Monitoring.MonitoringDestination) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private java.lang.Object monitoredResource_ = ""; /** * optional string monitored_resource = 1; * *
       * The monitored resource type. The type must be defined in
       * [Service.monitored_resources][google.api.Service.monitored_resources] section.
       * 
*/ public java.lang.String getMonitoredResource() { java.lang.Object ref = monitoredResource_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); monitoredResource_ = s; return s; } else { return (java.lang.String) ref; } } /** * optional string monitored_resource = 1; * *
       * The monitored resource type. The type must be defined in
       * [Service.monitored_resources][google.api.Service.monitored_resources] section.
       * 
*/ public com.google.protobuf.ByteString getMonitoredResourceBytes() { java.lang.Object ref = monitoredResource_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); monitoredResource_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * optional string monitored_resource = 1; * *
       * The monitored resource type. The type must be defined in
       * [Service.monitored_resources][google.api.Service.monitored_resources] section.
       * 
*/ public Builder setMonitoredResource( java.lang.String value) { if (value == null) { throw new NullPointerException(); } monitoredResource_ = value; onChanged(); return this; } /** * optional string monitored_resource = 1; * *
       * The monitored resource type. The type must be defined in
       * [Service.monitored_resources][google.api.Service.monitored_resources] section.
       * 
*/ public Builder clearMonitoredResource() { monitoredResource_ = getDefaultInstance().getMonitoredResource(); onChanged(); return this; } /** * optional string monitored_resource = 1; * *
       * The monitored resource type. The type must be defined in
       * [Service.monitored_resources][google.api.Service.monitored_resources] section.
       * 
*/ public Builder setMonitoredResourceBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); monitoredResource_ = value; onChanged(); return this; } private com.google.protobuf.LazyStringList metrics_ = com.google.protobuf.LazyStringArrayList.EMPTY; private void ensureMetricsIsMutable() { if (!((bitField0_ & 0x00000002) == 0x00000002)) { metrics_ = new com.google.protobuf.LazyStringArrayList(metrics_); bitField0_ |= 0x00000002; } } /** * repeated string metrics = 2; * *
       * Names of the metrics to report to this monitoring destination.
       * Each name must be defined in [Service.metrics][google.api.Service.metrics] section.
       * 
*/ public com.google.protobuf.ProtocolStringList getMetricsList() { return metrics_.getUnmodifiableView(); } /** * repeated string metrics = 2; * *
       * Names of the metrics to report to this monitoring destination.
       * Each name must be defined in [Service.metrics][google.api.Service.metrics] section.
       * 
*/ public int getMetricsCount() { return metrics_.size(); } /** * repeated string metrics = 2; * *
       * Names of the metrics to report to this monitoring destination.
       * Each name must be defined in [Service.metrics][google.api.Service.metrics] section.
       * 
*/ public java.lang.String getMetrics(int index) { return metrics_.get(index); } /** * repeated string metrics = 2; * *
       * Names of the metrics to report to this monitoring destination.
       * Each name must be defined in [Service.metrics][google.api.Service.metrics] section.
       * 
*/ public com.google.protobuf.ByteString getMetricsBytes(int index) { return metrics_.getByteString(index); } /** * repeated string metrics = 2; * *
       * Names of the metrics to report to this monitoring destination.
       * Each name must be defined in [Service.metrics][google.api.Service.metrics] section.
       * 
*/ public Builder setMetrics( int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureMetricsIsMutable(); metrics_.set(index, value); onChanged(); return this; } /** * repeated string metrics = 2; * *
       * Names of the metrics to report to this monitoring destination.
       * Each name must be defined in [Service.metrics][google.api.Service.metrics] section.
       * 
*/ public Builder addMetrics( java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureMetricsIsMutable(); metrics_.add(value); onChanged(); return this; } /** * repeated string metrics = 2; * *
       * Names of the metrics to report to this monitoring destination.
       * Each name must be defined in [Service.metrics][google.api.Service.metrics] section.
       * 
*/ public Builder addAllMetrics( java.lang.Iterable values) { ensureMetricsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, metrics_); onChanged(); return this; } /** * repeated string metrics = 2; * *
       * Names of the metrics to report to this monitoring destination.
       * Each name must be defined in [Service.metrics][google.api.Service.metrics] section.
       * 
*/ public Builder clearMetrics() { metrics_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** * repeated string metrics = 2; * *
       * Names of the metrics to report to this monitoring destination.
       * Each name must be defined in [Service.metrics][google.api.Service.metrics] section.
       * 
*/ public Builder addMetricsBytes( 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 com.google.protobuf.UnknownFieldSet unknownFields) { return this; } public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return this; } // @@protoc_insertion_point(builder_scope:google.api.Monitoring.MonitoringDestination) } // @@protoc_insertion_point(class_scope:google.api.Monitoring.MonitoringDestination) private static final com.google.api.Monitoring.MonitoringDestination DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.api.Monitoring.MonitoringDestination(); } public static com.google.api.Monitoring.MonitoringDestination getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { public MonitoringDestination parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { try { return new MonitoringDestination(input, extensionRegistry); } catch (RuntimeException e) { if (e.getCause() instanceof com.google.protobuf.InvalidProtocolBufferException) { throw (com.google.protobuf.InvalidProtocolBufferException) e.getCause(); } throw e; } } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } public com.google.api.Monitoring.MonitoringDestination getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public static final int PRODUCER_DESTINATIONS_FIELD_NUMBER = 1; private java.util.List producerDestinations_; /** * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; * *
   * Monitoring configurations for sending metrics to the producer project.
   * There can be multiple producer destinations, each one must have a
   * different monitored resource type. A metric can be used in at most
   * one producer destination.
   * 
*/ public java.util.List getProducerDestinationsList() { return producerDestinations_; } /** * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; * *
   * Monitoring configurations for sending metrics to the producer project.
   * There can be multiple producer destinations, each one must have a
   * different monitored resource type. A metric can be used in at most
   * one producer destination.
   * 
*/ public java.util.List getProducerDestinationsOrBuilderList() { return producerDestinations_; } /** * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; * *
   * Monitoring configurations for sending metrics to the producer project.
   * There can be multiple producer destinations, each one must have a
   * different monitored resource type. A metric can be used in at most
   * one producer destination.
   * 
*/ public int getProducerDestinationsCount() { return producerDestinations_.size(); } /** * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; * *
   * Monitoring configurations for sending metrics to the producer project.
   * There can be multiple producer destinations, each one must have a
   * different monitored resource type. A metric can be used in at most
   * one producer destination.
   * 
*/ public com.google.api.Monitoring.MonitoringDestination getProducerDestinations(int index) { return producerDestinations_.get(index); } /** * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; * *
   * Monitoring configurations for sending metrics to the producer project.
   * There can be multiple producer destinations, each one must have a
   * different monitored resource type. A metric can be used in at most
   * one producer destination.
   * 
*/ public com.google.api.Monitoring.MonitoringDestinationOrBuilder getProducerDestinationsOrBuilder( int index) { return producerDestinations_.get(index); } public static final int CONSUMER_DESTINATIONS_FIELD_NUMBER = 2; private java.util.List consumerDestinations_; /** * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; * *
   * Monitoring configurations for sending metrics to the consumer project.
   * There can be multiple consumer destinations, each one must have a
   * different monitored resource type. A metric can be used in at most
   * one consumer destination.
   * 
*/ public java.util.List getConsumerDestinationsList() { return consumerDestinations_; } /** * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; * *
   * Monitoring configurations for sending metrics to the consumer project.
   * There can be multiple consumer destinations, each one must have a
   * different monitored resource type. A metric can be used in at most
   * one consumer destination.
   * 
*/ public java.util.List getConsumerDestinationsOrBuilderList() { return consumerDestinations_; } /** * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; * *
   * Monitoring configurations for sending metrics to the consumer project.
   * There can be multiple consumer destinations, each one must have a
   * different monitored resource type. A metric can be used in at most
   * one consumer destination.
   * 
*/ public int getConsumerDestinationsCount() { return consumerDestinations_.size(); } /** * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; * *
   * Monitoring configurations for sending metrics to the consumer project.
   * There can be multiple consumer destinations, each one must have a
   * different monitored resource type. A metric can be used in at most
   * one consumer destination.
   * 
*/ public com.google.api.Monitoring.MonitoringDestination getConsumerDestinations(int index) { return consumerDestinations_.get(index); } /** * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; * *
   * Monitoring configurations for sending metrics to the consumer project.
   * There can be multiple consumer destinations, each one must have a
   * different monitored resource type. A metric can be used in at most
   * one consumer destination.
   * 
*/ public com.google.api.Monitoring.MonitoringDestinationOrBuilder 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(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { for (int i = 0; i < producerDestinations_.size(); i++) { output.writeMessage(1, producerDestinations_.get(i)); } for (int i = 0; i < consumerDestinations_.size(); i++) { output.writeMessage(2, consumerDestinations_.get(i)); } } public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; for (int i = 0; i < producerDestinations_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, producerDestinations_.get(i)); } for (int i = 0; i < consumerDestinations_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, consumerDestinations_.get(i)); } memoizedSize = size; return size; } private static final long serialVersionUID = 0L; public static com.google.api.Monitoring parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.api.Monitoring 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.api.Monitoring parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.api.Monitoring parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.api.Monitoring parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.google.api.Monitoring parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static com.google.api.Monitoring parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static com.google.api.Monitoring parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.google.api.Monitoring parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.google.api.Monitoring parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(com.google.api.Monitoring 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( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code google.api.Monitoring} * *
   * Monitoring configuration of the service.
   * The example below shows how to configure monitored resources and metrics
   * for monitoring. In the example, a monitored resource and two metrics are
   * defined. The `library.googleapis.com/book/returned_count` metric is sent
   * to both producer and consumer projects, whereas the
   * `library.googleapis.com/book/overdue_count` metric is only sent to the
   * consumer project.
   *     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/returned_count
   *       metric_kind: DELTA
   *       value_type: INT64
   *       labels:
   *       - key: /customer_id
   *     - name: library.googleapis.com/book/overdue_count
   *       metric_kind: GAUGE
   *       value_type: INT64
   *       labels:
   *       - key: /customer_id
   *     monitoring:
   *       producer_destinations:
   *       - monitored_resource: library.googleapis.com/branch
   *         metrics:
   *         - library.googleapis.com/book/returned_count
   *       consumer_destinations:
   *       - monitored_resource: library.googleapis.com/branch
   *         metrics:
   *         - library.googleapis.com/book/returned_count
   *         - library.googleapis.com/book/overdue_count
   * 
*/ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.api.Monitoring) com.google.api.MonitoringOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.api.MonitoringProto.internal_static_google_api_Monitoring_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.api.MonitoringProto.internal_static_google_api_Monitoring_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.api.Monitoring.class, com.google.api.Monitoring.Builder.class); } // Construct using com.google.api.Monitoring.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { getProducerDestinationsFieldBuilder(); getConsumerDestinationsFieldBuilder(); } } public Builder clear() { super.clear(); if (producerDestinationsBuilder_ == null) { producerDestinations_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); } else { producerDestinationsBuilder_.clear(); } if (consumerDestinationsBuilder_ == null) { consumerDestinations_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); } else { consumerDestinationsBuilder_.clear(); } return this; } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.api.MonitoringProto.internal_static_google_api_Monitoring_descriptor; } public com.google.api.Monitoring getDefaultInstanceForType() { return com.google.api.Monitoring.getDefaultInstance(); } public com.google.api.Monitoring build() { com.google.api.Monitoring result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public com.google.api.Monitoring buildPartial() { com.google.api.Monitoring result = new com.google.api.Monitoring(this); int from_bitField0_ = bitField0_; if (producerDestinationsBuilder_ == null) { if (((bitField0_ & 0x00000001) == 0x00000001)) { producerDestinations_ = java.util.Collections.unmodifiableList(producerDestinations_); bitField0_ = (bitField0_ & ~0x00000001); } result.producerDestinations_ = producerDestinations_; } else { result.producerDestinations_ = producerDestinationsBuilder_.build(); } if (consumerDestinationsBuilder_ == null) { if (((bitField0_ & 0x00000002) == 0x00000002)) { consumerDestinations_ = java.util.Collections.unmodifiableList(consumerDestinations_); bitField0_ = (bitField0_ & ~0x00000002); } result.consumerDestinations_ = consumerDestinations_; } else { result.consumerDestinations_ = consumerDestinationsBuilder_.build(); } onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.api.Monitoring) { return mergeFrom((com.google.api.Monitoring)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.api.Monitoring other) { if (other == com.google.api.Monitoring.getDefaultInstance()) return this; if (producerDestinationsBuilder_ == null) { if (!other.producerDestinations_.isEmpty()) { if (producerDestinations_.isEmpty()) { producerDestinations_ = other.producerDestinations_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureProducerDestinationsIsMutable(); producerDestinations_.addAll(other.producerDestinations_); } onChanged(); } } else { if (!other.producerDestinations_.isEmpty()) { if (producerDestinationsBuilder_.isEmpty()) { producerDestinationsBuilder_.dispose(); producerDestinationsBuilder_ = null; producerDestinations_ = other.producerDestinations_; bitField0_ = (bitField0_ & ~0x00000001); producerDestinationsBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getProducerDestinationsFieldBuilder() : null; } else { producerDestinationsBuilder_.addAllMessages(other.producerDestinations_); } } } if (consumerDestinationsBuilder_ == null) { if (!other.consumerDestinations_.isEmpty()) { if (consumerDestinations_.isEmpty()) { consumerDestinations_ = other.consumerDestinations_; bitField0_ = (bitField0_ & ~0x00000002); } else { ensureConsumerDestinationsIsMutable(); consumerDestinations_.addAll(other.consumerDestinations_); } onChanged(); } } else { if (!other.consumerDestinations_.isEmpty()) { if (consumerDestinationsBuilder_.isEmpty()) { consumerDestinationsBuilder_.dispose(); consumerDestinationsBuilder_ = null; consumerDestinations_ = other.consumerDestinations_; bitField0_ = (bitField0_ & ~0x00000002); consumerDestinationsBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getConsumerDestinationsFieldBuilder() : null; } else { consumerDestinationsBuilder_.addAllMessages(other.consumerDestinations_); } } } onChanged(); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.google.api.Monitoring parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.google.api.Monitoring) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private java.util.List producerDestinations_ = java.util.Collections.emptyList(); private void ensureProducerDestinationsIsMutable() { if (!((bitField0_ & 0x00000001) == 0x00000001)) { producerDestinations_ = new java.util.ArrayList(producerDestinations_); bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilder< com.google.api.Monitoring.MonitoringDestination, com.google.api.Monitoring.MonitoringDestination.Builder, com.google.api.Monitoring.MonitoringDestinationOrBuilder> producerDestinationsBuilder_; /** * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; * *
     * Monitoring configurations for sending metrics to the producer project.
     * There can be multiple producer destinations, each one must have a
     * different monitored resource type. A metric can be used in at most
     * one producer destination.
     * 
*/ public java.util.List getProducerDestinationsList() { if (producerDestinationsBuilder_ == null) { return java.util.Collections.unmodifiableList(producerDestinations_); } else { return producerDestinationsBuilder_.getMessageList(); } } /** * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; * *
     * Monitoring configurations for sending metrics to the producer project.
     * There can be multiple producer destinations, each one must have a
     * different monitored resource type. A metric can be used in at most
     * one producer destination.
     * 
*/ public int getProducerDestinationsCount() { if (producerDestinationsBuilder_ == null) { return producerDestinations_.size(); } else { return producerDestinationsBuilder_.getCount(); } } /** * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; * *
     * Monitoring configurations for sending metrics to the producer project.
     * There can be multiple producer destinations, each one must have a
     * different monitored resource type. A metric can be used in at most
     * one producer destination.
     * 
*/ public com.google.api.Monitoring.MonitoringDestination getProducerDestinations(int index) { if (producerDestinationsBuilder_ == null) { return producerDestinations_.get(index); } else { return producerDestinationsBuilder_.getMessage(index); } } /** * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; * *
     * Monitoring configurations for sending metrics to the producer project.
     * There can be multiple producer destinations, each one must have a
     * different monitored resource type. A metric can be used in at most
     * one producer destination.
     * 
*/ public Builder setProducerDestinations( int index, com.google.api.Monitoring.MonitoringDestination value) { if (producerDestinationsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureProducerDestinationsIsMutable(); producerDestinations_.set(index, value); onChanged(); } else { producerDestinationsBuilder_.setMessage(index, value); } return this; } /** * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; * *
     * Monitoring configurations for sending metrics to the producer project.
     * There can be multiple producer destinations, each one must have a
     * different monitored resource type. A metric can be used in at most
     * one producer destination.
     * 
*/ public Builder setProducerDestinations( int index, com.google.api.Monitoring.MonitoringDestination.Builder builderForValue) { if (producerDestinationsBuilder_ == null) { ensureProducerDestinationsIsMutable(); producerDestinations_.set(index, builderForValue.build()); onChanged(); } else { producerDestinationsBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; * *
     * Monitoring configurations for sending metrics to the producer project.
     * There can be multiple producer destinations, each one must have a
     * different monitored resource type. A metric can be used in at most
     * one producer destination.
     * 
*/ public Builder addProducerDestinations(com.google.api.Monitoring.MonitoringDestination value) { if (producerDestinationsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureProducerDestinationsIsMutable(); producerDestinations_.add(value); onChanged(); } else { producerDestinationsBuilder_.addMessage(value); } return this; } /** * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; * *
     * Monitoring configurations for sending metrics to the producer project.
     * There can be multiple producer destinations, each one must have a
     * different monitored resource type. A metric can be used in at most
     * one producer destination.
     * 
*/ public Builder addProducerDestinations( int index, com.google.api.Monitoring.MonitoringDestination value) { if (producerDestinationsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureProducerDestinationsIsMutable(); producerDestinations_.add(index, value); onChanged(); } else { producerDestinationsBuilder_.addMessage(index, value); } return this; } /** * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; * *
     * Monitoring configurations for sending metrics to the producer project.
     * There can be multiple producer destinations, each one must have a
     * different monitored resource type. A metric can be used in at most
     * one producer destination.
     * 
*/ public Builder addProducerDestinations( com.google.api.Monitoring.MonitoringDestination.Builder builderForValue) { if (producerDestinationsBuilder_ == null) { ensureProducerDestinationsIsMutable(); producerDestinations_.add(builderForValue.build()); onChanged(); } else { producerDestinationsBuilder_.addMessage(builderForValue.build()); } return this; } /** * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; * *
     * Monitoring configurations for sending metrics to the producer project.
     * There can be multiple producer destinations, each one must have a
     * different monitored resource type. A metric can be used in at most
     * one producer destination.
     * 
*/ public Builder addProducerDestinations( int index, com.google.api.Monitoring.MonitoringDestination.Builder builderForValue) { if (producerDestinationsBuilder_ == null) { ensureProducerDestinationsIsMutable(); producerDestinations_.add(index, builderForValue.build()); onChanged(); } else { producerDestinationsBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; * *
     * Monitoring configurations for sending metrics to the producer project.
     * There can be multiple producer destinations, each one must have a
     * different monitored resource type. A metric can be used in at most
     * one producer destination.
     * 
*/ public Builder addAllProducerDestinations( java.lang.Iterable values) { if (producerDestinationsBuilder_ == null) { ensureProducerDestinationsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, producerDestinations_); onChanged(); } else { producerDestinationsBuilder_.addAllMessages(values); } return this; } /** * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; * *
     * Monitoring configurations for sending metrics to the producer project.
     * There can be multiple producer destinations, each one must have a
     * different monitored resource type. A metric can be used in at most
     * one producer destination.
     * 
*/ public Builder clearProducerDestinations() { if (producerDestinationsBuilder_ == null) { producerDestinations_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { producerDestinationsBuilder_.clear(); } return this; } /** * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; * *
     * Monitoring configurations for sending metrics to the producer project.
     * There can be multiple producer destinations, each one must have a
     * different monitored resource type. A metric can be used in at most
     * one producer destination.
     * 
*/ public Builder removeProducerDestinations(int index) { if (producerDestinationsBuilder_ == null) { ensureProducerDestinationsIsMutable(); producerDestinations_.remove(index); onChanged(); } else { producerDestinationsBuilder_.remove(index); } return this; } /** * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; * *
     * Monitoring configurations for sending metrics to the producer project.
     * There can be multiple producer destinations, each one must have a
     * different monitored resource type. A metric can be used in at most
     * one producer destination.
     * 
*/ public com.google.api.Monitoring.MonitoringDestination.Builder getProducerDestinationsBuilder( int index) { return getProducerDestinationsFieldBuilder().getBuilder(index); } /** * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; * *
     * Monitoring configurations for sending metrics to the producer project.
     * There can be multiple producer destinations, each one must have a
     * different monitored resource type. A metric can be used in at most
     * one producer destination.
     * 
*/ public com.google.api.Monitoring.MonitoringDestinationOrBuilder getProducerDestinationsOrBuilder( int index) { if (producerDestinationsBuilder_ == null) { return producerDestinations_.get(index); } else { return producerDestinationsBuilder_.getMessageOrBuilder(index); } } /** * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; * *
     * Monitoring configurations for sending metrics to the producer project.
     * There can be multiple producer destinations, each one must have a
     * different monitored resource type. A metric can be used in at most
     * one producer destination.
     * 
*/ public java.util.List getProducerDestinationsOrBuilderList() { if (producerDestinationsBuilder_ != null) { return producerDestinationsBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(producerDestinations_); } } /** * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; * *
     * Monitoring configurations for sending metrics to the producer project.
     * There can be multiple producer destinations, each one must have a
     * different monitored resource type. A metric can be used in at most
     * one producer destination.
     * 
*/ public com.google.api.Monitoring.MonitoringDestination.Builder addProducerDestinationsBuilder() { return getProducerDestinationsFieldBuilder().addBuilder( com.google.api.Monitoring.MonitoringDestination.getDefaultInstance()); } /** * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; * *
     * Monitoring configurations for sending metrics to the producer project.
     * There can be multiple producer destinations, each one must have a
     * different monitored resource type. A metric can be used in at most
     * one producer destination.
     * 
*/ public com.google.api.Monitoring.MonitoringDestination.Builder addProducerDestinationsBuilder( int index) { return getProducerDestinationsFieldBuilder().addBuilder( index, com.google.api.Monitoring.MonitoringDestination.getDefaultInstance()); } /** * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; * *
     * Monitoring configurations for sending metrics to the producer project.
     * There can be multiple producer destinations, each one must have a
     * different monitored resource type. A metric can be used in at most
     * one producer destination.
     * 
*/ public java.util.List getProducerDestinationsBuilderList() { return getProducerDestinationsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilder< com.google.api.Monitoring.MonitoringDestination, com.google.api.Monitoring.MonitoringDestination.Builder, com.google.api.Monitoring.MonitoringDestinationOrBuilder> getProducerDestinationsFieldBuilder() { if (producerDestinationsBuilder_ == null) { producerDestinationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< com.google.api.Monitoring.MonitoringDestination, com.google.api.Monitoring.MonitoringDestination.Builder, com.google.api.Monitoring.MonitoringDestinationOrBuilder>( producerDestinations_, ((bitField0_ & 0x00000001) == 0x00000001), getParentForChildren(), isClean()); producerDestinations_ = null; } return producerDestinationsBuilder_; } private java.util.List consumerDestinations_ = java.util.Collections.emptyList(); private void ensureConsumerDestinationsIsMutable() { if (!((bitField0_ & 0x00000002) == 0x00000002)) { consumerDestinations_ = new java.util.ArrayList(consumerDestinations_); bitField0_ |= 0x00000002; } } private com.google.protobuf.RepeatedFieldBuilder< com.google.api.Monitoring.MonitoringDestination, com.google.api.Monitoring.MonitoringDestination.Builder, com.google.api.Monitoring.MonitoringDestinationOrBuilder> consumerDestinationsBuilder_; /** * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; * *
     * Monitoring configurations for sending metrics to the consumer project.
     * There can be multiple consumer destinations, each one must have a
     * different monitored resource type. A metric can be used in at most
     * one consumer destination.
     * 
*/ public java.util.List getConsumerDestinationsList() { if (consumerDestinationsBuilder_ == null) { return java.util.Collections.unmodifiableList(consumerDestinations_); } else { return consumerDestinationsBuilder_.getMessageList(); } } /** * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; * *
     * Monitoring configurations for sending metrics to the consumer project.
     * There can be multiple consumer destinations, each one must have a
     * different monitored resource type. A metric can be used in at most
     * one consumer destination.
     * 
*/ public int getConsumerDestinationsCount() { if (consumerDestinationsBuilder_ == null) { return consumerDestinations_.size(); } else { return consumerDestinationsBuilder_.getCount(); } } /** * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; * *
     * Monitoring configurations for sending metrics to the consumer project.
     * There can be multiple consumer destinations, each one must have a
     * different monitored resource type. A metric can be used in at most
     * one consumer destination.
     * 
*/ public com.google.api.Monitoring.MonitoringDestination getConsumerDestinations(int index) { if (consumerDestinationsBuilder_ == null) { return consumerDestinations_.get(index); } else { return consumerDestinationsBuilder_.getMessage(index); } } /** * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; * *
     * Monitoring configurations for sending metrics to the consumer project.
     * There can be multiple consumer destinations, each one must have a
     * different monitored resource type. A metric can be used in at most
     * one consumer destination.
     * 
*/ public Builder setConsumerDestinations( int index, com.google.api.Monitoring.MonitoringDestination value) { if (consumerDestinationsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureConsumerDestinationsIsMutable(); consumerDestinations_.set(index, value); onChanged(); } else { consumerDestinationsBuilder_.setMessage(index, value); } return this; } /** * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; * *
     * Monitoring configurations for sending metrics to the consumer project.
     * There can be multiple consumer destinations, each one must have a
     * different monitored resource type. A metric can be used in at most
     * one consumer destination.
     * 
*/ public Builder setConsumerDestinations( int index, com.google.api.Monitoring.MonitoringDestination.Builder builderForValue) { if (consumerDestinationsBuilder_ == null) { ensureConsumerDestinationsIsMutable(); consumerDestinations_.set(index, builderForValue.build()); onChanged(); } else { consumerDestinationsBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; * *
     * Monitoring configurations for sending metrics to the consumer project.
     * There can be multiple consumer destinations, each one must have a
     * different monitored resource type. A metric can be used in at most
     * one consumer destination.
     * 
*/ public Builder addConsumerDestinations(com.google.api.Monitoring.MonitoringDestination value) { if (consumerDestinationsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureConsumerDestinationsIsMutable(); consumerDestinations_.add(value); onChanged(); } else { consumerDestinationsBuilder_.addMessage(value); } return this; } /** * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; * *
     * Monitoring configurations for sending metrics to the consumer project.
     * There can be multiple consumer destinations, each one must have a
     * different monitored resource type. A metric can be used in at most
     * one consumer destination.
     * 
*/ public Builder addConsumerDestinations( int index, com.google.api.Monitoring.MonitoringDestination value) { if (consumerDestinationsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureConsumerDestinationsIsMutable(); consumerDestinations_.add(index, value); onChanged(); } else { consumerDestinationsBuilder_.addMessage(index, value); } return this; } /** * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; * *
     * Monitoring configurations for sending metrics to the consumer project.
     * There can be multiple consumer destinations, each one must have a
     * different monitored resource type. A metric can be used in at most
     * one consumer destination.
     * 
*/ public Builder addConsumerDestinations( com.google.api.Monitoring.MonitoringDestination.Builder builderForValue) { if (consumerDestinationsBuilder_ == null) { ensureConsumerDestinationsIsMutable(); consumerDestinations_.add(builderForValue.build()); onChanged(); } else { consumerDestinationsBuilder_.addMessage(builderForValue.build()); } return this; } /** * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; * *
     * Monitoring configurations for sending metrics to the consumer project.
     * There can be multiple consumer destinations, each one must have a
     * different monitored resource type. A metric can be used in at most
     * one consumer destination.
     * 
*/ public Builder addConsumerDestinations( int index, com.google.api.Monitoring.MonitoringDestination.Builder builderForValue) { if (consumerDestinationsBuilder_ == null) { ensureConsumerDestinationsIsMutable(); consumerDestinations_.add(index, builderForValue.build()); onChanged(); } else { consumerDestinationsBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; * *
     * Monitoring configurations for sending metrics to the consumer project.
     * There can be multiple consumer destinations, each one must have a
     * different monitored resource type. A metric can be used in at most
     * one consumer destination.
     * 
*/ public Builder addAllConsumerDestinations( java.lang.Iterable values) { if (consumerDestinationsBuilder_ == null) { ensureConsumerDestinationsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, consumerDestinations_); onChanged(); } else { consumerDestinationsBuilder_.addAllMessages(values); } return this; } /** * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; * *
     * Monitoring configurations for sending metrics to the consumer project.
     * There can be multiple consumer destinations, each one must have a
     * different monitored resource type. A metric can be used in at most
     * one consumer destination.
     * 
*/ public Builder clearConsumerDestinations() { if (consumerDestinationsBuilder_ == null) { consumerDestinations_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); } else { consumerDestinationsBuilder_.clear(); } return this; } /** * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; * *
     * Monitoring configurations for sending metrics to the consumer project.
     * There can be multiple consumer destinations, each one must have a
     * different monitored resource type. A metric can be used in at most
     * one consumer destination.
     * 
*/ public Builder removeConsumerDestinations(int index) { if (consumerDestinationsBuilder_ == null) { ensureConsumerDestinationsIsMutable(); consumerDestinations_.remove(index); onChanged(); } else { consumerDestinationsBuilder_.remove(index); } return this; } /** * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; * *
     * Monitoring configurations for sending metrics to the consumer project.
     * There can be multiple consumer destinations, each one must have a
     * different monitored resource type. A metric can be used in at most
     * one consumer destination.
     * 
*/ public com.google.api.Monitoring.MonitoringDestination.Builder getConsumerDestinationsBuilder( int index) { return getConsumerDestinationsFieldBuilder().getBuilder(index); } /** * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; * *
     * Monitoring configurations for sending metrics to the consumer project.
     * There can be multiple consumer destinations, each one must have a
     * different monitored resource type. A metric can be used in at most
     * one consumer destination.
     * 
*/ public com.google.api.Monitoring.MonitoringDestinationOrBuilder getConsumerDestinationsOrBuilder( int index) { if (consumerDestinationsBuilder_ == null) { return consumerDestinations_.get(index); } else { return consumerDestinationsBuilder_.getMessageOrBuilder(index); } } /** * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; * *
     * Monitoring configurations for sending metrics to the consumer project.
     * There can be multiple consumer destinations, each one must have a
     * different monitored resource type. A metric can be used in at most
     * one consumer destination.
     * 
*/ public java.util.List getConsumerDestinationsOrBuilderList() { if (consumerDestinationsBuilder_ != null) { return consumerDestinationsBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(consumerDestinations_); } } /** * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; * *
     * Monitoring configurations for sending metrics to the consumer project.
     * There can be multiple consumer destinations, each one must have a
     * different monitored resource type. A metric can be used in at most
     * one consumer destination.
     * 
*/ public com.google.api.Monitoring.MonitoringDestination.Builder addConsumerDestinationsBuilder() { return getConsumerDestinationsFieldBuilder().addBuilder( com.google.api.Monitoring.MonitoringDestination.getDefaultInstance()); } /** * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; * *
     * Monitoring configurations for sending metrics to the consumer project.
     * There can be multiple consumer destinations, each one must have a
     * different monitored resource type. A metric can be used in at most
     * one consumer destination.
     * 
*/ public com.google.api.Monitoring.MonitoringDestination.Builder addConsumerDestinationsBuilder( int index) { return getConsumerDestinationsFieldBuilder().addBuilder( index, com.google.api.Monitoring.MonitoringDestination.getDefaultInstance()); } /** * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; * *
     * Monitoring configurations for sending metrics to the consumer project.
     * There can be multiple consumer destinations, each one must have a
     * different monitored resource type. A metric can be used in at most
     * one consumer destination.
     * 
*/ public java.util.List getConsumerDestinationsBuilderList() { return getConsumerDestinationsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilder< com.google.api.Monitoring.MonitoringDestination, com.google.api.Monitoring.MonitoringDestination.Builder, com.google.api.Monitoring.MonitoringDestinationOrBuilder> getConsumerDestinationsFieldBuilder() { if (consumerDestinationsBuilder_ == null) { consumerDestinationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< com.google.api.Monitoring.MonitoringDestination, com.google.api.Monitoring.MonitoringDestination.Builder, com.google.api.Monitoring.MonitoringDestinationOrBuilder>( consumerDestinations_, ((bitField0_ & 0x00000002) == 0x00000002), getParentForChildren(), isClean()); consumerDestinations_ = null; } return consumerDestinationsBuilder_; } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return this; } public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return this; } // @@protoc_insertion_point(builder_scope:google.api.Monitoring) } // @@protoc_insertion_point(class_scope:google.api.Monitoring) private static final com.google.api.Monitoring DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.api.Monitoring(); } public static com.google.api.Monitoring getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { public Monitoring parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { try { return new Monitoring(input, extensionRegistry); } catch (RuntimeException e) { if (e.getCause() instanceof com.google.protobuf.InvalidProtocolBufferException) { throw (com.google.protobuf.InvalidProtocolBufferException) e.getCause(); } throw e; } } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } public com.google.api.Monitoring getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy