Class Monitoring

  • All Implemented Interfaces:
    MonitoringOrBuilder, com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<com.google.protobuf.GeneratedMessageV3>, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, java.io.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:
    Serialized Form
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  Monitoring.Builder
      Monitoring configuration of the service.
      static class  Monitoring.MonitoringDestination
      Configuration of a specific monitoring destination (the producer project or the consumer project).
      static interface  Monitoring.MonitoringDestinationOrBuilder  
      • Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3

        com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,​BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT,​BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter
      • Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessage.ExtendableMessage

        com.google.protobuf.GeneratedMessage.ExtendableMessage.ExtensionSerializer, com.google.protobuf.GeneratedMessage.ExtendableMessage.ExtensionWriter
      • Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessage

        com.google.protobuf.GeneratedMessage.GeneratedExtension<ContainingT extends com.google.protobuf.Message,​T extends java.lang.Object>
      • Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite

        com.google.protobuf.AbstractMessageLite.InternalOneOfEnum
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int CONSUMER_DESTINATIONS_FIELD_NUMBER  
      static int PRODUCER_DESTINATIONS_FIELD_NUMBER  
      • Fields inherited from class com.google.protobuf.GeneratedMessage

        alwaysUseFieldBuilders, unknownFields
      • Fields inherited from class com.google.protobuf.AbstractMessage

        memoizedSize
      • Fields inherited from class com.google.protobuf.AbstractMessageLite

        memoizedHashCode
    • Field Detail

      • PRODUCER_DESTINATIONS_FIELD_NUMBER

        public static final int PRODUCER_DESTINATIONS_FIELD_NUMBER
        See Also:
        Constant Field Values
      • CONSUMER_DESTINATIONS_FIELD_NUMBER

        public static final int CONSUMER_DESTINATIONS_FIELD_NUMBER
        See Also:
        Constant Field Values
    • Method Detail

      • newInstance

        protected java.lang.Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • getDescriptor

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

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

        public java.util.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 java.util.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 java.util.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 java.util.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.GeneratedMessage.ExtendableMessage<com.google.protobuf.GeneratedMessageV3>
      • writeTo

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

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

        public boolean equals​(java.lang.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​(java.nio.ByteBuffer data)
                                    throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Monitoring parseFrom​(java.nio.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​(java.io.InputStream input)
                                    throws java.io.IOException
        Throws:
        java.io.IOException
      • parseFrom

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

        public static Monitoring parseDelimitedFrom​(java.io.InputStream input)
                                             throws java.io.IOException
        Throws:
        java.io.IOException
      • parseDelimitedFrom

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

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

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

        public Monitoring.Builder newBuilderForType()
        Specified by:
        newBuilderForType in interface com.google.protobuf.Message
        Specified by:
        newBuilderForType in interface com.google.protobuf.MessageLite
      • 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.GeneratedMessage
      • getDefaultInstanceForType

        public Monitoring getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<com.google.protobuf.GeneratedMessageV3>
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder