Class Logging.Builder (2.14.1)

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:
    • 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

Implements

LoggingOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

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
NameDescription
valuesIterable<? extends com.google.api.Logging.LoggingDestination>
Returns
TypeDescription
Logging.Builder

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
NameDescription
valuesIterable<? extends com.google.api.Logging.LoggingDestination>
Returns
TypeDescription
Logging.Builder

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
NameDescription
valueLogging.LoggingDestination
Returns
TypeDescription
Logging.Builder

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
NameDescription
builderForValueLogging.LoggingDestination.Builder
Returns
TypeDescription
Logging.Builder

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
NameDescription
indexint
valueLogging.LoggingDestination
Returns
TypeDescription
Logging.Builder

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
NameDescription
indexint
builderForValueLogging.LoggingDestination.Builder
Returns
TypeDescription
Logging.Builder

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
TypeDescription
Logging.LoggingDestination.Builder

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
NameDescription
indexint
Returns
TypeDescription
Logging.LoggingDestination.Builder

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
NameDescription
valueLogging.LoggingDestination
Returns
TypeDescription
Logging.Builder

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
NameDescription
builderForValueLogging.LoggingDestination.Builder
Returns
TypeDescription
Logging.Builder

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
NameDescription
indexint
valueLogging.LoggingDestination
Returns
TypeDescription
Logging.Builder

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
NameDescription
indexint
builderForValueLogging.LoggingDestination.Builder
Returns
TypeDescription
Logging.Builder

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
TypeDescription
Logging.LoggingDestination.Builder

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
NameDescription
indexint
Returns
TypeDescription
Logging.LoggingDestination.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Logging.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Logging.Builder
Overrides

build()

public Logging build()
Returns
TypeDescription
Logging

buildPartial()

public Logging buildPartial()
Returns
TypeDescription
Logging

clear()

public Logging.Builder clear()
Returns
TypeDescription
Logging.Builder
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
TypeDescription
Logging.Builder

clearField(Descriptors.FieldDescriptor field)

public Logging.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
Logging.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public Logging.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
Logging.Builder
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
TypeDescription
Logging.Builder

clone()

public Logging.Builder clone()
Returns
TypeDescription
Logging.Builder
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
NameDescription
indexint
Returns
TypeDescription
Logging.LoggingDestination

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
NameDescription
indexint
Returns
TypeDescription
Logging.LoggingDestination.Builder

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
TypeDescription
List<Builder>

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
TypeDescription
int

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
TypeDescription
List<LoggingDestination>

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
NameDescription
indexint
Returns
TypeDescription
Logging.LoggingDestinationOrBuilder

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
TypeDescription
List<? extends com.google.api.Logging.LoggingDestinationOrBuilder>

getDefaultInstanceForType()

public Logging getDefaultInstanceForType()
Returns
TypeDescription
Logging

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
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
NameDescription
indexint
Returns
TypeDescription
Logging.LoggingDestination

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
NameDescription
indexint
Returns
TypeDescription
Logging.LoggingDestination.Builder

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
TypeDescription
List<Builder>

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
TypeDescription
int

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
TypeDescription
List<LoggingDestination>

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
NameDescription
indexint
Returns
TypeDescription
Logging.LoggingDestinationOrBuilder

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
TypeDescription
List<? extends com.google.api.Logging.LoggingDestinationOrBuilder>

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(Logging other)

public Logging.Builder mergeFrom(Logging other)
Parameter
NameDescription
otherLogging
Returns
TypeDescription
Logging.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Logging.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Logging.Builder
Overrides Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public Logging.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
Logging.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Logging.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Logging.Builder
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
NameDescription
indexint
Returns
TypeDescription
Logging.Builder

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
NameDescription
indexint
Returns
TypeDescription
Logging.Builder

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
NameDescription
indexint
valueLogging.LoggingDestination
Returns
TypeDescription
Logging.Builder

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
NameDescription
indexint
builderForValueLogging.LoggingDestination.Builder
Returns
TypeDescription
Logging.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public Logging.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Logging.Builder
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
NameDescription
indexint
valueLogging.LoggingDestination
Returns
TypeDescription
Logging.Builder

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
NameDescription
indexint
builderForValueLogging.LoggingDestination.Builder
Returns
TypeDescription
Logging.Builder

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public Logging.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
Logging.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final Logging.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Logging.Builder
Overrides