Class Monitoring

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessageV3
com.google.api.Monitoring
All Implemented Interfaces:
MonitoringOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

public final class Monitoring extends com.google.protobuf.GeneratedMessageV3 implements MonitoringOrBuilder
 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/num_overdue` metric is only sent to the
 consumer project.
     monitored_resources:
     - type: library.googleapis.com/Branch
       display_name: "Library Branch"
       description: "A branch of a library."
       launch_stage: GA
       labels:
       - key: resource_container
         description: "The Cloud container (ie. project id) for the Branch."
       - key: location
         description: "The location of the library branch."
       - key: branch_id
         description: "The id of the branch."
     metrics:
     - name: library.googleapis.com/book/returned_count
       display_name: "Books Returned"
       description: "The count of books that have been returned."
       launch_stage: GA
       metric_kind: DELTA
       value_type: INT64
       unit: "1"
       labels:
       - key: customer_id
         description: "The id of the customer."
     - name: library.googleapis.com/book/num_overdue
       display_name: "Books Overdue"
       description: "The current number of overdue books."
       launch_stage: GA
       metric_kind: GAUGE
       value_type: INT64
       unit: "1"
       labels:
       - key: customer_id
         description: "The id of the customer."
     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/num_overdue
 
Protobuf type google.api.Monitoring
See Also:
  • Field Details

    • PRODUCER_DESTINATIONS_FIELD_NUMBER

      public static final int PRODUCER_DESTINATIONS_FIELD_NUMBER
      See Also:
    • CONSUMER_DESTINATIONS_FIELD_NUMBER

      public static final int CONSUMER_DESTINATIONS_FIELD_NUMBER
      See Also:
  • Method Details

    • newInstance

      protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
      Overrides:
      newInstance in class com.google.protobuf.GeneratedMessageV3
    • getUnknownFields

      public final com.google.protobuf.UnknownFieldSet getUnknownFields()
      Specified by:
      getUnknownFields in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getUnknownFields in class com.google.protobuf.GeneratedMessageV3
    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
    • getProducerDestinationsList

      public List<Monitoring.MonitoringDestination> getProducerDestinationsList()
       Monitoring configurations for sending metrics to the producer project.
       There can be multiple producer destinations. A monitored resource type may
       appear in multiple monitoring destinations if different aggregations are
       needed for different sets of metrics associated with that monitored
       resource type. A monitored resource and metric pair may only be used once
       in the Monitoring configuration.
       
      repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1;
      Specified by:
      getProducerDestinationsList in interface MonitoringOrBuilder
    • getProducerDestinationsOrBuilderList

      public List<? extends Monitoring.MonitoringDestinationOrBuilder> getProducerDestinationsOrBuilderList()
       Monitoring configurations for sending metrics to the producer project.
       There can be multiple producer destinations. A monitored resource type may
       appear in multiple monitoring destinations if different aggregations are
       needed for different sets of metrics associated with that monitored
       resource type. A monitored resource and metric pair may only be used once
       in the Monitoring configuration.
       
      repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1;
      Specified by:
      getProducerDestinationsOrBuilderList in interface MonitoringOrBuilder
    • getProducerDestinationsCount

      public int getProducerDestinationsCount()
       Monitoring configurations for sending metrics to the producer project.
       There can be multiple producer destinations. A monitored resource type may
       appear in multiple monitoring destinations if different aggregations are
       needed for different sets of metrics associated with that monitored
       resource type. A monitored resource and metric pair may only be used once
       in the Monitoring configuration.
       
      repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1;
      Specified by:
      getProducerDestinationsCount in interface MonitoringOrBuilder
    • getProducerDestinations

      public Monitoring.MonitoringDestination getProducerDestinations(int index)
       Monitoring configurations for sending metrics to the producer project.
       There can be multiple producer destinations. A monitored resource type may
       appear in multiple monitoring destinations if different aggregations are
       needed for different sets of metrics associated with that monitored
       resource type. A monitored resource and metric pair may only be used once
       in the Monitoring configuration.
       
      repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1;
      Specified by:
      getProducerDestinations in interface MonitoringOrBuilder
    • getProducerDestinationsOrBuilder

      public Monitoring.MonitoringDestinationOrBuilder getProducerDestinationsOrBuilder(int index)
       Monitoring configurations for sending metrics to the producer project.
       There can be multiple producer destinations. A monitored resource type may
       appear in multiple monitoring destinations if different aggregations are
       needed for different sets of metrics associated with that monitored
       resource type. A monitored resource and metric pair may only be used once
       in the Monitoring configuration.
       
      repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1;
      Specified by:
      getProducerDestinationsOrBuilder in interface MonitoringOrBuilder
    • getConsumerDestinationsList

      public List<Monitoring.MonitoringDestination> getConsumerDestinationsList()
       Monitoring configurations for sending metrics to the consumer project.
       There can be multiple consumer destinations. A monitored resource type may
       appear in multiple monitoring destinations if different aggregations are
       needed for different sets of metrics associated with that monitored
       resource type. A monitored resource and metric pair may only be used once
       in the Monitoring configuration.
       
      repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2;
      Specified by:
      getConsumerDestinationsList in interface MonitoringOrBuilder
    • getConsumerDestinationsOrBuilderList

      public List<? extends Monitoring.MonitoringDestinationOrBuilder> getConsumerDestinationsOrBuilderList()
       Monitoring configurations for sending metrics to the consumer project.
       There can be multiple consumer destinations. A monitored resource type may
       appear in multiple monitoring destinations if different aggregations are
       needed for different sets of metrics associated with that monitored
       resource type. A monitored resource and metric pair may only be used once
       in the Monitoring configuration.
       
      repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2;
      Specified by:
      getConsumerDestinationsOrBuilderList in interface MonitoringOrBuilder
    • getConsumerDestinationsCount

      public int getConsumerDestinationsCount()
       Monitoring configurations for sending metrics to the consumer project.
       There can be multiple consumer destinations. A monitored resource type may
       appear in multiple monitoring destinations if different aggregations are
       needed for different sets of metrics associated with that monitored
       resource type. A monitored resource and metric pair may only be used once
       in the Monitoring configuration.
       
      repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2;
      Specified by:
      getConsumerDestinationsCount in interface MonitoringOrBuilder
    • getConsumerDestinations

      public Monitoring.MonitoringDestination getConsumerDestinations(int index)
       Monitoring configurations for sending metrics to the consumer project.
       There can be multiple consumer destinations. A monitored resource type may
       appear in multiple monitoring destinations if different aggregations are
       needed for different sets of metrics associated with that monitored
       resource type. A monitored resource and metric pair may only be used once
       in the Monitoring configuration.
       
      repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2;
      Specified by:
      getConsumerDestinations in interface MonitoringOrBuilder
    • getConsumerDestinationsOrBuilder

      public Monitoring.MonitoringDestinationOrBuilder getConsumerDestinationsOrBuilder(int index)
       Monitoring configurations for sending metrics to the consumer project.
       There can be multiple consumer destinations. A monitored resource type may
       appear in multiple monitoring destinations if different aggregations are
       needed for different sets of metrics associated with that monitored
       resource type. A monitored resource and metric pair may only be used once
       in the Monitoring configuration.
       
      repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2;
      Specified by:
      getConsumerDestinationsOrBuilder in interface MonitoringOrBuilder
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessageV3
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessageV3
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessageV3
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static Monitoring parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Monitoring parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Monitoring parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Monitoring parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Monitoring parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Monitoring parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Monitoring parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Monitoring parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static Monitoring parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static Monitoring parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Monitoring parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Monitoring parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      public Monitoring.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static Monitoring.Builder newBuilder()
    • newBuilder

      public static Monitoring.Builder newBuilder(Monitoring prototype)
    • toBuilder

      public Monitoring.Builder toBuilder()
      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected Monitoring.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
      Specified by:
      newBuilderForType in class com.google.protobuf.GeneratedMessageV3
    • getDefaultInstance

      public static Monitoring getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<Monitoring> parser()
    • getParserForType

      public com.google.protobuf.Parser<Monitoring> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessageV3
    • getDefaultInstanceForType

      public Monitoring getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder