Class Logging.Builder

  • All Implemented Interfaces:
    LoggingOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
    Enclosing class:
    Logging

    public static final class Logging.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<Logging.Builder>
    implements LoggingOrBuilder
     Logging configuration of the service.
     The following example shows how to configure logs to be sent to the
     producer and consumer projects. In the example, the `activity_history`
     log is sent to both the producer and consumer projects, whereas the
     `purchase_history` log is only sent to the producer 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.
         logs:
         - name: activity_history
           labels:
           - key: /customer_id
         - name: purchase_history
         logging:
           producer_destinations:
           - monitored_resource: library.googleapis.com/branch
             logs:
             - activity_history
             - purchase_history
           consumer_destinations:
           - monitored_resource: library.googleapis.com/branch
             logs:
             - activity_history
     
    Protobuf type google.api.Logging
    • Method Detail

      • 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.Builder<Logging.Builder>
      • clear

        public Logging.Builder clear()
        Specified by:
        clear in interface com.google.protobuf.Message.Builder
        Specified by:
        clear in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clear in class com.google.protobuf.GeneratedMessageV3.Builder<Logging.Builder>
      • getDescriptorForType

        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface com.google.protobuf.Message.Builder
        Specified by:
        getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<Logging.Builder>
      • getDefaultInstanceForType

        public Logging getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
      • build

        public Logging build()
        Specified by:
        build in interface com.google.protobuf.Message.Builder
        Specified by:
        build in interface com.google.protobuf.MessageLite.Builder
      • buildPartial

        public Logging buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
      • clone

        public Logging.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<Logging.Builder>
      • setField

        public Logging.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                        Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<Logging.Builder>
      • clearField

        public Logging.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<Logging.Builder>
      • clearOneof

        public Logging.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<Logging.Builder>
      • setRepeatedField

        public Logging.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                int index,
                                                Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Logging.Builder>
      • addRepeatedField

        public Logging.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Logging.Builder>
      • mergeFrom

        public Logging.Builder mergeFrom​(com.google.protobuf.Message other)
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Logging.Builder>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<Logging.Builder>
      • mergeFrom

        public Logging.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                  throws IOException
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Specified by:
        mergeFrom in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Logging.Builder>
        Throws:
        IOException
      • getProducerDestinationsList

        public List<Logging.LoggingDestination> getProducerDestinationsList()
         Logging configurations for sending logs to the producer project.
         There can be multiple producer destinations, each one must have a
         different monitored resource type. A log can be used in at most
         one producer destination.
         
        repeated .google.api.Logging.LoggingDestination producer_destinations = 1;
        Specified by:
        getProducerDestinationsList in interface LoggingOrBuilder
      • getProducerDestinationsCount

        public int getProducerDestinationsCount()
         Logging configurations for sending logs to the producer project.
         There can be multiple producer destinations, each one must have a
         different monitored resource type. A log can be used in at most
         one producer destination.
         
        repeated .google.api.Logging.LoggingDestination producer_destinations = 1;
        Specified by:
        getProducerDestinationsCount in interface LoggingOrBuilder
      • getProducerDestinations

        public Logging.LoggingDestination getProducerDestinations​(int index)
         Logging configurations for sending logs to the producer project.
         There can be multiple producer destinations, each one must have a
         different monitored resource type. A log can be used in at most
         one producer destination.
         
        repeated .google.api.Logging.LoggingDestination producer_destinations = 1;
        Specified by:
        getProducerDestinations in interface LoggingOrBuilder
      • setProducerDestinations

        public Logging.Builder setProducerDestinations​(int index,
                                                       Logging.LoggingDestination value)
         Logging configurations for sending logs to the producer project.
         There can be multiple producer destinations, each one must have a
         different monitored resource type. A log can be used in at most
         one producer destination.
         
        repeated .google.api.Logging.LoggingDestination producer_destinations = 1;
      • setProducerDestinations

        public Logging.Builder setProducerDestinations​(int index,
                                                       Logging.LoggingDestination.Builder builderForValue)
         Logging configurations for sending logs to the producer project.
         There can be multiple producer destinations, each one must have a
         different monitored resource type. A log can be used in at most
         one producer destination.
         
        repeated .google.api.Logging.LoggingDestination producer_destinations = 1;
      • addProducerDestinations

        public Logging.Builder addProducerDestinations​(Logging.LoggingDestination value)
         Logging configurations for sending logs to the producer project.
         There can be multiple producer destinations, each one must have a
         different monitored resource type. A log can be used in at most
         one producer destination.
         
        repeated .google.api.Logging.LoggingDestination producer_destinations = 1;
      • addProducerDestinations

        public Logging.Builder addProducerDestinations​(int index,
                                                       Logging.LoggingDestination value)
         Logging configurations for sending logs to the producer project.
         There can be multiple producer destinations, each one must have a
         different monitored resource type. A log can be used in at most
         one producer destination.
         
        repeated .google.api.Logging.LoggingDestination producer_destinations = 1;
      • addProducerDestinations

        public Logging.Builder addProducerDestinations​(Logging.LoggingDestination.Builder builderForValue)
         Logging configurations for sending logs to the producer project.
         There can be multiple producer destinations, each one must have a
         different monitored resource type. A log can be used in at most
         one producer destination.
         
        repeated .google.api.Logging.LoggingDestination producer_destinations = 1;
      • addProducerDestinations

        public Logging.Builder addProducerDestinations​(int index,
                                                       Logging.LoggingDestination.Builder builderForValue)
         Logging configurations for sending logs to the producer project.
         There can be multiple producer destinations, each one must have a
         different monitored resource type. A log can be used in at most
         one producer destination.
         
        repeated .google.api.Logging.LoggingDestination producer_destinations = 1;
      • addAllProducerDestinations

        public Logging.Builder addAllProducerDestinations​(Iterable<? extends Logging.LoggingDestination> values)
         Logging configurations for sending logs to the producer project.
         There can be multiple producer destinations, each one must have a
         different monitored resource type. A log can be used in at most
         one producer destination.
         
        repeated .google.api.Logging.LoggingDestination producer_destinations = 1;
      • clearProducerDestinations

        public Logging.Builder clearProducerDestinations()
         Logging configurations for sending logs to the producer project.
         There can be multiple producer destinations, each one must have a
         different monitored resource type. A log can be used in at most
         one producer destination.
         
        repeated .google.api.Logging.LoggingDestination producer_destinations = 1;
      • removeProducerDestinations

        public Logging.Builder removeProducerDestinations​(int index)
         Logging configurations for sending logs to the producer project.
         There can be multiple producer destinations, each one must have a
         different monitored resource type. A log can be used in at most
         one producer destination.
         
        repeated .google.api.Logging.LoggingDestination producer_destinations = 1;
      • getProducerDestinationsBuilder

        public Logging.LoggingDestination.Builder getProducerDestinationsBuilder​(int index)
         Logging configurations for sending logs to the producer project.
         There can be multiple producer destinations, each one must have a
         different monitored resource type. A log can be used in at most
         one producer destination.
         
        repeated .google.api.Logging.LoggingDestination producer_destinations = 1;
      • getProducerDestinationsOrBuilder

        public Logging.LoggingDestinationOrBuilder getProducerDestinationsOrBuilder​(int index)
         Logging configurations for sending logs to the producer project.
         There can be multiple producer destinations, each one must have a
         different monitored resource type. A log can be used in at most
         one producer destination.
         
        repeated .google.api.Logging.LoggingDestination producer_destinations = 1;
        Specified by:
        getProducerDestinationsOrBuilder in interface LoggingOrBuilder
      • getProducerDestinationsOrBuilderList

        public List<? extends Logging.LoggingDestinationOrBuilder> getProducerDestinationsOrBuilderList()
         Logging configurations for sending logs to the producer project.
         There can be multiple producer destinations, each one must have a
         different monitored resource type. A log can be used in at most
         one producer destination.
         
        repeated .google.api.Logging.LoggingDestination producer_destinations = 1;
        Specified by:
        getProducerDestinationsOrBuilderList in interface LoggingOrBuilder
      • addProducerDestinationsBuilder

        public Logging.LoggingDestination.Builder addProducerDestinationsBuilder()
         Logging configurations for sending logs to the producer project.
         There can be multiple producer destinations, each one must have a
         different monitored resource type. A log can be used in at most
         one producer destination.
         
        repeated .google.api.Logging.LoggingDestination producer_destinations = 1;
      • addProducerDestinationsBuilder

        public Logging.LoggingDestination.Builder addProducerDestinationsBuilder​(int index)
         Logging configurations for sending logs to the producer project.
         There can be multiple producer destinations, each one must have a
         different monitored resource type. A log can be used in at most
         one producer destination.
         
        repeated .google.api.Logging.LoggingDestination producer_destinations = 1;
      • getProducerDestinationsBuilderList

        public List<Logging.LoggingDestination.Builder> getProducerDestinationsBuilderList()
         Logging configurations for sending logs to the producer project.
         There can be multiple producer destinations, each one must have a
         different monitored resource type. A log can be used in at most
         one producer destination.
         
        repeated .google.api.Logging.LoggingDestination producer_destinations = 1;
      • getConsumerDestinationsList

        public List<Logging.LoggingDestination> getConsumerDestinationsList()
         Logging configurations for sending logs to the consumer project.
         There can be multiple consumer destinations, each one must have a
         different monitored resource type. A log can be used in at most
         one consumer destination.
         
        repeated .google.api.Logging.LoggingDestination consumer_destinations = 2;
        Specified by:
        getConsumerDestinationsList in interface LoggingOrBuilder
      • getConsumerDestinationsCount

        public int getConsumerDestinationsCount()
         Logging configurations for sending logs to the consumer project.
         There can be multiple consumer destinations, each one must have a
         different monitored resource type. A log can be used in at most
         one consumer destination.
         
        repeated .google.api.Logging.LoggingDestination consumer_destinations = 2;
        Specified by:
        getConsumerDestinationsCount in interface LoggingOrBuilder
      • getConsumerDestinations

        public Logging.LoggingDestination getConsumerDestinations​(int index)
         Logging configurations for sending logs to the consumer project.
         There can be multiple consumer destinations, each one must have a
         different monitored resource type. A log can be used in at most
         one consumer destination.
         
        repeated .google.api.Logging.LoggingDestination consumer_destinations = 2;
        Specified by:
        getConsumerDestinations in interface LoggingOrBuilder
      • setConsumerDestinations

        public Logging.Builder setConsumerDestinations​(int index,
                                                       Logging.LoggingDestination value)
         Logging configurations for sending logs to the consumer project.
         There can be multiple consumer destinations, each one must have a
         different monitored resource type. A log can be used in at most
         one consumer destination.
         
        repeated .google.api.Logging.LoggingDestination consumer_destinations = 2;
      • setConsumerDestinations

        public Logging.Builder setConsumerDestinations​(int index,
                                                       Logging.LoggingDestination.Builder builderForValue)
         Logging configurations for sending logs to the consumer project.
         There can be multiple consumer destinations, each one must have a
         different monitored resource type. A log can be used in at most
         one consumer destination.
         
        repeated .google.api.Logging.LoggingDestination consumer_destinations = 2;
      • addConsumerDestinations

        public Logging.Builder addConsumerDestinations​(Logging.LoggingDestination value)
         Logging configurations for sending logs to the consumer project.
         There can be multiple consumer destinations, each one must have a
         different monitored resource type. A log can be used in at most
         one consumer destination.
         
        repeated .google.api.Logging.LoggingDestination consumer_destinations = 2;
      • addConsumerDestinations

        public Logging.Builder addConsumerDestinations​(int index,
                                                       Logging.LoggingDestination value)
         Logging configurations for sending logs to the consumer project.
         There can be multiple consumer destinations, each one must have a
         different monitored resource type. A log can be used in at most
         one consumer destination.
         
        repeated .google.api.Logging.LoggingDestination consumer_destinations = 2;
      • addConsumerDestinations

        public Logging.Builder addConsumerDestinations​(Logging.LoggingDestination.Builder builderForValue)
         Logging configurations for sending logs to the consumer project.
         There can be multiple consumer destinations, each one must have a
         different monitored resource type. A log can be used in at most
         one consumer destination.
         
        repeated .google.api.Logging.LoggingDestination consumer_destinations = 2;
      • addConsumerDestinations

        public Logging.Builder addConsumerDestinations​(int index,
                                                       Logging.LoggingDestination.Builder builderForValue)
         Logging configurations for sending logs to the consumer project.
         There can be multiple consumer destinations, each one must have a
         different monitored resource type. A log can be used in at most
         one consumer destination.
         
        repeated .google.api.Logging.LoggingDestination consumer_destinations = 2;
      • addAllConsumerDestinations

        public Logging.Builder addAllConsumerDestinations​(Iterable<? extends Logging.LoggingDestination> values)
         Logging configurations for sending logs to the consumer project.
         There can be multiple consumer destinations, each one must have a
         different monitored resource type. A log can be used in at most
         one consumer destination.
         
        repeated .google.api.Logging.LoggingDestination consumer_destinations = 2;
      • clearConsumerDestinations

        public Logging.Builder clearConsumerDestinations()
         Logging configurations for sending logs to the consumer project.
         There can be multiple consumer destinations, each one must have a
         different monitored resource type. A log can be used in at most
         one consumer destination.
         
        repeated .google.api.Logging.LoggingDestination consumer_destinations = 2;
      • removeConsumerDestinations

        public Logging.Builder removeConsumerDestinations​(int index)
         Logging configurations for sending logs to the consumer project.
         There can be multiple consumer destinations, each one must have a
         different monitored resource type. A log can be used in at most
         one consumer destination.
         
        repeated .google.api.Logging.LoggingDestination consumer_destinations = 2;
      • getConsumerDestinationsBuilder

        public Logging.LoggingDestination.Builder getConsumerDestinationsBuilder​(int index)
         Logging configurations for sending logs to the consumer project.
         There can be multiple consumer destinations, each one must have a
         different monitored resource type. A log can be used in at most
         one consumer destination.
         
        repeated .google.api.Logging.LoggingDestination consumer_destinations = 2;
      • getConsumerDestinationsOrBuilder

        public Logging.LoggingDestinationOrBuilder getConsumerDestinationsOrBuilder​(int index)
         Logging configurations for sending logs to the consumer project.
         There can be multiple consumer destinations, each one must have a
         different monitored resource type. A log can be used in at most
         one consumer destination.
         
        repeated .google.api.Logging.LoggingDestination consumer_destinations = 2;
        Specified by:
        getConsumerDestinationsOrBuilder in interface LoggingOrBuilder
      • getConsumerDestinationsOrBuilderList

        public List<? extends Logging.LoggingDestinationOrBuilder> getConsumerDestinationsOrBuilderList()
         Logging configurations for sending logs to the consumer project.
         There can be multiple consumer destinations, each one must have a
         different monitored resource type. A log can be used in at most
         one consumer destination.
         
        repeated .google.api.Logging.LoggingDestination consumer_destinations = 2;
        Specified by:
        getConsumerDestinationsOrBuilderList in interface LoggingOrBuilder
      • addConsumerDestinationsBuilder

        public Logging.LoggingDestination.Builder addConsumerDestinationsBuilder()
         Logging configurations for sending logs to the consumer project.
         There can be multiple consumer destinations, each one must have a
         different monitored resource type. A log can be used in at most
         one consumer destination.
         
        repeated .google.api.Logging.LoggingDestination consumer_destinations = 2;
      • addConsumerDestinationsBuilder

        public Logging.LoggingDestination.Builder addConsumerDestinationsBuilder​(int index)
         Logging configurations for sending logs to the consumer project.
         There can be multiple consumer destinations, each one must have a
         different monitored resource type. A log can be used in at most
         one consumer destination.
         
        repeated .google.api.Logging.LoggingDestination consumer_destinations = 2;
      • getConsumerDestinationsBuilderList

        public List<Logging.LoggingDestination.Builder> getConsumerDestinationsBuilderList()
         Logging configurations for sending logs to the consumer project.
         There can be multiple consumer destinations, each one must have a
         different monitored resource type. A log can be used in at most
         one consumer destination.
         
        repeated .google.api.Logging.LoggingDestination consumer_destinations = 2;
      • setUnknownFields

        public final Logging.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Logging.Builder>
      • mergeUnknownFields

        public final Logging.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Logging.Builder>