public static final class Logging.Builder extends 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:
- 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:
Protobuf type google.api.Logging
Static Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
Methods
addAllConsumerDestinations(Iterable<? extends Logging.LoggingDestination> values)
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;
Parameter
Name | Description |
values | Iterable<? extends com.google.api.Logging.LoggingDestination>
|
Returns
addAllProducerDestinations(Iterable<? extends Logging.LoggingDestination> values)
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;
Parameter
Name | Description |
values | Iterable<? extends com.google.api.Logging.LoggingDestination>
|
Returns
addConsumerDestinations(Logging.LoggingDestination value)
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;
Parameter
Returns
addConsumerDestinations(Logging.LoggingDestination.Builder builderForValue)
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;
Parameter
Returns
addConsumerDestinations(int index, Logging.LoggingDestination value)
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;
Parameters
Returns
addConsumerDestinations(int index, Logging.LoggingDestination.Builder builderForValue)
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;
Parameters
Returns
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;
Returns
addConsumerDestinationsBuilder(int index)
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;
Parameter
Returns
addProducerDestinations(Logging.LoggingDestination value)
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;
Parameter
Returns
addProducerDestinations(Logging.LoggingDestination.Builder builderForValue)
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;
Parameter
Returns
addProducerDestinations(int index, Logging.LoggingDestination value)
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;
Parameters
Returns
addProducerDestinations(int index, Logging.LoggingDestination.Builder builderForValue)
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;
Parameters
Returns
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;
Returns
addProducerDestinationsBuilder(int index)
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;
Parameter
Returns
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public Logging.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
build()
Returns
buildPartial()
public Logging buildPartial()
Returns
clear()
public Logging.Builder clear()
Returns
Overrides
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;
Returns
clearField(Descriptors.FieldDescriptor field)
public Logging.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Returns
Overrides
clearOneof(Descriptors.OneofDescriptor oneof)
public Logging.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Returns
Overrides
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;
Returns
clone()
public Logging.Builder clone()
Returns
Overrides
getConsumerDestinations(int index)
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;
Parameter
Returns
getConsumerDestinationsBuilder(int index)
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;
Parameter
Returns
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;
Returns
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;
Returns
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;
Returns
getConsumerDestinationsOrBuilder(int index)
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;
Parameter
Returns
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;
Returns
Type | Description |
List<? extends com.google.api.Logging.LoggingDestinationOrBuilder> | |
getDefaultInstanceForType()
public Logging getDefaultInstanceForType()
Returns
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Returns
Overrides
getProducerDestinations(int index)
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;
Parameter
Returns
getProducerDestinationsBuilder(int index)
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;
Parameter
Returns
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;
Returns
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;
Returns
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;
Returns
getProducerDestinationsOrBuilder(int index)
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;
Parameter
Returns
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;
Returns
Type | Description |
List<? extends com.google.api.Logging.LoggingDestinationOrBuilder> | |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
mergeFrom(Logging other)
public Logging.Builder mergeFrom(Logging other)
Parameter
Returns
public Logging.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Overrides
Exceptions
mergeFrom(Message other)
public Logging.Builder mergeFrom(Message other)
Parameter
Returns
Overrides
mergeUnknownFields(UnknownFieldSet unknownFields)
public final Logging.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides
removeConsumerDestinations(int index)
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;
Parameter
Returns
removeProducerDestinations(int index)
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;
Parameter
Returns
setConsumerDestinations(int index, Logging.LoggingDestination value)
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;
Parameters
Returns
setConsumerDestinations(int index, Logging.LoggingDestination.Builder builderForValue)
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;
Parameters
Returns
setField(Descriptors.FieldDescriptor field, Object value)
public Logging.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
setProducerDestinations(int index, Logging.LoggingDestination value)
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;
Parameters
Returns
setProducerDestinations(int index, Logging.LoggingDestination.Builder builderForValue)
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;
Parameters
Returns
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public Logging.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Returns
Overrides
setUnknownFields(UnknownFieldSet unknownFields)
public final Logging.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides